Skip to main content

Module dialect

Module dialect 

Source

Structs§

HookStore
The slots lthooks keeps a hook’s code in, named once (a hook read at every \selectfont keeps its own).
RegisterOptions
configuration for creating a new Register

Enums§

MathPresentation
A DefMath presentation, Perl DefMathI’s $presentation: TeX source text, tokenized at definition, or the tokens a binding built (amsopn’s Invocation(T_CS('\operatorname'), $star, $text)), which keep their catcodes and are dispatched on them (Package.pm:1650-1661).

Constants§

END_HOOKS_RAN
Marks the frame of an environment whose \end hooks ran before its end constructor (stomach.rs end_command_form_before_enclosing_end).

Statics§

ARG_HOLE
regex for the usual argument placeholders #1-#9
CONDITIONAL_CS_RE
regex for the prefix of a conditional command sequence
DIRTY_ID_IDIOM_RE
regex for ${}^{label}$
HAS_ARG_OR_CS
regex for a TeX argument specifier or any command sequence
LEADING_PROTOCOL_RE
regex for the prefix of a protocol (such as literal:)
NON_ID_CHARSET_RE
regex for characters not expected in a usual id attribute
SPACES_RE
regex for one-or-more spaces
TILDE_NOISE_RE
regex for a strange noisy TeX \\~{}
TRAILING_SLASH_RE
regex for a trailing slash (trivial, but aids replacement of said slash)

Functions§

allocate_register
def_conditional
Define a conditional control sequence.
def_constructor
Binding definition connecting a TeX command sequence with a structured XML output.
def_environment
Defines an Environment that generates a specific XML fragment.
def_macro
Defines the macro expansion for a command sequence.
def_math
Define a Mathematical symbol or function.
def_math_constructor
Uses of DefMath without arguments, but with constructor-like options, are realized via a Constructor definition
def_math_dual
Advanced math replacements require a XMDual representation
def_math_primitive
EXPERIMENT: Introduce an intermediate case for simple symbols Define a primitive that will create a Tbox with the appropriate set of XMTok attributes.
def_math_wrapped
Perl defmath_wrapped (Package.pm:1786-1813): no arguments, but a presentation naming control sequences. \cs expands to \cs@wrapper{\cs@presentation}, the presentation macro holds the tokens as given, and the wrapper constructor puts their digested form in an XMWrap carrying the DefMath’s attributes (name, meaning, role, scriptpos, stretchy, …), which the math parser moves onto the parsed content (MathParser.pm:333-360, parser.rs). It reverts as its argument, or as \cs in a dual’s content branch.
def_primitive
Defines a primitive control sequence
def_register
Defines a register with an initial value.
dualize_arglist
Flesh out two dual (mathematical) forms of a given list of arguments.
env_hook_has_code
latex.ltx:15386 fires env/#1/end only \IfHookEmptyTF-guarded (an empty hook must contribute nothing inside an alignment’s last cell): the kernel’s own predicate, hook_has_code.
environment_end_hooks
\end{name}’s hooks: the pre-\AddToHook \AtEndEnvironment store (@environment@name@atend, filled by bindings: deluxetable’s table end), then \UseHook{env/name/end} (latex.ltx:15386-15388) when it has code. end_hook is that invocation if the caller built it already.
get_xmarg_id
hook_has_code
Whether the kernel hook hook holds code: HookStore::has_code. Checks l3_hooks_loaded() first and probes with non-interning Token::try_cs so checking an empty/undeclared hook never permanently interns 3 SymStrs.
hook_has_labelled_code
Whether hook holds a chunk labelled label: lthooks keeps labelled code in a flat prop (\prop_if_in:cnTF, latex.ltx:5544), each entry \__prop_pair:wn <label> \s__prop {<code>} (expl3-code.tex:9873).
hook_slot_has_code
lthooks’ \__hook_cs_if_empty:cF (latex.ltx:5688-5699): cs is a macro with a non-empty body.
hook_use_tokens
The tokens running the kernel hook hook as \UseHook (or, once, \UseOneTimeHook) does, or none when it has no code: an empty \UseHook does nothing; an empty one-time hook only marks itself used (\__hook_use_once_set:n, latex.ltx:6399-6411, so later code runs at once), which an already used one needs not. Not kept: the clear code \__hook_use_once:nn leaves in an undeclared hook’s next slot, which only \IfHookEmptyTF on it would see.
is_definable
Check if the token is not yet defined, or let to \relax
is_defined
Is defined in the LaTeX-y sense of also not being let to \relax.
is_defined_token
Token variant of is_defined. Defined in the LaTeX-y sense of also not being let to \relax.
set_currenvir
\begin’s TeX record of the environment it opens, in its group: latex.ltx:15349-15351 \def\@currenvir{#1} \edef\@currenvline{\on@line}. Perl (Package.pm:1927, latex_constructs.pool.ltxml:186-188) leaves \@currenvline \@empty, so \@badend and a hook read no line (OXIDIZED_DESIGN_DIVERGENCES #1242).