|
Table primitives |
|
Operator |
Arity |
Accessible |
|
Process |
Usage |
|
|
border |
children |
|
|
tformat |
n + 1 |
No |
Last |
Typesetting |
Logical |
twith |
2 |
Yes |
All |
Display |
Physical |
cwith |
6 |
Yes |
All |
Display |
Physical |
table |
n>0 |
No |
All |
Typesetting |
Logical |
row |
n>0 |
No |
All |
Typesetting |
Logical |
cell |
1 |
No |
All |
Typesetting |
Logical |
subtable |
1 |
No |
All |
Typesetting |
Logical |
tmarker |
0 |
Yes |
- |
Display |
Physical |
|
|
Table 1. Table primitives
|
Tables are always present in documents inside evaluable tags which take
a tformat operand. All
fundamental table structures have inaccessible borders. The basic
top-level table tag is tabular.
(table formatting container)
Every tabular structure in a document contains a tformat tag.
means the table and cell variables defined in the top-level table
tag are not modified. The table
argument may be a table
or a nested tformat tag,
the latter does not appear in documents but is produced by the
evaluation of the top-level tag.
is used when the table contains specific formatting
information. The with-1 to with-n
arguments must all be twith
or cwith tags.
(set a table variable)
The formatting of the table as a whole is specified by a number of
table variables, which are used internally and do not
appear in the environment like regular typesetter variables.
The twith
primitive sets the table variable var
(literal string) to the value val
(evaluated).
(set a cell variable for a
range)
The formatting of cells is specified by a number of cell
variables, which are used internally and do not appear in the
environment like regular typesetter variables. Rows, columns, and
generally any rectangular range of cells can associated to a cell
variable setting by a single cwith
tag.
The cwith primitive sets
the cell variable var (literal string)
to the value val (evaluated) for the
range of cells spanning rows top-row to
bot-row and columns left-col
to right-col (literal non-zero
integers).
Range coordinates must be non-zero literal integers, positive
values are counted left to right and top to bottom, negative
values are counted right to left and bottom to top. For example, 2
means the second row or column and -1 means the last row or
column.
Typical values for (top-row,bot-row,left-col,right-col) are (r,r, - 1,1) for
“row r”, ( - 1,1,c,c) for
“column c”, and
(r,r,c,c) for “the cell at row
r, column c”. Note that, with m is the
number of rows and n the number of columns, r is the
same row as r - m - 1 and c is the same column
as c - n - 1, but the former are relative to the top
and left borders while the latter are relative the bottom and right
borders, this makes a difference when new cells are
inserted.
(row container)
The only purpose of the table
tag is to contain row
tags. The number of rows in a table is the number of subtrees in its
table tag.
(cell container)
The only purpose of the row
tag is to contain cell
tags. All row tags in a
given table must have
exactly as many subtrees, all cell
tags, as there are columns in the table.
(cell data container)
Table cells can contain any document fragment. A cell may directly contain an inline content tag or a concat,
if it has block content it must always contain a document tree.
A
cell whose
operand is a
document is a
multiparagraph cell. Since tables are allowed in
line context
, this is the only construct which allows,
indirectly, the nesting of a block context
within a line
context
. Note that most block content can only be typeset
correctly within an hyphenated cell, this is controlled by the
cell-hyphen table variable.
(subtable cell data)
In addition to regular markup, cells can accept subtable
as an operand. The operand of subtable
is a tformat tree
containing regular table data.
A similar effect can be obtained with normal table by
setting the cell's padding to zero in all directions, the extra
twist of a subtable is its
inaccessible border positions.
(decoration origin marker)
This tag is used in the definition of cell decorations, see the
documentation of the cell-decoration
environment variable.
It is also used outside tables, in the switch tag to mark the currently displayed
position.
© 2004 David Allouche
Permission is
granted to copy, distribute and/or modify this document under the terms of
the GNU Free Documentation License, Version 1.1 or any later version
published by the Free Software Foundation; with no Invariant Sections,
with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the
license is included in the section entitled "GNU Free Documentation
License".