Skip to main content

Module alignment

Module alignment 

Source
Expand description

Support for TeX-like Alignments

§Representation of aligned structures

An “Alignment” is an array/tabular construct as: <tabular><tr><td>... or, for math mode <XMArray><XMRow><XMCell>... (where initially, each XMCell will contain an XMArg to indicate individual parsing of each cell’s content is desired)

An Alignment object is a sort of fake Whatsit; It takes some magic to sneak it into the Digestion stream (see TeX.pool \lx@begin@alignment), but it needs to be created BEFORE the contents of the alignment are digested, since we stuff a lot of information into it (row, column boxes, borders, spacing, etc…) But once it has been captured, it should otherwise act like a Whatsit and be responsible for construction (be_absorbed), and sizing estimation (computeSize)

Ultimately, this should be better tied into DefConstructor because an Alignment currently doesn’t know what CS created it (debugging!); Also, it would better connect the things being constructed, reversion, etc.

Modules§

cell
template
Support for tabular/array environments

Structs§

Alignment
AlignmentConfig

Enums§

RowDisposition
What becomes of the row being built at its end, asked by a binding from inside the row (longtable’s \kill, its \caption’s row); the alignment carries it so a nested one cannot take it.

Constants§

ALIGNMENT_IS_DISPLAY
The alignment property of an alignment that is a display by itself in TeX, $$\halign…$$: amsmath’s align and gather families (amsmath.sty \start@align, \start@gather), latex.ltx’s eqnarray and IEEEtrantools’ IEEEeqnarray (IEEEtrantools.sty:2013). Not cases.sty’s numcases, whose \halign is inside a \vbox (cases.sty:73-75). amsmath’s multline is a display too but is not marked: its material is kept in the formula (TeX: “Improper \halign inside $$’s”), the safe direction. Set by the bindings (latexml_engine::tex_tables).
RULE_COLOR
The colour of the horizontal rule being drawn, as colortbl’s \CT@arc@ gives it (colortbl.sty:166-192): set by the binding in the rule’s group, taken by Alignment::add_line.

Functions§

declare_column_rule_token
Declares cs a token of a column rule, which the template scans skip as they skip \vrule.
is_column_rule_token
Whether a column template token draws (or paints) a column rule the cell-edge scan strips: \vrule or a token a binding declared (declare_column_rule_token).
matrix_template
parse_alignment_template
read_alignment_template
a reader for the Template parameter type
take_rule_color
Takes the colour RULE_COLOR holds for the rule being drawn (None: the default ink).

Type Aliases§

CloseColumnFn
CloseContainerFn
CloseRowFn
OpenColumnFn
OpenContainerFn
OpenRowFn