[quickbook] Controling the layout of table columns in docbook/fo output

Hi, In an earlier thread I mentioned that I am using quickbook to write software design specification/documentation. The whole document grows nicely now. Since more people are contributing, I added howto chapters to the end of the document, including some kind of guided quickbook skeleton for new chapters and the quickbook documentation itself. The quickbook documentation creates warnings with fop: Mar 12, 2012 8:11:46 PM org.apache.fop.events.LoggingEventListener processEvent WARNING: table-layout="fixed" and column-width unspecified => falling back to proportional-column-width(1) (See position 1686:869) Mar 12, 2012 8:11:46 PM org.apache.fop.events.LoggingEventListener processEvent WARNING: table-layout="fixed" and column-width unspecified => falling back to proportional-column-width(1) (See position 1686:905) Mar 12, 2012 8:11:46 PM org.apache.fop.events.LoggingEventListener processEvent WARNING: table-layout="fixed" and column-width unspecified => falling back to proportional-column-width(1) (See position 1896:796) and more. That happens for every table. Inside the documentation about tables there one containing hello world source. There the proportional column width makes the source code leave the table and text area of the page. Is there a yet undocumented way to control column sizes? regards Andreas

On 12 March 2012 20:20, Andreas Pokorny <andreas.pokorny@gmail.com> wrote:
Hi, In an earlier thread I mentioned that I am using quickbook to write software design specification/documentation. The whole document grows nicely now. Since more people are contributing, I added howto chapters to the end of the document, including some kind of guided quickbook skeleton for new chapters and the quickbook documentation itself. The quickbook documentation creates warnings with fop: Mar 12, 2012 8:11:46 PM org.apache.fop.events.LoggingEventListener processEvent WARNING: table-layout="fixed" and column-width unspecified => falling back to proportional-column-width(1) (See position 1686:869) Mar 12, 2012 8:11:46 PM org.apache.fop.events.LoggingEventListener processEvent WARNING: table-layout="fixed" and column-width unspecified => falling back to proportional-column-width(1) (See position 1686:905) Mar 12, 2012 8:11:46 PM org.apache.fop.events.LoggingEventListener processEvent WARNING: table-layout="fixed" and column-width unspecified => falling back to proportional-column-width(1) (See position 1896:796)
and more. That happens for every table. Inside the documentation about tables there one containing hello world source. There the proportional column width makes the source code leave the table and text area of the page.
Is there a yet undocumented way to control column sizes?
No, if you want greater control over tables you need to write them in docbook, which can be embedded in quickbook: http://www.boost.org/doc/libs/1_49_0/doc/html/quickbook/syntax/phrase.html#q... If you can suggest changes to the generated table that avoids this warning, it might be possible to improve the output, but we don't use fop nowadays (the pdfs are generated using xep) so supporting it isn't a priority.

Hi, Am 18. März 2012 14:09 schrieb Daniel James <dnljms@gmail.com>:
[...] Is there a yet undocumented way to control column sizes?
No, if you want greater control over tables you need to write them in docbook, which can be embedded in quickbook:
http://www.boost.org/doc/libs/1_49_0/doc/html/quickbook/syntax/phrase.html#q...
If you can suggest changes to the generated table that avoids this warning, it might be possible to improve the output, but we don't use fop nowadays (the pdfs are generated using xep) so supporting it isn't a priority.
We are kind of locked with fop for now. I played around with something like: [template col_width[number width]'''<colspec colname="c'''[number]'''" colnum="'''[number]'''" colwidth="'''[width]'''"/>'''] [table:id A Simple Table [col_width 1..3*] [col_width 2..*] [col_width 3..4*] [[Heading 1] [Heading 2] [Heading 3]] [[R0-C0] [R0-C1] [R0-C2]] [[R1-C0] [R1-C1] [R1-C2]] [[R2-C0] [R2-C1] [R2-C2]] ] Which is a terrible syntax, and does not work either. Depending on where I put the template invocation, it ends up in the table title or as a separate row. Or causes a parse error. It orrucred to me that I cannot write something like: [mytable:id A clumsy table with size specs [[3] [1] [4]] [[Heading 1] [Heading 2] [Heading 3]] [[R0-C0] [R0-C1] [R0-C2]] [[R1-C0] [R1-C1] [R1-C2]] [[R2-C0] [R2-C1] [R2-C2]] ] [template mytable[title colspec ...] '''<table '''[if id ['''id="'''[id]'''"][]'''> <title>'''[titlte]'''</title> <tgroup cols="''[count [arg_0]]'''"/ [foreach [item] in [colspec] '''<colspec colname="c'''[index]'''" colnum="'''[item]'''" colwidth="'''[item]'''"/>'''] [unrollrows [args]] </tgroup> </table>'''] [template unlrollrows[] ] [template unlrollrows[row ...] '''<row>[foreach [item] in [row] ''' <entry>'''[item]'''</entry>''']'''</row>''' [unrollrows [args]] ]

On 18 March 2012 16:29, Andreas Pokorny <andreas.pokorny@gmail.com> wrote:
We are kind of locked with fop for now. I played around with something like:
[template col_width[number width]'''<colspec colname="c'''[number]'''" colnum="'''[number]'''" colwidth="'''[width]'''"/>''']
[table:id A Simple Table [col_width 1..3*] [col_width 2..*] [col_width 3..4*] [[Heading 1] [Heading 2] [Heading 3]] [[R0-C0] [R0-C1] [R0-C2]] [[R1-C0] [R1-C1] [R1-C2]] [[R2-C0] [R2-C1] [R2-C2]] ]
Which is a terrible syntax, and does not work either. Depending on where I put the template invocation, it ends up in the table title or as a separate row.
There's currently no place to put anything in tgroup. What would you consider to be a good syntax?
Or causes a parse error. It orrucred to me that I cannot write something like: [snip]
The template system isn't anywhere near sophisticated enough to do something like that.

Hi, Am 25. März 2012 23:32 schrieb Daniel James <dnljms@gmail.com>:
[...]
Which is a terrible syntax, and does not work either. Depending on where I put the template invocation, it ends up in the table title or as a separate row.
There's currently no place to put anything in tgroup. What would you consider to be a good syntax?
I have no idea yet. I am not quite sure what options make sense, what combinations are possible. This system with proportional column sizes, makes sense to some degree for the tables I looked at, but might not make sense for other users. So it is kind of hard for me to suggest a nice syntax that could be extended for other users too.
Or causes a parse error. It orrucred to me that I cannot write something like: [snip]
The template system isn't anywhere near sophisticated enough to do something like that.
I thought there was once a movement to let quickbook expand in that direction. Do you think it would be possible to get closer to that? regards Andreas
participants (2)
-
Andreas Pokorny
-
Daniel James