Skip to main content

Module parameter

Module parameter 

Source
Expand description

The abstraction layer used by the Gullet to read arguments for the various kinds of TeX object definitions

Structs§

Parameter
Parameters
TestoptCall
A command with an optional argument is \@protected@testopt\cs\\cs{<default>} in LaTeX (latex.ltx:1245-1257 \@xargdef; twoopt.sty:51-55; xargs.sty:205-212, whose head is \@protected@testopt@xargs where an argument after the first is optional). Ours reads its arguments itself, and Expandable::testopt_call makes this call, the default its parameter’s, only once head is no longer kernel, the copy its definer saved (hyperref.sty:548-549 in a PDF string).

Constants§

BETWEEN_ALIGNMENT_ROWS
TeX’s treatment of a tail dropped between the rows of an alignment.
IN_EVERY_CELL
TeX’s treatment of a column type’s tail.
KEEP_STATED_LENGTHS
The state value that asks a constructor to keep the tokens its braced or bracketed typed arguments state ({Dimension}, [TempboxaDimension], {SetlengthDimension}, …) on its whatsit (STATED_LENGTHS), and a KeyVals the tokens of its typed length values (KeyVals::stated_entry): what the source states, which a reader may evaluate again under other register values (latexml_engine’s panel rows, a float’s panels set against the class’s real line; OXIDIZED_DESIGN_DIVERGENCES #885). Assigned in a group (a float’s), so it ends with it.
STATED_LENGTHS
The whatsit property holding the tokens its typed arguments state (KEEP_STATED_LENGTHS): a Stored::VecDequeStored aligned with the whatsit’s arguments, Stored::Tokens for a kept one, else Stored::None.
STATED_LENGTHS_WITHHELD
The whatsit property marking a constructor whose length arguments’ tokens were withheld (WITHHOLD_STATED_LENGTHS): it states none.
WITHHOLD_STATED_LENGTHS
The state value with which a binding that sizes a box of its own accord withholds the tokens of the lengths it gives a constructor (KEEP_STATED_LENGTHS off in its group; latexml_engine’s \lx@panel@unstated, subcaption’s \subfloat): the source states no such length, which differs from one given where none are kept (a box built outside a float). Assigned in a group, so it ends with it.

Functions§

drop_argument_tail
Drop tail, the rest of an argument of cs that has no place to go, with the warning ArgumentTails gives when it holds more than spaces and \relax.
dropping_argument_tails
Where a handed-back tail would be misread, so invoke runs with the tails its commands leave DROPPED, and warned about, why naming what TeX does with the text:
in_braced_read
Whether a parameter reader runs on a braced argument’s own mouth (read_braced), where the rest of the current mouth is the rest of that argument (DefaultUnits, base_parameter_types.rs).
read_braced
Read a value from a braced argument’s tokens, in a mouth of their own, and return it with the argument’s TAIL: whatever read left unread — what an expanding scan looked ahead at and put back, and the rest of the argument. Perl readingFromMouth (Gullet.pm:108-146) drops the tail; TeX has never seen braces here and leaves it in the input, so every caller hands it back (ArgumentTails, or read_braced_value’s callers).
read_braced_value
Read a kind value from a braced argument’s tokens the way LaTeX’s assignments scan it — \setlength#1#2{#1 #2\relax}, \addtolength, \setcounter, \addtocounter (latex.ltx:10253-10254, 10115-10122): by the register’s own type, a length through calc when it is loaded (see gullet::BracedLengthFn). Returns the value and the argument’s tail; the caller assigns, then puts the tail back (gullet::unread_vec) — exactly where TeX leaves it, after the assignment.
read_length_value
A register value of type kind from the current mouth, as read_braced_value reads one: a length through calc’s evaluator when calc is loaded (gullet::braced_length_evaluator), else by TeX’s scan for the type.
read_through_redefined_setlength
A SetlengthDimension/SetlengthGlue argument is the operand latex.ltx hands to \setlength (see gullet::BracedLengthFn), so a package that redefines \setlength as a macro changes how it reads. bxcalcux.sty’s \bxcx@decl@patch\setlength parses custom units (\newcalcunit{tm}{0.05em} makes \hspace{6tm} 3pt; bxcalc manual), and pgf’s pictures swap in \pgf@setlength (pgfcorescopes.code.tex:238-242, 311-317). Then the length is assigned as latex.ltx assigns it, \setlength<register>{<argument>} digested (\@hspace, latex.ltx:9425; a dimen register for a Dimension, as \@tempdima is, so a scan stops before plus), and the register read back. Whatever the assignment left in the input is typeset there, before the command’s own output, as TeX typesets it for the boxes and \hspace; for \\[..] TeX typesets it after the break (inside \vadjust, latex.ltx:9260). None when \setlength is a primitive (the kernel’s or calc’s binding) or is undefined (plain TeX: the registers are LaTeX-only). OXIDIZED_DESIGN #325.
within_tempboxa
latex.ltx’s \@begin@tempboxa … \@end@tempboxa (16085-16094) around a box command’s size arguments: in a group, \@tempboxa holds content and \width/\height/\depth/\totalheight measure it (\lx@tempboxa@sizes, latex.ltx:16088-16093; internal dimensions, so -.5\height is exact to the sp, tex.web §455), then evaluate reads the sizes. Without \@tempboxa (plain TeX) evaluate runs unbound.

Type Aliases§

DigestedReversionClosure
A reversion closure that operates on the original Digested argument, enabling access to structured data (e.g., KeyVals) for custom reversion formatting. Perl equivalent: the reversion option on DefParameterType, which receives the raw value.
ReaderClosure
ReaderFn
ReaderPredigestClosure
ReaderPredigestFn
ReversionClosure