| 1 |
<chapter xmlns="http://docbook.org/ns/docbook" |
| 2 |
id="cals-tables"> |
| 3 |
<title>CALS Tables</title> |
| 4 |
|
| 5 |
<informaltable> |
| 6 |
<tgroup cols="2"> |
| 7 |
<tbody> |
| 8 |
<row><entry>fe</entry><entry>fi</entry></row> |
| 9 |
<row><entry>fo</entry><entry>fum</entry></row> |
| 10 |
</tbody> |
| 11 |
</tgroup> |
| 12 |
</informaltable> |
| 13 |
|
| 14 |
<para>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed risus dui, |
| 15 |
faucibus at, blandit eu, congue in, sem. Suspendisse nec mi. Sed vel augue. |
| 16 |
Cras egestas. Vivamus nisi. Fusce neque. Aenean posuere, orci non lacinia |
| 17 |
consectetuer, neque libero semper metus, ut ullamcorper eros lorem at tellus. |
| 18 |
Ut ante tellus, iaculis at, tincidunt quis, ultrices at, ligula. Pellentesque |
| 19 |
porttitor condimentum nulla.</para> |
| 20 |
|
| 21 |
<section id="cals-tables-span"> |
| 22 |
<title>Spanning</title> |
| 23 |
|
| 24 |
<para>Here's some column spanning:</para> |
| 25 |
<informaltable frame="none"> |
| 26 |
<tgroup cols="4" rowsep="1" colsep="1"> |
| 27 |
<colspec colname="one"/> |
| 28 |
<colspec colname="two"/> |
| 29 |
<colspec colname="three"/> |
| 30 |
<colspec colname="four"/> |
| 31 |
<spanspec spanname="two-four" namest="two" nameend="four"/> |
| 32 |
<tbody> |
| 33 |
<row> |
| 34 |
<entry>one</entry> |
| 35 |
<entry>two</entry> |
| 36 |
<entry>three</entry> |
| 37 |
<entry>four</entry> |
| 38 |
</row> |
| 39 |
<row> |
| 40 |
<entry namest="one" nameend="two">one-two</entry> |
| 41 |
<entry>three</entry> |
| 42 |
<entry>four</entry> |
| 43 |
</row> |
| 44 |
<row> |
| 45 |
<entry namest="two" nameend="three">two-three</entry> |
| 46 |
<entry>four</entry> |
| 47 |
</row> |
| 48 |
<row> |
| 49 |
<entry>one</entry> |
| 50 |
<entry spanname="two-four">two-four</entry> |
| 51 |
</row> |
| 52 |
</tbody> |
| 53 |
</tgroup> |
| 54 |
</informaltable> |
| 55 |
|
| 56 |
<para>Here's some row spanning:</para> |
| 57 |
<informaltable frame="none"> |
| 58 |
<tgroup cols="4" rowsep="1" colsep="1"> |
| 59 |
<tbody> |
| 60 |
<row> |
| 61 |
<entry morerows="1">one</entry> |
| 62 |
<entry morerows="2">two</entry> |
| 63 |
<entry>three</entry> |
| 64 |
<entry>four</entry> |
| 65 |
</row> |
| 66 |
<row> |
| 67 |
<entry>three</entry> |
| 68 |
<entry morerows="1">four</entry> |
| 69 |
</row> |
| 70 |
<row> |
| 71 |
<entry>one</entry> |
| 72 |
<entry morerows="1">three</entry> |
| 73 |
</row> |
| 74 |
<row> |
| 75 |
<entry>one</entry> |
| 76 |
<entry>two</entry> |
| 77 |
<entry>four</entry> |
| 78 |
</row> |
| 79 |
</tbody> |
| 80 |
</tgroup> |
| 81 |
</informaltable> |
| 82 |
|
| 83 |
<para>Here we test implicit entries:</para> |
| 84 |
<informaltable frame="none"> |
| 85 |
<tgroup cols="4" rowsep="1" colsep="1"> |
| 86 |
<colspec colname="one"/> |
| 87 |
<colspec colname="two"/> |
| 88 |
<colspec colname="three"/> |
| 89 |
<colspec colname="four"/> |
| 90 |
<tbody> |
| 91 |
<row> |
| 92 |
<entry>one</entry> |
| 93 |
<entry>two</entry> |
| 94 |
<entry morerows="2">three</entry> |
| 95 |
<entry>four</entry> |
| 96 |
</row> |
| 97 |
<row> |
| 98 |
<entry colname="two">two</entry> |
| 99 |
<entry>four</entry> |
| 100 |
</row> |
| 101 |
<row> |
| 102 |
<entry colname="four">four</entry> |
| 103 |
</row> |
| 104 |
<row> |
| 105 |
<entry colname="three">three</entry> |
| 106 |
<entry>four</entry> |
| 107 |
</row> |
| 108 |
<row> |
| 109 |
<entry colname="four">four</entry> |
| 110 |
</row> |
| 111 |
</tbody> |
| 112 |
</tgroup> |
| 113 |
</informaltable> |
| 114 |
|
| 115 |
<para>And here's some craziness to mix it all together:</para> |
| 116 |
<informaltable frame="none"> |
| 117 |
<tgroup cols="5" rowsep="1" colsep="1"> |
| 118 |
<colspec colname="one"/> |
| 119 |
<colspec colname="two"/> |
| 120 |
<colspec colname="three"/> |
| 121 |
<colspec colname="four"/> |
| 122 |
<colspec colname="five"/> |
| 123 |
<tbody> |
| 124 |
<row> |
| 125 |
<entry morerows="1">one</entry> |
| 126 |
<entry>two</entry> |
| 127 |
<entry>three</entry> |
| 128 |
<entry morerows="3">four</entry> |
| 129 |
<entry>five</entry> |
| 130 |
</row> |
| 131 |
<row> |
| 132 |
<entry colname="three">three</entry> |
| 133 |
<entry morerows="1">five</entry> |
| 134 |
</row> |
| 135 |
<row> |
| 136 |
<entry>one</entry> |
| 137 |
<entry namest="two" nameend="three">two-three</entry> |
| 138 |
</row> |
| 139 |
<row> |
| 140 |
<entry>one</entry> |
| 141 |
<entry namest="two" nameend="three" morerows="1">two-three</entry> |
| 142 |
<entry>five</entry> |
| 143 |
</row> |
| 144 |
<row> |
| 145 |
<entry>one</entry> |
| 146 |
<entry>four</entry> |
| 147 |
<entry>five</entry> |
| 148 |
</row> |
| 149 |
</tbody> |
| 150 |
</tgroup> |
| 151 |
</informaltable> |
| 152 |
|
| 153 |
</section> <!-- cals-tables-span --> |
| 154 |
|
| 155 |
<section id="cals-tables-sep"> |
| 156 |
<title>Separators</title> |
| 157 |
|
| 158 |
<!-- FIXME: more --> |
| 159 |
<para>Here we just set <sgmltag>colsep</sgmltag> on some |
| 160 |
<sgmltag>entry</sgmltag> elements:</para> |
| 161 |
<informaltable frame="none"> |
| 162 |
<tgroup cols="3"> |
| 163 |
<tbody> |
| 164 |
<row> |
| 165 |
<entry colsep="1">SEP</entry> |
| 166 |
<entry>no</entry> |
| 167 |
<entry>no</entry> |
| 168 |
</row> |
| 169 |
<row> |
| 170 |
<entry>no</entry> |
| 171 |
<entry colsep="1">SEP</entry> |
| 172 |
<entry>no</entry> |
| 173 |
</row> |
| 174 |
</tbody> |
| 175 |
</tgroup> |
| 176 |
</informaltable> |
| 177 |
|
| 178 |
<para>Here we turn column separators on and off with |
| 179 |
<sgmltag>colspec</sgmltag> elements:</para> |
| 180 |
<informaltable frame="none"> |
| 181 |
<tgroup cols="3" colsep="1"> |
| 182 |
<colspec colname="one" colsep="0"/> |
| 183 |
<colspec colname="two" colsep="1"/> |
| 184 |
<colspec colname="three" colsep="0"/> |
| 185 |
<colspec/> |
| 186 |
<tbody> |
| 187 |
<row> |
| 188 |
<entry>no</entry> |
| 189 |
<entry colname="two">SEP</entry> |
| 190 |
<entry>no</entry> |
| 191 |
</row> |
| 192 |
<row> |
| 193 |
<entry namest="one" nameend="two">SEP</entry> |
| 194 |
<entry>no</entry> |
| 195 |
</row> |
| 196 |
<row> |
| 197 |
<entry namest="two" nameend="three">no</entry> |
| 198 |
</row> |
| 199 |
</tbody> |
| 200 |
</tgroup> |
| 201 |
</informaltable> |
| 202 |
|
| 203 |
</section> <!-- cals-tables-sep --> |
| 204 |
|
| 205 |
<section id="cals-tables-frames"> |
| 206 |
<title>Frames</title> |
| 207 |
|
| 208 |
<para>This table has a top frame:</para> |
| 209 |
<informaltable frame="top"> |
| 210 |
<tgroup cols="2"> |
| 211 |
<tbody> |
| 212 |
<row> |
| 213 |
<entry>fe</entry> |
| 214 |
<entry>fi</entry> |
| 215 |
</row> |
| 216 |
<row> |
| 217 |
<entry>fo</entry> |
| 218 |
<entry>fum</entry> |
| 219 |
</row> |
| 220 |
</tbody> |
| 221 |
</tgroup> |
| 222 |
</informaltable> |
| 223 |
|
| 224 |
<para>This table has a bottom frame:</para> |
| 225 |
<informaltable frame="bottom"> |
| 226 |
<tgroup cols="2"> |
| 227 |
<tbody> |
| 228 |
<row> |
| 229 |
<entry>fe</entry> |
| 230 |
<entry>fi</entry> |
| 231 |
</row> |
| 232 |
<row> |
| 233 |
<entry>fo</entry> |
| 234 |
<entry>fum</entry> |
| 235 |
</row> |
| 236 |
</tbody> |
| 237 |
</tgroup> |
| 238 |
</informaltable> |
| 239 |
|
| 240 |
<para>This table has top and bottom frames:</para> |
| 241 |
<informaltable frame="topbot"> |
| 242 |
<tgroup cols="2"> |
| 243 |
<tbody> |
| 244 |
<row> |
| 245 |
<entry>fe</entry> |
| 246 |
<entry>fi</entry> |
| 247 |
</row> |
| 248 |
<row> |
| 249 |
<entry>fo</entry> |
| 250 |
<entry>fum</entry> |
| 251 |
</row> |
| 252 |
</tbody> |
| 253 |
</tgroup> |
| 254 |
</informaltable> |
| 255 |
|
| 256 |
<para>This table has side frames:</para> |
| 257 |
<informaltable frame="sides"> |
| 258 |
<tgroup cols="2"> |
| 259 |
<tbody> |
| 260 |
<row> |
| 261 |
<entry>fe</entry> |
| 262 |
<entry>fi</entry> |
| 263 |
</row> |
| 264 |
<row> |
| 265 |
<entry>fo</entry> |
| 266 |
<entry>fum</entry> |
| 267 |
</row> |
| 268 |
</tbody> |
| 269 |
</tgroup> |
| 270 |
</informaltable> |
| 271 |
|
| 272 |
<para>This table has no frames:</para> |
| 273 |
<informaltable frame="none"> |
| 274 |
<tgroup cols="2"> |
| 275 |
<tbody> |
| 276 |
<row> |
| 277 |
<entry>fe</entry> |
| 278 |
<entry>fi</entry> |
| 279 |
</row> |
| 280 |
<row> |
| 281 |
<entry>fo</entry> |
| 282 |
<entry>fum</entry> |
| 283 |
</row> |
| 284 |
</tbody> |
| 285 |
</tgroup> |
| 286 |
</informaltable> |
| 287 |
|
| 288 |
<para>We default to framing all sides when not specified:</para> |
| 289 |
<informaltable> |
| 290 |
<tgroup cols="2"> |
| 291 |
<tbody> |
| 292 |
<row> |
| 293 |
<entry>fe</entry> |
| 294 |
<entry>fi</entry> |
| 295 |
</row> |
| 296 |
<row> |
| 297 |
<entry>fo</entry> |
| 298 |
<entry>fum</entry> |
| 299 |
</row> |
| 300 |
</tbody> |
| 301 |
</tgroup> |
| 302 |
</informaltable> |
| 303 |
|
| 304 |
</section> <!-- cals-tables-frames --> |
| 305 |
|
| 306 |
<section id="cals-tables-misc"> |
| 307 |
<title>Miscellaneous</title> |
| 308 |
|
| 309 |
<table pgwide="1"> |
| 310 |
<title>Using <sgmltag>pgwide</sgmltag></title> |
| 311 |
<tgroup cols="3"> |
| 312 |
<tbody> |
| 313 |
<row><entry>fe</entry><entry>fi</entry><entry>fo</entry></row> |
| 314 |
<row><entry>fum</entry><entry>fe</entry><entry>fi</entry></row> |
| 315 |
<row><entry>fo</entry><entry>fum</entry><entry>fe</entry></row> |
| 316 |
<row><entry>fi</entry><entry>fo</entry><entry>fum</entry></row> |
| 317 |
</tbody> |
| 318 |
</tgroup> |
| 319 |
</table> |
| 320 |
|
| 321 |
</section> <!-- cals-tables-misc --> |
| 322 |
</chapter> <!-- cals-tables --> |