Next: U Previous: SUP Contents: Contents |
\TABLE opens a table, \END_TABLE closes it.
Syntax
\TABLE{options}...\END_TABLE
Options
There are several options of two categories. All options in the following table are supported by all converters. Additionally, there can be converter specific options only recognized by certain converters.
option | description |
separator | a string separating the table columns (can contain more than one character) |
rowseparator | a string separating the table rows (can contain more than one character) |
gracecr | usually set correctly by default, this specifies the number of row separators to be ignored before they are treated as separators - which usually allows to start the table contents in a subsequent line after the line containing the \TABLE tag |
Body
Both tags have no bodies. Used bodies will not be recognized as tag bodies but as plain text following a tag.
Different to most other tags, \TABLE
only opens a new document part. The table has to be closed by \END_TABLE
explicitly.
Discussion
These tags are sligthly more powerfull than the table paragraph syntax: you can set up several table features like the border width yourself, and you can format the headlines as you like.
The usual usage is
\TABLE{separator="|"} \B<column 1> | \B<column 2> | \B<column 3> aaaa | bbbb | cccc uuuu | vvvv | wwww \END_TABLE |
The separator
option is even optional because columns are separated by "|" by default. So you could write
\TABLE \B<column 1> | \B<column 2> | \B<column 3> aaaa | bbbb | cccc uuuu | vvvv | wwww \END_TABLE |
as well.
Inlining
By default, all enclosed lines are evaluated as table rows, which means that each source line between \TABLE
and \END_TABLE
is treated as a table row. Alternatively, PerlPoint allows you to separate rows by a string of your own choice using option rowseparator
. This allows to specify a table inlined into a paragraph.
\TABLE{bg=blue separator="|" border=2 rowseparator="+++"} \B<column 1> | \B<column 2> | \B<column 3> +++ aaaa | bbbb | cccc +++ uuuu | vvvv| wwww \END_TABLE |
This is exactly the same table as in the example section above.
Nesting
Inlining tables enables us to nest them as well. In fact, it depends on the converter features if this feature is enabled, it is blocked by default because there might be target languages which do not support table nesting.
Nested tables look like this:
\TABLE{rowseparator="+++"} column 1 | column 2 | \TABLE{rowseparator="%%%"} n1 | n2 %%% n3 | n4 \END_TABLE +++ xxxx | yyyy | zzzzz +++ uuuu | vvvv | wwwww \END_TABLE |
Trimming
Similar to table paragraphs, leading and trailing whitespaces of a cell are automatically removed, so you can use as many of them as you want to improve the readability of your source.
Normalization
Tables are normalized automatically, which means that all table rows will be provided with the same number of columns as the first table row (or "table headline").
Notes
\TABLE is supported by all PerlPoint translators.
Examples
See discussion above.
See also
More basic set tags: B, C, EMBED, FORMAT, HIDE, I, IMAGE, INCLUDE, LOCALTOC, READY, REF, SEQ and STOP.
Next: U Previous: SUP Contents: Contents |