Expand description
The abstraction layer used by the Gullet to read arguments for the various kinds of TeX object definitions
Structs§
- Parameter
- Parameters
- Testopt
Call - 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, whoseheadis\@protected@testopt@xargswhere an argument after the first is optional). Ours reads its arguments itself, andExpandable::testopt_callmakes this call, the default its parameter’s, only onceheadis no longerkernel, 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 aKeyValsthe 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): aStored::VecDequeStoredaligned with the whatsit’s arguments,Stored::Tokensfor a kept one, elseStored::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_LENGTHSoff 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 ofcsthat has no place to go, with the warningArgumentTailsgives when it holds more than spaces and\relax. - dropping_
argument_ tails - Where a handed-back tail would be misread, so
invokeruns with the tails its commands leave DROPPED, and warned about,whynaming 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: whateverreadleft unread — what an expanding scan looked ahead at and put back, and the rest of the argument. PerlreadingFromMouth(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, orread_braced_value’s callers). - read_
braced_ value - Read a
kindvalue from a braced argument’stokensthe 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 (seegullet::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
kindfrom the current mouth, asread_braced_valuereads 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/SetlengthGlueargument is the operand latex.ltx hands to\setlength(seegullet::BracedLengthFn), so a package that redefines\setlengthas a macro changes how it reads. bxcalcux.sty’s\bxcx@decl@patch\setlengthparses 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 aDimension, as\@tempdimais, so a scan stops beforeplus), 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).Nonewhen\setlengthis 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,\@tempboxaholdscontentand\width/\height/\depth/\totalheightmeasure it (\lx@tempboxa@sizes, latex.ltx:16088-16093; internal dimensions, so-.5\heightis exact to the sp, tex.web §455), thenevaluatereads the sizes. Without\@tempboxa(plain TeX)evaluateruns unbound.
Type Aliases§
- Digested
Reversion Closure - 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
reversionoption on DefParameterType, which receives the raw value. - Reader
Closure - Reader
Fn - Reader
Predigest Closure - Reader
Predigest Fn - Reversion
Closure