XML technologies / DocBook / Block elements / Tables / Adjusting column widths
(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)
Column width is controlled by the element colspec. The attribute for this is colwidth; it accepts a fixed value, a proportional value or both. Available units are listed in the following table.
Table: Units of measurement
Abbreviation | Meaning |
cm | Centimeters |
em | Width of the letter "M" in the current character set ("Ems") |
in | Inch (1 in = 2,54 cm) |
pc | Pica (1/16 in = 0,158750 cm) |
pt | Points (1/72 in = 0,03528 cm) |
px | Pixels |
Example: Different column widths in a CALS table
<tgroup cols="3">
<colspec colwidth="4cm"/>
<colspec colwidth="2*"/>
<colspec colwidth="1*"/>
</tgroup>In the listing above, the first column has a fixed width of 4 cm, while the second is twice as wide as the third. Extensions calculate the absolute column widths; see “Extension functions and extension elements”.
Copyright © 2009 Millin Verlag
You may print the online version for your private use.
Otherwise, this chapter from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Millin Verlag, Siebengebirgsring 36, 53797 Lohmar, info(at)millin.de
back to top