A PDF/UA examples, LT X Companion tabulars E
Tagged tabulars from TLC2
11 A The LT X Companion, 2nd edition; Frank Mittelbach and Michel Goossens with others. E
There needs to be a title at level H1, for PDF/UA-compliance.
Ross Moore
July 2022
Tagged tabulars from Chapter 5
Alignment using preamble commands
§5-2-1
| A | B | C |
|---|---|---|
| 100 | 10 | 1 |
| A | B | C |
|---|---|---|
| 100 | 10 | 1 |
| 100 | 10 | 1 |
|---|---|---|
| A | B | C |
Checking alignments:
§5-2-3
| 1 1 1 1 1 1 1 1 1 1 1 1 | 2 2 2 2 2 2 2 2 | 3 3 3 3 |
|---|
| 1 1 1 1 1 1 1 1 1 1 1 1 | 2 2 2 2 2 2 2 2 | 3 3 3 3 |
|---|
§5-2-5
| 1 1 1 1 1 1 1 1 1 1 1 1 | 2 2 2 2 2 2 2 2 | 3 3 3 3 |
|---|
| one | two | three |
|---|---|---|
| 1 | 2 | 3 |
Using array package features: §5-2-6
| 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 | 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 |
|---|
| 10! 10! | a big number |
|---|---|
| −999 10 | a small number |
§5-2-9
| Super- con- scious- ness is a long word | Possibil- ités et es- pérances | Moge- lijkheden en hoop |
|---|---|---|
| Ragged left text in column one | Centered text in column two | Ragged right text in column three |
| Super- con- scious- ness is a long word | Possibil- ités et es- pérances | Moge- lijkheden en hoop |
|---|---|---|
| Ragged left text in column one | Centered text in column two | Ragged right text in column three |
§5-2-10 Place between-column stuff as an artifact; e.g.
\begingroup \def\this{\pdfArtifact{Page}{--}} \begin{tabular}{c@{}c!{}c@{\this}c!{\this}c} one&two&three&four&five\\ 1&2&3&4&5 \end{tabular}% \endgroup
| one | two | three | four | five |
|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 |
§5-2-11 text text text text
| one | two |
|---|---|
| three | four |
| one | two |
|---|---|
| three | four |
Colour in tabular material.
§5-5-1 & §5-5-2
| Day | Attendance |
|---|---|
| Monday | 57 |
| Tuesday | 11 |
| Wednesday | 96 |
| Thursday | 122 |
| Friday | 210 |
| Saturday | 198 |
| Sunday | 40 |
| Day | Attendance |
|---|---|
| Monday | 57 |
| Tuesday | 11 |
| Wednesday | 96 |
| Thursday | 122 |
| Friday | 210 |
| Saturday | 198 |
| Sunday | 40 |
| Total | 724 |
| Day | Attendance |
|---|---|
| Monday | 57 |
| Tuesday | 11 |
| Wednesday | 96 |
| Thursday | 122 |
| Friday | 210 |
| Saturday | 198 |
| Sunday | 40 |
| Total | 724 |
§5-6-1
| A | B | C |
|---|---|---|
| X | Y | Z |
| 100 | 10 | 1 |
| A | B | C |
|---|---|---|
| X | Y | Z |
| 100 | 10 | 1 |
| a | b | c | d | |
|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |
| i | j | k | l | ? |
| w | x | y | z |
Packages arydshln and tabls change crucial internal commands; tagging not yet supported
Formal tables
With booktabs package: §5-6-7 & §5-6-8
| Item | Price/lb | |
|---|---|---|
| Food | Category | $ |
| Apples | Fruit | 1.50 |
| Oranges | Fruit | 2.00 |
| Beef | Meat | 4.50 |
| Item | Price/lb | |
|---|---|---|
| a | b | c |
| Food | Category | $ |
| Apples | Fruit | 1.50 |
| Oranges | Fruit | 2.00 |
| Beef | Meat | 4.50 |
| x | y | z |
§5-7-1
| qqq | ||
|---|---|---|
| 100 | A | B |
| 20000000 | 10 | 10 |
§5-7-2 While this works it is not recommended, as it does not properly present the data, being broken-up into different cells.
\begingroup \def\this{\pdfArtifact{Page}{.}} \begin{tabular}{r@{\this}l} 1 & 2 \\ 1 & 23 \\ 913 & 17 \end{tabular} \endgroup
| 1 | 2 |
|---|---|
| 1 | 23 |
| 913 | 17 |
Using multirow for vertical alignment
§5-7-3
| Text in column 1 | C2a | Text in column 3 | C4a |
|---|---|---|---|
| C2b | C4b | ||
| C2c | C4c | ||
| C2d | C4d |
| 100 | qqq | |
|---|---|---|
| A | B | |
| 20000000 | 10 | 10 |
§5-7-5
| Common text in column 1 | Cell 1a |
|---|---|
| Cell 1b | |
| Cell 1c | |
| Cell 1d | |
| Common text in column 1 | Cell 2a |
| Cell 2b | |
| Cell 2c | |
| Cell 2d | |
| Common text in column 1 | Cell 3a |
| Cell 3b | |
| Cell 3c | |
| Cell 3d |
| Common text in column 1 | Cell 1a |
|---|---|
| Cell 1b | |
| Cell 1c | |
| Cell 1d | |
| Common text in column 1 | Cell 2a |
| Cell 2b | |
| Cell 2c | |
| Cell 2d | |
| Common text in column 1 | Cell 3a |
| Cell 3b | |
| Cell 3c | |
| Cell 3d |
| Common text in column 1 | Cell 1a | Cell 1A |
|---|---|---|
| Cell 1b | Cell 1B | |
| Cell 1c | Cell 1C | |
| Cell 1d | Cell 1D | |
| Common text in column 1 | Cell 2a | Cell 2A |
| Cell 2b | Cell 2B | |
| Cell 2c | Cell 2C | |
| Cell 2d | Cell 2D | |
| Common text in column 1 | Cell 3a | Cell 3A |
| Cell 3b | Cell 3B | |
| Cell 3c | Cell 3C | |
| Cell 3d | Cell 3D |
Using dcolumn for column alignment
§5-7-6
| 1·2 | 1·2 | 1.2 | 1,2 |
|---|---|---|---|
| 1·23 | 1·23 | 12.5 | 300,2 |
| 1121·2 | 1121·2 | 861.20 | 674,29 |
| 184 | 184 | 10 | 69 |
| ·4 | ·4 | ,4 | |
| .4 |
§5-7-7
| wide heading | wide heading | wide heading |
|---|---|---|
| 1000.20 | 1000.20 | 1000.20 |
| 123.45 | 123.45 | 123.45 |
§5-7-8
| GG&A Hoofed Stock | |||
|---|---|---|---|
| Price | |||
| Year | low–high | Comments | Other |
| 1971 | 97–245 | Bad year for farmers in the West. | 23,45 |
| 72 | 245–245 | Light trading due to a heavy winter. | 435,23 |
| 73 | 245–2001 | No gnus was very good gnus this year. | 387,56 |