This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tables in fo / pdf output: sizing of columns


/ Dominik Kuhn <dkuhn@insphere.ch> was heard to say:
| 1) If  i declare the size of the column in the colspec-tag like
| <colspec colwidth="4cm" /> i got a column with that width. So far so
| good. But I'd rather like not to specifiy the column-width and let the
| renderer (fo or tex?) choose the appropriate column-width in a
| HTML-Table-like manner. Is this possible? If yes: does someone know
| how?

If you don't specify any widths, implementations are free to choose
widths in the manner that you describe. Some do, some don't. Some do
better than others.

Rather than use explicit units of measure, you can use relative widths:
In a two column table,

  <colspec colwidth="3*"/>
  <colspec colwidth="2*"/>

the implementation is free to choose the width, but the ratio of the width
of the first column to the second will be 3/2.

| 2) Borders: Following table should (in my opinion) turn up grid-like
| with a frame around it:
|       <table colsep="1" frame="all" rowsep="1">
|         <title>Umgebungsvariablen</title>
|         <tgroup cols="3">
|           <colspec colwidth="4cm" />
|           <colspec colwidth="8cm" />
|           <colspec colwidth="5cm" />
|           <thead>
|             <row>
|               <entry>Col1Head</entry>
|               <entry>Col2Head</entry>
|               <entry>Col3Head</entry>
|             </row>
|           </thead>
|           <tbody>
|             <row>
|               <entry>Col1</entry>
|               <entry>Col2</entry>
|               <entry>Col3</entry>
|             </row>
|           </tbody>
|         </tgroup>
|       </table>
| This table turns up with inner borders but without a frame around it.
| I wonder what's wrong. Does someone know ho to do it? Or is it a bug,
| somewhere?

It's a bug. It will be fixed in 1.50.1, when it's released. I believe that
it's fixed in 1.50.1-EXP2. But that's an experimental release.

| 3) I tried to change the padding of the columns in a driver-file the
| following way:
| <xsl:attribute-set name="table.cell.padding">
|   <xsl:attribute name="padding-left">12pt</xsl:attribute>
|   <xsl:attribute name="padding-right">12pt</xsl:attribute>
|   <xsl:attribute name="padding-top">12pt</xsl:attribute>
|   <xsl:attribute name="padding-bottom">12pt</xsl:attribute>
| </xsl:attribute-set>
| nor
| <xsl:param name="table.entry.padding" select="'12pt'"/>
| worked. The enlarged padding (default is 2pt) never showed up. The
| parameter all show up in the fo/param.xsl file. Is it possible, that
| they  aren't used at all? Has someone an idea what's wrong?

Look in the FO file. If they show up there, you're seeing a formatter
bug. If they don't, it's a stylesheet bug. I believe it's the former,
but I've been wrong before :-)

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com>      | Through space the universe grasps
http://www.oasis-open.org/docbook/ | me and swallows me up like a
Chair, DocBook Technical Committee | speck; through thought I grasp
                                   | it.--Pascal


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]