title: XSL-FO: Table layout tweaking
body: <p>Here is my problem, I have a table like this</p>
  
  <pre>
  This is a column header (A)  | Another Column header (B) | Header (C) | Another column Header (D)
  --------------------------------------------------------------------------------------------------
  Value A                      | Value B                   |  Value C   | Value D
  </pre>
  
  <p>The thing is, the values in columns A and C, say can be very long whereas the values in B and D can be very short.  I don't mind if the headers or the values wrap - so ideally I would like a typical table to look like the following</p>
  
  <pre>
  This is a column header (A)             | Another       | Header (C)                        | Another 
                                          | Column        |                                   | column 
                                          | header (B)    |                                   | Header (D)
  ----------------------------------------------------------------------------------------------------------
  Value is very long and verbose, bla bla | Value B       | Value C - this to is quite long   | Value D
  bla bla bla - see it wrapped            |               |                                   |
  </pre>
  
  <p>Essentially, I would like the column headers to wrap <strong>in preference</strong> to the values in the table data cells.  I cannot simply apply the <code>wrap-option="no-wrap"</code> attribute to the table cells - as the page is not wide enough to accommodate all the long text.</p>
  
  <p>I have tried specifying <code>proportional-column-width</code> attribute to the columns - but this is not ideal as I don't know which columns will contain the longest text in all circumstances.</p>
  
  <p>The best solution that I have come up with at the moment, is to explicitly put line breaks in the column header text but this has the unwanted side effect that it seems to increase the column width a fair amount.  See <a href="http://snipplr.com/view/37957/xslfo-to-make-a-table/" rel="nofollow noreferrer">http://snipplr.com/view/37957/xslfo-to-make-a-table/</a> for an example.  This produces this output <a href="http://imagebin.org/106996" rel="nofollow noreferrer">http://imagebin.org/106996</a> .  Note how columns3, 4, 5, 6 and 7 seem to have rather generous padding, which means that columns1 and 2 are narrower than they could be.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>PS - I am using the Ibex rendering engine <a href="http://www.xmlpdf.com" rel="nofollow noreferrer">http://www.xmlpdf.com</a></p>