pub struct Template {
pub tokens: Vec<Token>,
pub top_padding: Option<Dimension>,
pub bottom_padding: Option<Dimension>,
pub before: VecDeque<Digested>,
pub after: VecDeque<Digested>,
pub cached_width: Option<Dimension>,
pub cached_height: Option<Dimension>,
pub cached_depth: Option<Dimension>,
pub x: Option<Dimension>,
pub y: Option<Dimension>,
pub properties: FxHashMap<String, Stored>,
/* private fields */
}Fields§
§tokens: Vec<Token>§top_padding: Option<Dimension>§bottom_padding: Option<Dimension>§before: VecDeque<Digested>§after: VecDeque<Digested>§cached_width: Option<Dimension>§cached_height: Option<Dimension>§cached_depth: Option<Dimension>§x: Option<Dimension>§y: Option<Dimension>§properties: FxHashMap<String, Stored>Per-row properties (e.g. xml:id, tags) set during digestion and consumed during construction. Perl: $$row{id}, $$row{tags}. Uses Stored to preserve typed values (esp. Digested for tags).
Implementations§
Source§impl Template
impl Template
pub fn new(config: TemplateConfig) -> Self
pub fn set_reversion(&mut self, tks: Tokens)
pub fn set_repeating(&mut self)
Sourcepub fn repeat_past_columns(&mut self, cell: Cell)
pub fn repeat_past_columns(&mut self, cell: Cell)
Repeats cell past the template’s own columns, as a preamble whose repeating part (tex.web §793: what follows
&&) is that one column: a row may hold more cells than the template has columns, and those get cell.
pub fn set_padding(&mut self, d: Dimension)
pub fn get_padding(&self) -> Option<&Dimension>
Sourcepub fn disable_intercolumn(&mut self)
pub fn disable_intercolumn(&mut self)
Perl Template.pm L76-80: disableIntercolumn
Only sets the flag when there is a current column.
Perl: if (my $col = $$self{current_column}) { $$self{disabled_intercolumn} = 1; }
Sourcepub fn finish(&mut self)
pub fn finish(&mut self)
Perl Template.pm L113-118: finish Appends \lx@intercol to last column’s after unless disabled_intercolumn
Sourcepub fn has_pending_prefix(&self) -> bool
pub fn has_pending_prefix(&self) -> bool
Whether a >{…} prefix waits for the next column (add_column puts it after that column’s own before,
followed by \ignorespaces).
pub fn add_before_column(&mut self, new: VecDeque<Token>)
pub fn add_after_column(&mut self, new: Vec<Token>)
pub fn add_between_column(&mut self, tokens: Vec<Token>)
pub fn add_column(&mut self, col: Cell)
pub fn get_column_mut(&mut self, n: usize) -> Option<&mut Cell>
pub fn get_columns(&self) -> &[Cell]
pub fn get_columns_mut(&mut self) -> &mut Vec<Cell>
pub fn get_repeated_mut(&mut self) -> &mut Vec<Cell>
pub fn set_pseudo(&mut self)
pub fn unset_pseudo(&mut self)
pub fn is_pseudo(&self) -> bool
Whether this equation row carries tags its author set. \lx@equation@settag (amsmath’s \tag, \TCItag,
AAS’s \eqnum, …) first retracts the row’s own number — EQUATIONROW_TAGS becomes {id, reset} — and then
stores the given tags; the after-row step (latex_constructs after_equation) copies those properties onto the
row. An auto-numbered row has tags without reset, a \nonumber row reset without tags. A tagged row is
never empty: its tag is its content (OXIDIZED_DESIGN_DIVERGENCES #591, KNOWN_PERL_ERRORS #682).