Expand description
A global, singleton, mutable state - hosts almost all TeX-facing runtime information for the conversion
Re-exports§
pub use crate::common::store::Stored;pub use crate::common::local_assignments::*;
Structs§
- Assignment
Count - Ledger for stacked assignments: how many bindings of each key a frame made (Perl’s
$$frame{$table}{$key}). - Assignment
Journal - The bindings of every key assigned since an assignment journal began (
begin_assignment_journal), as they were then: taken at the key’s first assignment after, the key’s values in its table and its assignment counts in each frame then open (by the frame’s id), so thatAssignmentJournalGuard::rollbackcan put them back. A key’s first assignment is the first time anything touches it, so the frames opened since hold none of it. - Assignment
Journal Guard - The open assignment journal (
begin_assignment_journal). - Class
Load Frame - RAII frame of one class load (
binding::content::input_definitions, a.clswith its options handled: the\documentclass, a\LoadClass, a binding’sLoadClass!). While it is open, the macros assigned outside LaTeXML’s kernel layers — the class binding’s own (article.cls’s names, article_cls.rs), the raw file’s, a package’s it loads — and the names a lock kept from a definition it made are recorded as the class’s (State::class_loads), as its real file defines them; a repeat load records nothing new. A load a stand-in’s copy requests (copy: its own\LoadClass, or a class loaded while that one is open) also names the class among the copy’s base classes (CopyProvidesRecord::loads_classes), whose names its\newcommandfinds defined (copy_provides_text_default_clashes): chained\LoadClass{mybase}over article (the reviewer’s probe nc_chain). - Class
Load Record - One class loaded (
ClassLoadFrame): its file name (article.cls), the names its load frame assigned a macro (the macro itself, to tell it is still the meaning: compared byRc::ptr_eq) or had a definition refused by a lock (None), and the classes loaded while its frame was open, innermost included (a binding’sLoadClass!of its base class: ceurart_cls.rs → OmniBus → article). - Copy
Provides Frame - One frame of a stand-in copy’s provides-mode (
enter_copy_provides_frame): the copy (0: a suspension), whether it repeats the frame in force (a hook chunk wrapped twice), and the names whose meanings its code replaced, with the meanings kept aside. - Copy
Provides Record - What
note_copy_provides_assignmentkeeps for one stand-in’s copy: the copy’s file, its own definitions of names the binding owns (in force only inside its code), and the names and deferring seams logged. - Document
Argument - An argument a
DocumentCallread. - Document
Call - A call of one of LaTeXML’s own macros (a binding’s or the kernel’s) that read its arguments from the document’s own
text (
note_document_call): the title-page check’s second source. - Document
State - A binding’s document-wide state, one value of the Value table: bound globally, as the
\globalmacros and registers of the package it stands for are, so a rollback (begin_assignment_journal: a rehearsal, a title-page check) puts it back, where a thread-local would keep what the discarded run did (FRONTMATTER_SINGLE_ENGINE_PLAN.md“What a rollback leaves”). It changes in place, unless an open journal holds it: the first change under a journal works on a copy, so a list a binding grows costs no more than a thread-local’s outside one. - Dropped
Argument - An argument a macro dropped, which the title-page check digests itself (
note_dropped_argument; latexml_enginetitle_page_check::never_digested). - Meaning
Assigned - A meaning assigned in the meaning log (
begin_meaning_log). - Meaning
Watch - A selection of names for
watch_meanings. Asked of every assignment a document or a raw file makes, so the bytes after a name’s backslash thatselectcan take are the only cost of any other name: 1 of 3 at the second, one at the third. - State
- The state efficiently bookkeeps the bindings in a TeX-like fashion.
- State
Options - state fields allowed for customization during construction
- Store
Call - A call of a setter a raw class or a raw file of the document’s own directory made (
note_store_call). - Store
Calls - What
take_store_callsgives: the setter calls kept, and what the bound left out. - TopFrame
Keys - The keys bound at the topmost frame for the Meaning and Value tables, taken before an autoloaded package loads,
and the meaning recorder (
begin_meaning_recorder) open over the load; seehoist_top_frame_package_load, which closes it (as dropping it does: a load that fails). - Undo
Frame - For each of several tables (being “value”, “meaning”, “catcode” or other space of names), each table maintains the bound values, and “undo” defines the stack frames
Enums§
- Catcodes
- High-level catcode profiles
- Figure
Output Cue - What the figures a source includes say of its output mode (the K6 ruling’s figure cue,
OXIDIZED_DESIGN_DIVERGENCES #537): read from the
\includegraphics-family targets the main file and the files it inputs name, resolved against the source tree, and from a pstricks load. - Scope
- installation scope in the state_tables
- Table
Name - the kinds of tables bookkept in the State
- Watched
Name - What
watch_meanings’ selection says of a name.
Constants§
- BRACED_
ARGUMENT_ TYPES - The parameter types that read one TeX argument, a braced group (
read_arg/read_balanced, base_parameter_types.rs): a binding whose first mandatory parameter is one of them takes a braced argument (owns_calls). - CLASS_
HAS_ CHAPTERS - The value
class_defines_chapterreads once the document’s class has loaded. - COPY_
TEXT_ NAMES - The text names a stand-in’s copy may supply over its binding, the kernel’s default (OXIDIZED_DESIGN_DIVERGENCES
#731 rules 13 and 14; user ruling 2026-10-21: “the bindings should always win in terms of semantic markup … the
slight typographic variations in the raw .cls or .sty file … if we can preserve and reuse them that should be via
a generic mechanism that is set in the binding with a reasonable default”): the standard classes’ and LaTeX’s
\…namemacros, the word a heading or a label prints — aip-cp.cls:875\newcommand\refname{REFERENCES}(1506.04050, 1604.08112), the AASTeX 6+ copies’\def\abstractname{ABSTRACT}(2107.03400), proto.cls:798\def\abstractname{~}(1402.7103). A binding extends it with its own (declare_copy_text_names). Everything else a binding defines is its markup of the class, and the copy’s version of it is declined: caption formats (\fnum@<type>, whose punctuation met the binding’s caption separator, “Fig. 1.—.— “ in 1106.2565), the caption separator,\@thmcountersep(1803.06644’s “Theorem 51”),\the<ctr>,\p@<ctr>,\the<ctr>@ID, list labels (\labelitemi),\today,\baselinestretch,\CurrentOption, every\lx@name, structure. - REFUSAL_
RECORD_ SUFFIXES - The per-name records of a lock’s refusal of
\<name>(after:redefined,note_redefined,install_definition): what a replay or a locked binding reads of the class’s definition (OXIDIZED_DESIGN #482). - STORE_
CALLS_ KEPT - The most setter calls kept (
note_store_call): a document whose own style’s setter is called thousands of times before its title page keeps the first ones; what the check digests stays bounded.
Statics§
- UNITS
- Used in conversion to scaled points.
Functions§
- absorb_
limit - Perl
$LaTeXML::ABSORB_LIMIT: the runaway ceiling on absorbed boxes (0= unlimited), set bylatexml.sty’sabsorblimitoption. - activate_
scope - Activates all stashed definitions for the named scope. No-op if the scope is already active.
- add_
binding_ names - Append one crate’s
(name, ext)slice. Companion toset_bindings_dispatch/set_extra_bindings_dispatch— call alongside dispatcher registration sofind_filecan resolve compile-time bindings. Duplicates are deduplicated by pointer so repeated calls from the same crate don’t inflate the fallback pool. - add_
search_ path - Global append (Perl
PushValue(SEARCHPATHS)) — a persistent search dir. - after_
assignment - run the accumulated directives from
\afterassignment(Package.pm:716); a value that is no token (a binding’sAssignValue("afterAssignment", "Q")) is an Error and dropped. - assign_
alignment - assign_
catcode - assigns a Catcode for a given character
- assign_
delcode - like
assign_catcodebut targets Delcode and its table - assign_
font - a convenience method to globally asign a
Fontto the “font” key - assign_
font_ parameters - Give the font whose array is stored under
keyits parameters, in sp: Perl’s\fontfilling a new font’s$$fontinfo{data}from its metric (TeX_Fonts.pool.ltxml:108-117). Unbound by any group, as a font is. - assign_
frame_ value assign_frame_value_symwith a string key.- assign_
frame_ value_ sym - A save-frame bookkeeping binding (
groupInitiator,BOUND_MODE, the frame id, an environment’s group code…): always local to the current frame, exempt from\globaldefsand the\globalprefix — tex.web §1214 vs §274. SeeState::assign_local_unconditional. - assign_
internal - assigns a
Storedvalue at the given key and scope Direct mirror of Perl’s free-function formLaTeXML::Core::State::assign_internal($STATE, $table, $key, $value, $scope)(Core/State.pm L140). Bypasses every dialect / lock / let-chase / admission layer Rust has accreted on top of the table mutation; used by the dump loader (Core/Dumper.pmV/Cc/Mc/Sc/Lc/Uc/Dc/Im/I/Lt) so the dump replay matches Perl exactly: one record == oneassign_internalcall. - assign_
lccode - like
assign_catcodebut targets Lccode and its table - assign_
luatex_ latin1_ letters - load-unicode-data.tex:134-135 for U+0080–U+00FF: the LuaTeX/XeTeX format
letters every L/M code point, but the latex dump pins that range OTHER
(pdfTeX’s utf8.def model), so the lazy default in
lookup_catcodenever reaches it. Called at the format seam (latexml_engine::latex) and by theluatex/xetexoptions of latexml.sty; 65 global assignments. - assign_
mapping - Bind
keytovalueinside the named mapping — Perl’sAssignMapping. - assign_
mathcode - like
assign_catcodebut targets Mathcode and its table - assign_
meaning - $meaning should be a definition (for defining active control sequences) or another token, for \let
- assign_
register - assign_
register_ token assign_registervariant taking a pre-built Token — lets hot callers skip theT_CS!(&str)pin when they already have the CS cached (e.g. viaT_CS!("\\c@…")literal which routes throughpin!).- assign_
sfcode - like
assign_catcodebut targets Sfcode and its table - assign_
uccode - like
assign_catcodebut targets Uccode and its table - assign_
value - Bind
keytovaluein the value table — Perl’sAssignValue. - assign_
value_ inplace - assigns a
Storedvalue ‘inplace’: replaces the front value in whatever frame it was originally assigned in, without recording an undo entry. This matches Perl’sassignValue(key, value, 'inplace'). Used for MODE changes in enter_horizontal (switches mode without creating a new binding). - assign_
value_ inplace_ sym - Sym-keyed variant of
assign_value_inplace— skip the per-callarena::pin(key)for hot callers with a pre-pinned SymStr. - assign_
value_ past_ rollback - Assigns
valuetokeyglobally and past the open assignment journal’s rollback (Rust-only), as TeX never takes back what it wrote to a file: no speculative run’s undoing (a frontmatter rehearsal, a label’s ink run) takes it back. Only for a record TeX writes to a file and reads back on a later run — an aux-file label, imsart.sty’s\ead\safelabelthat its\printeadreads —, never for a value a rehearsal’s own reading decides: that one must roll back with it. OXIDIZED_DESIGN_DIVERGENCES #986. - assign_
value_ sym - assigns a
Storedvalue at the given (arena ticket!) key and scope - begin_
assignment_ journal - Begin recording what assignments change, to undo them all (
AssignmentJournalGuard::rollback) or keep them (AssignmentJournalGuard::keep; also on drop, so a panic leaves no journal open): a transaction over the binding tables, of every assignment however scoped and of the in-place edits of the tables (push_value,assign_mapping,lookup_value_mut,checkout_value/checkin_value, named-scope activation,rebind_let_copies, the graphics path list), of a font’s parameter array (set_font_parameter, saved as a copy), an input stream’s mouth (input_stream_to_change) and a box register’s dimensions (journal_box_dimension), each edited in place, and of a name’s standing in the fallback-guess set (AssignmentJournal::fallback, FM S2a.2 r9: siamart’s\AND, 2409.10200). Not of what lives outside the tables: the provide-only and stand-in name sets, which change only while a package or class loads. Made for the replay of a refused frontmatter setter (sect05.rsreplay_class_setter), which a setter that errs half-way must not leave half-done (jsty3-author.sty:542’s expl3 author list, which its printer then looped over: 2607.24171).None, recording nothing, while one is already open (journals do not nest); a journal its guard could not close (the state was borrowed when the guard dropped) is discarded here. - begin_
borrow - Begin a borrow (
binding::content::require_package_borrowed): no file loaded by it yet. Returns the list of an enclosing borrow, whichend_borrowputs back. - begin_
meaning_ log - Begin logging the meanings assigned on the open journal by a token with a field provenance (
Token::prov), in order: what a rehearsal reads a definition in its field by (the engine’sfield_notes), since a definition leaves no box. What a token of no provenance assigns is no invocation of the field’s, wherever it stands:\begin{minipage}’s hooks, the\size@updatethat\selectfontputs back. One rehearsal at a time, journals not nesting (begin_assignment_journal); the log goes with the journal. - begin_
meaning_ recorder - Begin recording which meanings are assigned, each with its value before its first assignment since
(
end_meaning_recorder): whatAssignmentJournalGuard::assignedreads ofTableName::Meaning, without the journal — recorders nest, and a journal (a speculative run’s, a replay’s) may open and close inside one. Made for a displaced setter’s call (frontmatter_stores.rs\lx@displaced@begin), whose own code may run a speculative label read (queue_digest.rsspeculative_label_ink: utarticle.cls:125’s\addressprints its\@makeadmark{\@tempb}, 1209.6020). Kept in the state, so a document that stops inside a call leaves none to the next. Returns its depth: how many were open before it, whichend_meaning_recorder_atcloses it by. - begin_
semiverbatim - begins a semiverbatim frame, neutralizing the usual + requested characters
- begin_
stand_ in_ load - Begin a stand-in binding’s load (
crate::definition::origin::StandInLoadGuard): no name of its own assigned yet (State::stand_in_loads); a stand-in it loads records its own apart. - bind_
value_ in_ frame - Binds
keytovaluein stack frameframe(0 = innermost), replacing the binding that frame made, if any: the value is undone with that frame, and the bindings of the frames above it still shadow it. - binding_
exists truewhen a binding is registered for the exact(name, ext)pair. Convenience wrapper over the per-crate slices inbinding_names. Mirrorsdispatch()’s lookup but without the side effect of loading.- binding_
loaded - Did the binding of this very name load
file(<file>.ltxml_loaded, Package.pm:2332), not a stand-in’s? - body_
mentions - Whether the macro
cs’s token body mentions the control sequence namedname(a closure body is opaque: no). By name, so no token is interned for a name that may never exist. - call_
openers - The other tokens that open a call of
binding(alocked_binding_token) besides an explicit{: the[of each optional argument its signature opens with, and the token of anOptionalMatch:*. A robust binding’s signature is its inner\cs␣’s, as inowns_calls:\cite[p.~3]{x}opens the kernel\cite. - checkin_
value - Returns a value into its
Stored::Noneplaceholder (seecheckout_valuefor taking it) - checkout_
value - Replaces the value in question with
Stored::None(seecheckin_valuefor returning it) - claim_
borrowed_ meanings - A borrowing binding’s claim on the borrowed names its real package defines too: their meanings no longer carry the
borrowed mark (
DefinitionOrigin::Borrowed,fallback_meaning_origin), so they are the binding’s own, as if it had defined them again at its own origin, and a later file’s\newcommand/\newenvironmentof them is refused as LaTeX refuses it (“Command … already defined”), not honoured. ntheorem.sty’s[amsthm]option defines\proofnameand{proof}(ntheorem.sty:668-711), which its binding takes from the borrowed amsthm; theorem.sty’s\newskip\theorempreskipamount(theorem.sty:122-123) likewise. A name whose meaning is not borrowed is left alone. - claim_
open_ document_ calls - The document calls whose expansions are being read now (
note_document_call), for an entryclaimerthe frontmatter API queues inside them (latexml_enginetitle_page_check::note_frontmatter_entry):Nonewhen there are none, else the claimer of the outermost (the entry an earlier one inside the same call made, orclaimer), those no entry claimed before, outermost first, nowclaimer’s, and the arguments of them all — shared, not copied: an\authorof 3,000 names joined by\andmakes 3,000 entries inside one call. - class_
chapter_ sources - The two halves of
class_has_chapters_now: whether the class’s own code assigned\chapter(a), and whether the class keeps LaTeXML’s kernel\chapteras a binding’s chapters (b) or OmniBus’s guess (c). - class_
defines_ chapter - The one “has chapters” test (OXIDIZED_DESIGN #179): does the class have chapters, as the real class’s
\@ifundefined{chapter}sees it? natbib’s forks head the bibliography by it (NJDnatbib.sty:1050, ws-rv-har.sty:676), appendix.sty:38 and titlesec.sty:1526 number by it, and the kernel’s\appendixnumbers within chapters only then (begin_appendices). The answer the “has chapters” step stored after the document’s class loaded (settle_chapter_after_class_load, latexml_engine sect01.rs,CLASS_HAS_CHAPTERS); while a class loads, the test made now (class_has_chapters_now), as a class’s own\@ifundefined{chapter}is answered by what it has defined so far. Not achaptercounter alone: WileyNJDv5.cls:5728 and MRM.cls:2160\newcounter{chapter}[part]with no\chapter(2609.08425, 2506.14995: “REFERENCES”; 2211.16474: “Appendix A”). A LaTeX 2.09\documentstyledocument never settles (only a\documentclassretracts and settles,\chapter:settles); its class’s end stores the answer (\chapter:stored,store_chapter_after_latex_ix_class_load, latexml_engine sect01.rs), so\documentstyle[appendix]{report}numbers its appendix chapters “Appendix A” and\documentstyle{article}with the document’s own\newcounter{chapter}+\def\chapterletters its appendix “A”, as pdflatex. Before any class load (plain TeX), the test made now. - class_
file_ name - The class file name a load request names (
article,dir/mybase.cls→article.cls,mybase.cls). - class_
has_ chapters_ now - The “has chapters” test made now (OXIDIZED_DESIGN #179), which
settle_chapter_after_class_loadstores after each class load: the class has chapters when - class_
loaded \@ifclassloaded{name}(file_loaded).- clear_
prefixes - clears the global prefixes
- compute_
indirect_ model - The indirect model includes all elements allowed as direct children, and all descendents of a node that can be inserted after autoOpen’ing intermediate elements.
- convert_
unit - convert a unit name into a
f64scaling factor oversp - convert_
unit_ ratio - Convert a unit name into the exact TeX
(num, den)fraction such that a dimension ofvalueunits isfloor(round(value·65536)·num/den)scaled points (seenumeric_ops::fixpoint_unit). - copies_
lock - The meaning a lock that holds only against copies protects (
"{cs}:locked@copies",files_lock_holds). - copy_
kept_ meaning - The meaning the latest stand-in copy that redefined
tokenfor its own code only gave it (its overlay, the copy’sdeclinedname: “keeps LaTeXML’s definition”,note_copy_provides_assignment), while the meaning in force is still the binding’s the copy’s frame gave back (CopyProvidesRecord::restored; a later file’s redefinition is no stale copy’s to read, review revPB S4): what the paper’s copy runs where the binding’s version runs here. For the frontmatter’s reading of a class’s title code (latexml_enginetitle_code_author_definitions: neurips_2022.sty’s\@maketitle, which defines\NewAnd, where the neurips binding keeps its own; 2205.14141, 2205.14539). - copy_
provides_ binding - The stand-in binding the copy read now (
copy_provides) was read after, or the empty string when no copy is read. - copy_
provides_ defers - Does a stand-in’s copy, read now, defer code to the document through
seam(\AtBeginDocument,\AtEndDocument, etoolbox’s\AtEndPreamble/\AfterEndPreamble/\AfterEndDocument, lthooks’\AddToHook)? Then the code is not registered: it is the class’s or style’s document-time machinery, which the binding has taken over — layout checks against the class’s page dimensions (icml2024.sty’s “The page layout violates the ICML style”, 2407.02750), validations of the class’s own setters the document called as the binding’s (PoS.cls “\abstract{…} should appear before \begin{document}”, 1001.3214; ieeeaccess.cls’s\EOD, 2007.03025; aipproc.cls’s\layoutstyle, astro-ph0105128), patches of the kernel’s\enddocument(aastex7.cls:459, whose\rvtx@enddocument@patchreads up to\@checkendand ran off the file: 2504.00922, 2605.15371, 2607.03848). On the 2026-10-17 census sample no Error was fixed by such code. Logged once per copy and seam, at Info. - copy_
provides_ defers_ hook_ write - Is
tokenone of LaTeX’s document hooks (\@begindocumenthook,\@enddocumenthook), which a stand-in’s copy read now writes —\g@addto@macro, ltxgrid’s\prepdef, a\def—, so that the write is document-time code, which the copy does not register, as it does not its\AtBeginDocumentcode (copy_provides_defers, Info)? ltxgrid’s\prepdef\@begindocumenthook{\open@column@one\@ne\set@colht…}(qm2008_abs.cls:3233, snp.cls; REVTeX 4 copies routed to the revtex4 binding) ran its page grid over the binding’s names at\begin{document}: 7 “Missing number” Warnings in 0805.2253, 0806.0481, 0805.4759. - copy_
provides_ environment_ yields - Does a stand-in’s copy, read now,
\newenvironment(\newcommand,\providecommand) the environment its binding lets it keep (declare_copy_environment)? Then the declaration defines it, as the first definition TeX sees: in TeX the copy is the file, and the binding’s{longtable}never existed. - copy_
provides_ keeps_ counter - Does a stand-in’s copy, read now (
note_copy_provides_assignment), (re)declare or renumber the counterctrthe stand-in binding’s own load declared or numbered (its\c@<ctr>assigned while the binding loaded,State::stand_in_meanings, or the\the<ctr>of a counter that exists:\newcounter,\numberwithin,\@addtoreset,\counterwithin)? Then the counter keeps the binding’s numbering: its reset list is the binding’s, as its\the<ctr>is. Any other counter is the copy’s, declared for real (new_countersuspends the copy’s provides-mode for it): the kernel’sequationwith the pool’s article\theequation— as article.cls’s defaults yield to the real class’s own: jheppub.sty:313-314\renewcommand\theequation{\thesection.\arabic{equation}}and\numberwithin{equation}{section}number (2.1) as its PDF does (2112.14648, 2607.20603) — and a counter the binding only has a\the<ctr>for, OmniBus’s\thechapterautoload stub: WileyNJDv5.cls:5728 and MRM.cls:2160\newcounter{chapter}[part], ws-rv9x6.cls:399\newcounter{chapter}(2301.03442: declined,\c@chapterwas “not a register”). Logged once per copy, at Info. - copy_
provides_ keeps_ saved_ meaning - Does a stand-in’s copy, read now (
note_copy_provides_assignment), savesourceagain intotoken—\let \token\source— wheretokenalready holds an earlier meaning ofsource(its definition is a\letcopy made undersource’s name,definition_cs) that the stand-in binding’s load assigned, andsourcehas been redefined since — by the binding, the copy’s read not having assignedsourceitself — to a meaning that reachestoken(meaning_reaches), so that the\letwould make it call itself? Then the\letis declined, in the copy’s code too:tokenkeeps the meaning TeX gives it,sourcebefore the redefinition. The binding (or a file it read) made the very save-and-wrap the copy makes —\let\org\X, then\Xredefined to call\org—, and saving the wrapper into\orgmakes\Xcall itself: myjmlr.cls and jmlr_mod.cls (renamed jmlr.cls copies routed to the jmlr binding, whose jmlrutils.sty made the same wrap) run\let\jmlr@org@newtheorem\newtheorem(jmlr.cls:753-754) before their own\newtheorem{example}, which looped to the timeout (1506.02582, 2304.14217; OXIDIZED_DESIGN_DIVERGENCES #731 rule 2, the epl2.cls\let\epl@org@bibitemcase met in the copy’s own code). Logged once per copy, at Info. - copy_
provides_ maketitle - The latest stand-in copy’s own
\maketitlebody (note_copy_provides_title_page), with the copy’s number (new_copy_provides_record) and file: the\maketitlepdflatex runs where the binding keeps LaTeXML’s (spconf.sty’s, 2110.09738; latexml_enginelatex_constructs::class_maketitle_in_force). - copy_
provides_ maketitle_ of - The
\maketitlebody (note_copy_provides_title_page) of the first stand-in copy offilenumberedfromor later, with its number. - copy_
provides_ overlaid_ meaning - Copy
id’s own version of the nametokenthe binding owns, kept in its overlay while the binding’s meaning is in force (note_copy_provides_assignment). - copy_
provides_ refuses_ locked - Does a stand-in’s copy, read or running its hook now (
note_copy_provides_assignment), redefine the lockedtoken? Then the lock refuses it as for any file, but keeps no record of it — no\lx@dropped@<name>body for the binding to run in a gap, no<cs>:redefinedfor it to yield to, no default or signature (the records of a raw class taking over a locked command, OXIDIZED_DESIGN #265, #500): the binding stands in for this very file, so the copy takes nothing over. Logged once per copy, at Info, as a redefinition of an owned name is. - copy_
provides_ text_ default_ clashes - Does a stand-in’s copy, read now,
\newcommanda text default its binding does not own that a base class it\LoadClassed defines (copy_base_class_defines: article.cls:616\newcommand\refname, :618\figurename, which the article binding assigns in its own load; a raw base class’s own definition)? The real class has the name, so LaTeX stops with “Command … already defined” and keeps the first definition: an Error here as there (sect08.rs\newcommand; the reviewer’s probes newcmd_base and nc_chain, pdflatex 2 errors, “References”/“Figure 1”; nc_namedef 1). A name the base class made\relaxis definable, as LaTeX’s\newcommandfinds it.\def/\renewcommandredefine as before. - copy_
provides_ text_ default_ yields - Does a stand-in’s copy, read now,
\newcommanda text default its binding does not own (unowned_text_default), in a real class that lacks the name? Then the declaration defines it, as it does in TeX: LaTeXML’s kernel or the binding’s base class predefined it, and no base class the copy loads defines it — a standalone class (ws-rv9x6.cls:91\newcommand\bibname{References}, 2301.03442), or a name its base class lacks (article.cls has no\bibname). A name the base class the copy\LoadClasses defines is the real class’s already, so its\newcommandis TeX’s “already defined” (copy_provides_text_default_clashes). - copy_
provides_ title_ pages - The title pages stand-in copies defined (
note_copy_provides_title_page), each with its copy’s number, forfrontmatter_stores::copy_title_page_prints(latexml_engine). - copy_
provides_ wrap - The code a stand-in’s copy registers with
\AtEndOfClass/\AtEndOfPackage, which runs at the end of its own load: wrapped in the copy’s scope markers\lx@copy@provides@begin{N}…\lx@copy@provides@end, so it runs under the copy’s provides-mode, with the copy’s own definitions in force (enter_copy_provides_frame; aa.cls:71’s\AtEndOfClassredefinition of{abstract}keeps the binding’s).tokensunchanged when no copy is read or it is wrapped already. - current_
frame_ locked truewhen the CURRENT (front) stack frame is the locked bottom frame — i.e. there is no openable group/mode frame to pop. Popping it would FATAL.- current_
meanings_ where - Every control sequence whose current meaning satisfies
keep, with that meaning: a whole-table scan, for a one-off survey of what a loaded file defined (K11’s reader scan,frontmatter_stores.rs), never a hot path. - current_
verbosity - deactivate_
scope - Removes any definitions that were associated with the named
scope. Normally not needed, since a scopes definitions are locally bound anyway. - declare_
copy_ environment - Declare
{env}the environment a paper’s copy ofbindingkeeps, andtablethe binding’s table macro (OD #731 rule 15);stocknames macros holding the file’s own\<env>meanings, and a copy whose\<env>equals one, as our\ifxcompares (prefixes aside), leaves the binding’s (OD #1202,leave_copy_provides_frame). - declare_
copy_ text_ names - Declare
names(\apj) text names of the binding loading now, besides the kernel’sCOPY_TEXT_NAMES: a copy routed to it or a derivative of its class may supply them (OXIDIZED_DESIGN_DIVERGENCES #731 rules 13 and 14). The one declaration point of the mechanism, a value"<name>:copy@text"as a lock is"<name>:locked"; a binding declares the names it defines, where it defines them (aas_macros_sty.rs: its journal abbreviations, which 1402.7103’s proto.cls :1729-1790 spells out, “Astrophys. J.”). - defined_
names_ after_ prefix - The rest of each defined control sequence’s name that begins with
prefix: the<type>of latex.ltx’s\ftype@<type>, one per float type. In no particular order. - diff_
snapshot - Compute diff from snapshot and return changed serializable entries.
- document_
redefines_ guess - Whether the document redefines a guess of the fallback class, which wins under OmniBus (BM Q3.12, DG 2026-11-14):
OmniBus sets
GUESSES_REDEFINABLEfor a class with no binding, so its locks yield to the document’s own text — not to hook code (apacite’s\AtBeginDocument{\providecommand{\doi}…}keeps OmniBus’s\doi). - dropped_
argument_ count - How many arguments binding macros dropped so far (
note_dropped_argument): a watch’s start. - dump_
top_ frame_ keys - dvi_
driver_ option - Whether the document is a latex+dvips one by its class options (
set_dvi_driver_option). - end_
borrow - End a borrow: the files first marked loaded during it (
borrowed_loaded) are marked unloaded (mark_unloaded), and the enclosing borrow’s list is put back. - end_
meaning_ recorder - Close the innermost meaning recorder (
begin_meaning_recorder): the meanings assigned since it began, each with its value then (None: unbound). Empty when none is open. - end_
meaning_ recorder_ at - Close the meaning recorder
begin_meaning_recorderopened atdepth, and every one opened inside it and left open (anErrout of a displaced call between its begin and its end): the meanings it recorded, asend_meaning_recorder; empty when it is no longer open. - end_
provide_ only - End a provide-only load: the files first loaded during it (but the fallback class itself) loaded only what they
could provide, so they are marked unloaded again —
<file>_loaded, its.ltxml_loadedtwin,_load_attemptedand the kernel’s\ver@<file>— and a later\usepackage/\RequirePackageof one loads it whole (\documentstyle[graphics,myjunkx]{article}\usepackage{graphicx}: graphicx’s keyval\includegraphics). - end_
semiverbatim - end by just calling
pop_frame - end_
stand_ in_ load - End the stand-in binding’s load
begin_stand_in_loadbegan: its names are the last load’s (State::stand_in_last_load), and, when the stand-in binding loading it requested it in its own code (into_outer,StandInLoadGuard::loaded_by), that binding’s too. - ensure_
tag_ property - enter_
copy_ provides_ frame - Begin a frame of copy
id’s provides-mode (crate::definition::origin::enter_copy_provides;0suspends the mode for a file the copy loads, a repeat of the mode in force adds nothing): the copy’s own definitions of names the binding owns, kept from its earlier read or hooks, are in force again for its code, the meanings they replace kept aside. - fallback_
meaning_ origin - The origin of
token’s current meaning when it is a fallback guess, a kernel stub or a borrowed package’s (is_fallback_meaning):Fallback,StuborBorrowed, whatever kind of definition it is (only macros record their own origin,Definition::get_origin; amsthm’s proof is a constructor). - figure_
output_ cue - The output-mode cue of the figures the document’s source includes (
set_figure_output_cue). - file_
loaded - Is
file(amsmath.sty,memoir.cls) loaded, as LaTeX asks it (\@ifpackageloaded,\@ifclassloaded: latex.ltx\@ifl@aded,\ver@<file>defined and not\relax)? One answer on every load path: a binding’s load and a raw file’s define the macro (Package.pm:2343, :2393), and so do a class’s or a document’s own marks (floatrow.sty:34,\@namedef{ver@…}) and their removals (fontenc.sty’s tail, a document’s\let\ver@amsthm.sty\relax). Perl’s\@ifl@adedreads the loader’s records (latex_constructs.pool.ltxml:946-953), which a binding may clear so that the next request runs it again (load_recorded; aa.cls.ltxml:57): OXIDIZED_DESIGN_DIVERGENCES #1015. - files_
lock_ holds - Whether a lock against the class and package files on
csholds against this redefinition. Most such locks hold against every one. One that holds only against a COPY of the binding’s interface ("{cs}:locked@copies": amsthm’s proof, amsthm_sty.rs) holds against a redefinition taking an optional argument with a default first (takes_optional_first) — amsthm.sty:431’s own{proof}[1][\proofname], which smfart.cls:1194, ijmart.cls:336 or thuthesis.cls:4052 re-implement over a\trivlist— and lets one with a head of its own through (fascicules.sty:142{\textbf{D\'emonstration:} \par}, NotesTeX.sty:124, a paper’s own\renewenvironment{proof}{…Beweisskizze:…}{…$\blacksquare$}), whose head text and end mark the binding would replace. The environment’s end half (\end<name>of a qualified\<name>) follows its begin half: locked while that is still the binding’s (not cleared, and LaTeXML’s own,DefinitionOrigin::is_latexml_owned). OXIDIZED_DESIGN_DIVERGENCES #596. - font_
parameter \fontdimen<p>of the font whose parameter array is stored underkey, in sp (Perl’s$$fontinfo{data}, TeX_Fonts.pool.ltxml:131-137);Nonewhen the font has no array yet orplies past its end.- frame_
of_ binding - The stack frame (0 = innermost) that made the
n-th newest binding ofkey(0 = the binding in force), forvalue_in_frame: which group a value was set in. - generate_
error_ stub - Generate a stub definition for an undefined control-sequence, along with appropriate error messge.
- generate_
ligature_ id - simple id generator for a ligature
- get_
active_ scopes - return the currently activated named scopes
- get_
binding_ names - Snapshot of all registered (name, ext) binding pairs across all
dispatchers. Used by
find_file(notex=true)to detect compiled-binding existence regardless of extension (cls/sty/def/pool/code.tex/…). - get_
bindings_ dispatch - get_
class_ binding_ names - Filtered view of
get_binding_names()returning ONLY class names (without.clssuffix). Used byload_classfor Perl’s prefix-match fallback (Package.pm L2702-2706). Returns a flatVec<&str>rather than per-crate slices — callers that need to preserve crate boundaries should iterateget_binding_names()directly. - get_
extra_ bindings_ dispatch - get_
frame_ depth - Determine depth of group nesting.
- get_
graphics_ paths - Mirror Perl’s
LookupValue('GRAPHICSPATHS')— a list value that all\graphicspath,\svgpath, initial source-directory prepends, andimage_candidatesconsult. Always return asVec<String>even if the value was stored asStrings(initial assignValue) orVecDequeStored(after any push/unshift). - get_
indirect_ model_ relationship - get_
input_ encoding - get_
known_ scopes - return all known named scopes
- get_
label_ mapping_ hook - get_
nomathparse_ flag - get_
prefix - gets the current value of a named prefix
- get_
prefix_ sym get_prefixwith a pre-pinned SymStr key (seecrate::pin!) — for the per-\defprefix probes inExpandable::newand friends.- get_
search_ paths - Read SEARCHPATHS from the group-scoped value table (Perl
LookupValue('SEARCHPATHS')). Mirrorsget_graphics_paths: the list is a group-scoped value, not a plain field, so an\import/\subimportgroup reverts its change at}and a package’s global add persists. - get_
staged_ snapshot - Retrieve a previously staged snapshot, if present.
- get_
tag_ property - graphics_
paths_ contains - Zero-alloc membership test for GRAPHICSPATHS. Mirrors the Perl idiom
grep { $_ eq $dir } @{ $state->lookupValue('GRAPHICSPATHS') }but without allocating an ownedVec<String>for a single boolean — the interned-symbolwith/with2family resolves each path in place. - graphics_
paths_ push_ front - Mirror Perl’s
$state->unshiftValue(GRAPHICSPATHS => $dir). Used by Core.pm-style source-directory prepends. - has_
indirect_ model - has_
meaning - has_
meaning_ key - Whether the meaning key
key(ameaning_key) is bound now. - has_
search_ paths - has_
tex_ prefixes - Whether one of TeX’s own prefixes (
\global,\long,\outer,\protected) is waiting for its command. LaTeXML’s internal prefixes (the algorithm2e binding’sdidpar) are not TeX’s and keep Perl’s clearing. - has_
value - Check if the Value table contains a given key
- has_
value_ sym - Sym-keyed variant of
has_value— avoids the per-callarena::pin(key). - hoist_
top_ frame_ conditional_ delta - Hoist the conditionals installed at the topmost frame since
pre_snapshotwas taken to GLOBAL scope: for a package loaded inside a LaTeXML subfile bracket (require_package, OXIDIZED_DESIGN #65). Idempotent: keys already inpre_snapshotare skipped, re-bound or not, so a conditional the child’s own preamble set stays the child’s. - hoist_
top_ frame_ package_ load - Hoist what an autoloaded package installed at the topmost frame since
prewas taken — its meanings and its values — to GLOBAL scope. The trigger (def_autoload, OmniBus’s\lx@late@usepackage, the LaTeX-pool autoload) is cleared and the package’s loaded-flag set globally, so what the package defines must live as long. Fired inside a group, natbib’s locked\citepwas otherwise popped while its lock survived, every later\citepundefined (arXiv 2605.08349, 2605.10423, 2605.14513, 2605.04028:Fatal:TooManyErrors), and its citation style reverted after the group. A meaning the group had bound before the load and the load re-bound there goes too (the frame’s count stays 1, a local assignment replacing its binding: State.pm:169-174): natbib’s\let\bibitem\lx@nat@bibitem, loaded by OmniBus’s hook in athebibliographythat had armed\bibitem, was popped at the list’s end, and the next list’s\bibitemran the hook forever (arXiv 2006.04387, KNOWN_PERL_ERRORS #1367). A value the group had bound stays the group’s: those are its own machinery (the mode, the font, the list’s registers). - if_
count - The conditionals counted so far (
State::if_count). - if_
limit - Perl
$LaTeXML::IF_LIMIT: the runaway ceiling on conditional ids (0= unlimited), set bylatexml.sty’siflimitoption. - if_
stack_ depth - The number of active conditionals.
- if_
stack_ snapshot - The active conditionals, each with its state as it is now, for
restore_if_stackto put back. - input_
stream_ to_ change - The input stream stored under
key(\\openin’s), to read it or close it: a mouth changes in place, so under an open assignment journal the first one to change it works on a copy of its own, in the stream’s place, and a rollback gives the document’s back where it stood. A\\readin a rehearsal (a frontmatter field, a title page) took the document’s next line. - install_
definition - A shorthand for installing definitions
- install_
undefined_ error_ constructor - Install a
Constructorfortokenwhose sole effect at digestion time is to emit<ltx:ERROR class='undefined'>content</ltx:ERROR>(the Rust equivalent of PerlDocument::makeError). It logs NOTHING — the caller is responsible for theError!/note_status. Mirrors the make_error constructor thatgenerate_error_stubinstalls for undefined commands, so undefined environments (\begin{undefinedenv}) leave the same visible<ltx:ERROR>marker as Perl instead of silently vanishing from the output. Like that stub, it installs past a lock (past_the_lock, below). - internal_
register_ value - The value the engine’s own parameter holds at its fixed address, the register’s name (Perl Register.pm:52-56),
whatever the name now means: pdfTeX reads
every_eof,show_stream,err_helpfromeqtb, so after\def\everyeof{E}or\let\everyeof\toks0too.Nonewhile never assigned (the caller’s default). - is_
allocated_ register_ address - Whether
addressis a slot of a primitive register bank —\count<n>,\dimen<n>,\skip<n>,\muskip<n>,\toks<n>,\box<n>— i.e. what\newdimen& co. allocate (tex.web §1224), as opposed to a register named after its own (or another) control sequence. - is_
binding_ extension truewhen at least one registered binding declaresextas its extension. Used by\input’s heuristic to decide whether\input{name.<ext>}should consult the binding registry — e.g..sty,.cls,.def,.pool,code.texare all valid binding extensions, while.eps,.png,.bibare not. Matches by extension only (thenameis checked separately bydispatch()’s exact lookup).- is_
definition_ locked - Whether
token’s definition is locked while state is not unlocked, soinstall_definitiondrops a redefinition. - is_
dont_ expandable - Whether token is affected by \noexpand
- is_
error_ stub - Was
tokenstubbed as<ltx:ERROR/>bygenerate_error_stub? Probe only: the flag key is interned when the stub is made, so an unknown name costs no arena entry (the:lockedprobe’s discipline). - is_
fallback_ meaning - Is
token’s current meaning a fallback class’s guess (DefinitionOrigin::Fallback), a kernel stub (DefinitionOrigin::Stub) or a borrowed package’s (DefinitionOrigin::Borrowed), which a document’s own\newcommandmay replace? - is_
name_ locked - Whether the control sequence named
csis locked while state is not unlocked: against every definition ("{cs}:locked"), or against those the class and package files make ("{cs}:locked@files"), which leaves the document free to define it, as LaTeX and Perl do (the kernel minipage: sect12.rs, OXIDIZED_DESIGN_DIVERGENCES #453). - is_
ptex_ kanji_ letter - K12 — pTeX’s control-word letters. pTeX/upTeX give every non-ASCII code
point a
kcatcode(upTeX manual §kcatcode: 16 kanji, 17 kana, 18 other kchar, 19 hangul, 20 modifier; ASCII is always Latin), and a control word after\extends over kanji, kana (and, upTeX, hangul/modifier) characters —\if西暦is one control sequence (jsarticle.cls:1927\newif\if西暦, ptex-manual\黄マーカー); kcatcode 18 (symbols, fullwidth punctuation) ends it, and Latin-1/Greek/Cyrillic stay inputenc bytes (kcatcode 15), so this is the block set of the kanji/kana/hangul kcatcodes, not the Unicode letter class. UnderPTEX_PROFILE(set by\NeedsTeXFormat{pLaTeX2e}/{upLaTeX2e}) these default to LETTER, as the LuaTeX profile letters the L/M class; under pdfTeX they stay OTHER, where both LaTeXML engines let\newif\if西暦’s bare\ifto\iffalseand every\ifafter it fails. - is_
scope_ active - Is the named scope currently active? See
scope_active_infor why this is a front-value test and not a presence test, andsubfile_scope_at_depthfor the region marker it supports. - is_
serializable - Check whether a Stored value can be serialized for the kernel dump. Values containing closures (Primitive, Constructor, Conditional, etc.) cannot be serialized — they come from Rust engine code, not the dump. This matches Perl’s DumpFile which only serializes Expandable macros.
- is_
token_ register - Does the control sequence
csmean a token register (\newtoks,\toks@)? - is_
unicode_ letter_ or_ mark - General_Category L ∪ M, the set load-unicode-data.tex letters.
is_alphabeticalso admits Nl (Roman numerals), which the kernel leaves OTHER; combining marks (M) are added explicitly. - is_
value_ bound - Was
namebound? Ifframeis given, check only whether it is bound in that frame (0 is the topmost). - journal_
box_ dimension - Note for an open assignment journal that the box in the register
keyis about to have its dimensionpropertyset (\\wd,\\ht,\\dp): a property of the box itself, which no binding’s value holds. Also ends the watch held (watch_state). - keep_
binding_ aside_ before_ class lock_waits_for_classfordefinitionoftokenatscope(Nonefor an environment’s end half, which follows its begin half), which the lock would refuse. The binding it displaces is read once, for the value test and for the aside: the one kept aside already, else the one a clearing\letset aside ("{cs}:locked@cleared") when the name is cleared, else the meaning (outside every group, for a global definition). A value for a binding that owns its calls does not wait: the binding is back in place for OXIDIZED_DESIGN #500’s call owner, and the value stands past the class (\let\title\undefinedor\def\title#1{…}, then\def\title{On Widgets}). A definition local to a group keeps nothing aside, since the group’s end undoes it (\begingroup\let\LaTeX\mylogo \def\LaTeX{X}\endgroup). Otherwise the binding is kept aside (once per name) forlocks_take_holdto put back, with oneInfo:lock.- keeping_
load_ records - Run
read, a read offilethat must not use it up (colordvi’s of dvipsnam.def), and putfile’s load records back as they were. - leave_
copy_ provides_ frame - End the frame
enter_copy_provides_framebegan: each name the copy’s code redefined, and the binding owns, takes back the meaning kept aside, and the copy’s own is kept for its next frame (a hook it registered). - let_
definition - A binding’s
\let(Let!):let_i, unless a provide-only load declines it (provide_only_declines). TeX’s own\letand\futureletarelet_i. - let_i
- load_
recorded - Has the loader recorded a load of
file: its binding’s or a stand-in’s (<file>_loaded) or its raw TeX’s (raw_loaded)? The loader’s own question (Package.pm:2328-2330, :2363;DefAutoload, :1096), not LaTeX’s (file_loaded): it says whether the definitions were read here, and a binding clears it to be read again. - local_
binding_ file - The binding file a user supplied for
requestin the local search paths, which the chain loads instead of any compiled binding of that name (#947);Nonewithout one, or where runtime bindings are not built in. - lock_
holds_ against name_carries_lockfor a known redefinition:copies_interfacetells whether it takes an optional argument first with a default (takes_optional_first), which a lock against the files that holds only against copies of the binding’s interface (files_lock_holds) reads.- lock_
waits_ for_ class - Whether a lock waits for the class declaration (DG D-49, OXIDIZED_DESIGN_DIVERGENCES #1195): a LaTeX-route
document’s own definition made before
\documentclass/\documentstylegoes through, since a class’s bindings arrive with the class (Perl’s timeline: the author’s meaning until the class pool loads, the binding after); a definition after the class stays refused. The Colli/Gilardi/Sprekels header\def\LaTeX{\let\Begin\begin\let\End\end\let\salta\relax}\LaTeX(1307.1572, 0902.4741, 1103.4585) runs before its class, after the preload has loaded the format with its locked\LaTeX. Not in a format build (--init), which reads plain.tex at the document’s origin and has no class declaration. - locked_
binding_ token \lx@locked@<cs>: where a document’s override of the lockedcskeeps the binding that handles its calls (install_definition). The binding object itself, so its reversion still namescs.- locked_
control_ sequences - Every control sequence carrying a
"{cs}:locked"lock, sorted: for the census of which own their calls (owns_calls). - locks_
take_ hold - The class declaration (
\documentclass,\documentstyle;\begin{document}without one): the locks hold from here on, and every binding a definition before it displaced (keep_binding_aside_before_class) is back in place. - lookup_
alignment - lookup_
bool - A bit of Perl “existence as truth” semantics mixed in with proper boolean lookup
- lookup_
bool_ sym lookup_boolvariant for hot call sites with a pre-pinned SymStr (seecrate::pin!). Skips the per-callarena::pin(key)hash lookup — significant on every-expansion hot paths.SymStris au32wrapper (Copy), so it passes by value — no borrow overhead.- lookup_
catcode - Lookup & assign a character’s Catcode
- lookup_
conditional - lookup_
definition - used for expansion & various queries Since we’re not doing digestion here, we don’t need to handle mathactive, nor cs let to executable tokens This returns a definition object, or undef
- lookup_
definition_ stored - Returns a definition as
Storedso that one can call.read_arguments - lookup_
delcode - like
lookup_catcodebut targets Delcode and its table - lookup_
digestable_ definition - Recognizes mathactive tokens in math mode and also looks for cs that have been let to other `executable’ tokens. Returns a definition object, or a “self inserting” token. Used for digestion.
- lookup_
dimension - a variant of
lookup_valuethat casts the value intoDimension - lookup_
dimension_ cs - Faithful port of Perl
LookupDimension(Package.pmL1371-1393, as widened by upstream PR #2829): try to turn the argument into a Dimension, recognizing strings, registers, …. - lookup_
expandable - lookup_
float - a variant of
lookup_valuethat casts the value intoFloat - lookup_
font - convenience method to lookup the current value at the “font” key
- lookup_
glue - a variant of
lookup_valuethat only recognizes aStored::Glue - lookup_
int - like
lookup_valuebut only recognizes Int, Bool and Number variants of Stored (default: 0) - lookup_
int_ sym lookup_intvariant for hot call sites with a pre-pinned SymStr (seecrate::pin!). Skips the per-callarena::pin(key)hash lookup — the sibling oflookup_bool_sym.- lookup_
lccode - like
lookup_catcodebut targets Lccode and its table - lookup_
mapping - lookup_
mapping_ sym - Sym-keyed variant — skip the per-call
arena::pin(map)for hot callers with a pre-pinned map key (e.g. viapin!("siunitx_macros")). - lookup_
mathcode - like
lookup_catcodebut targets Mathcode and its table - lookup_
mathcode_ sym - lookup_
mathfont - convenience method to lookup the current value at the “mathfont” key
- lookup_
meaning - Get the “Meaning” of a token.
- lookup_
mode - The current
MODE, for the mode tests on every digested token: compare withpin!("horizontal"), or usemode_ends_with. - lookup_
muglue - a variant of
lookup_valuethat only recognizes aStored::Glue - lookup_
number - a variant of
lookup_valuethat casts the value intoNumber - lookup_
register - lookup_
register_ definition - A specialized version of
lookup_definitionfor registers, since we can’t adequately perform multi-dispatch when we have a “Self: Sized” for the Definition trait object. - lookup_
register_ quiet - Quiet sibling of
lookup_registerfor call sites that mirror Perl’s explicitlookupDefinition(cs) && $defn->isRegister ? $defn->valueOf : <default>guard — e.g. TeX_Tables\lx@text@intercol/\lx@math@intercol(TeX_Tables.pool.ltxmlL639/L646), where a document may legitimately\renewcommanda length register (\tabcolsep/\arraycolsep) into a plain macro. In that case the register-ness is genuinely gone in Perl too, and Perl silently falls back to its default (Dimension(0)) with no warning. ReturnsNone(no warning) when the CS is undefined or is not a register, so the caller can apply its own faithful default. - lookup_
register_ token - Token-keyed variant of
lookup_register— saves the per-callT_CS!(&str)pin for hot callers with a cached CS token. - lookup_
sfcode - like
lookup_catcodebut targets Sfcode and its table - lookup_
string - like
lookup_value, but casts the entry into a String (empty if None) - lookup_
string_ from_ sym lookup_stringvariant using a pre-pinned SymStr key.- lookup_
string_ sym - like
lookup_value, but casts the entry into a SymStr from the string interner (pin!("")if None) - lookup_
string_ sym_ from_ sym lookup_string_from_sym’s value as its interned symbol (pin!("")when unset), without theString.- lookup_
token - a variant of
lookup_valuethat only recognizes aStored::Token - lookup_
token_ sym - a variant of
lookup_tokentaking an already-pinned SymStr key — avoids the per-callarena::pin(key)hash lookup. - lookup_
tokens - a variant of
lookup_valuethat casts the response intoTokens - lookup_
uccode - like
lookup_catcodebut targets Uccode and its table - lookup_
value - The value bound to
key, orNonewhen nothing is bound — Perl’sLookupValue. - lookup_
vecdeque - like
lookup_valuebut only recognizesStored::VecDequeStored - mark_
loaded - Record
fileloaded for a binding that stands in for it (thmtools for thm-patch.sty, aipproc for aipxfm.sty), as the original’s own load does: the loader’s record, so a later request is a no-op, and\ver@<file>(\fmtversion, Package.pm:2343) unless the file is marked already. - mark_
unloaded - Mark
file(amsthm.sty) as not loaded, globally: its<file>_loaded, the.ltxml_loadedtwin, the raw load’s_raw_loadedand_load_attemptedare cleared and the kernel’s\ver@<file>and\opt@<file>are undefined, so\@ifpackageloadedis false, no option clash is checked, and a later\usepackage/\RequirePackageloads it again — the binding and the raw file it reads. The definitions it made stay in force. Used when a load provided only part of a file (end_provide_only) and for a binding’s borrowed package and the files it loaded (binding::content::require_package_borrowed). - meaning_
is_ group_ local - Whether the current meaning of
tokenwas made inside a group open now, so it is gone once that group closes — whether or not a meaning stands outside it (a global assignment clears the counts of the open groups’ frames). A binding that queues what it reads to digest later (the frontmatter API) loses such a meaning: aistats’s\aistatsaddressprints in place inside\twocolumn[…], where 1302.5348 defines\newcommand{\UMDAddress}{…}just before it, and where a paper may renew a macro it defined globally (77o review probeg_globlocal: pdflatex prints the local meaning). - meaning_
key - The key under which a token’s meaning is stored. All
\special_relax-family tokens (\noexpand’d forms — the bare\special_relaxand every\special_relax\x01<shadowed>) resolve under the bare\special_relaxname: they share its\relaxmeaning, faithful to TeX where a\noexpand’d token has relax meaning regardless of which token it shadows. The shadowed identity is recovered separately viaToken::noexpand_shadowed(delimited matching only). Use this anywhere a token’s name keys a meaning lookup or a “same control sequence?” comparison. Cheap on the common path: non-CS tokens short-circuit before any string access. - meaning_
log_ is_ empty - Whether the meaning log (
begin_meaning_log) holds nothing since it was last read. - mode_
ends_ with - Whether the current
MODEends withsuffix(Perl’slookupValue('MODE') =~ /vertical$/). - name_
carries_ lock - Whether the control sequence named
cscarries a lock (is_name_locked’s two), read as a value whatever the unlocked state: Perl’s\newenvironment/\renewenvironmenttestLookupValue('\name:locked')directly (latex_constructs.pool.ltxml:2787-2803), so a class’s\renewenvironment{thebibliography}that a binding’s hook runs unlocked (as Perl runs before/after-digest code, Primitive.pm:44/:52) still leaves the locked environment alone (wiley2sp’s w2sp-pss.clo:444 in\AtEndOfClass: 100 of run 336’s PushbackLimit papers, 0710.1676, 0809.3379; ptptex: 0706.0316). - new_
copy_ provides_ record - Number a new stand-in copy of
filefornote_copy_provides_assignment(1-based,crate::definition::origin::copy_provides);routed: its\Providesline routed it tobinding(OXIDIZED_DESIGN_DIVERGENCES #731 rule 12). - next_
absorb_ id - Perl
Object.pm:163-168: bump the global absorb counter and return it (seeState::absorb_count). - next_
copy_ provides_ id - The number the next stand-in copy gets (
new_copy_provides_record). - next_
if_ id - Perl
Conditional.pm:61-62: bump the global conditional counter and return the new id for theIfFrame(seeState::if_count). - note_
copy_ base_ classes - Name
classesamong the base classes of the stand-in copyid(CopyProvidesRecord::loads_classes): the classes its binding loaded, which stand for the class the copy’s own\LoadClassnamed (binding::contentbinding_base_class_stands_for). - note_
copy_ provides_ assignment - “A stand-in’s copy provides” (OXIDIZED_DESIGN_DIVERGENCES #731): note this assignment of
token’s meaning, made while the paper’s copy of an author file is read after the binding that stands in for it (binding::content::read_stand_in_copy), or while the\AtEndOfClass/\AtEndOfPackagecode it registered runs at the end of that load (copy_provides_wrap). Every assignment of a meaning goes through here — TeX’s\deffamily,\let,\futurelet,\chardefand the\countdeffamily, and the LaTeX declarators (\newcommand,\renewcommand,\DeclareRobustCommand,\newenvironment,\newcounter,\newif,\newtheorem,\newlength…), atinstall_definitionandassign_meaning. One of a name LaTeXML’s semantic layer owns (owned_by_the_semantic_layer; an environment{X}is owned when\begin{X},\Xor\endXis) holds only inside the copy’s own code: the binding’s meaning is kept aside and put back when the copy’s read ends (leave_copy_provides_frame), so for the document the definition acted as\providecommanddoes, while the copy’s load-time logic sees what it defined, as in TeX: aipproc.cls:559\ifnum\pageref>0after its option’s\chardef\pageref(astro-ph0105128); epl2.cls:1317-1318’s\let\epl@org@bibitem\bibitembefore its\def\bibitem, which the epl binding makes too (a kept\letwould take the binding’s wrapper for the original, and\bibitemwould call itself: 0906.2627, 1102.2776, 1203.4765). Every other assignment stands as TeX makes it: an undefined name (the copy’s extras), a raw kernel name, an earlier raw file’s or the document’s, a stub or borrow. Not while the state is unlocked (a binding’sbefore/aftercode, anAddToMacro!append), nor for a locked name, whichinstall_definitionrefuses first (copy_provides_refuses_locked). Each name kept for the binding is logged once per copy, at Info. - note_
copy_ provides_ title_ page - Keep a stand-in copy’s own title page (
\maketitle,\@maketitle), defined while it is read (install_definition,\newcommand’s refusal), whether the binding’s lock refuses it or the overlay holds it: what it prints decides which of the copy’s setter defaults the document shows (frontmatter_stores::copy_title_page_prints, latexml_engine). - note_
document_ call - A macro of LaTeXML’s own read its arguments
argsfrom the document’s text (Expandable::invoke, whilecrate::definition::origin::document_call_watch): kept while its expansion is read, the calls whose expansions ended dropped. An argument-less call is not kept. - note_
dropped_ argument - A binding’s macro
csdropped its required argumentargument— its token body never names it, nor does the binding declare it dropped by design (Expandable::dropped_by_design) — while a frontmatter entry the document gave is digested (Expandable::invoke, whilecrate::definition::origin::dropped_argument_watch): kept for the title-page check (latexml_enginetitle_page_check, jmlr’s\titletag). A blank argument is not kept. - note_
redefined - A lock dropped a definition of
token:<cs>:redefined, and whose code made it,<cs>:redefined@class(a class file’s load, the packages it loads included:ClassLoadFrame) or<cs>:redefined@document(the document’s, a package’s it loads). A document’s by-meaning wrapper of the class’s\maketitle(\let\oldmt\maketitle \renewcommand\maketitle{\oldmt}) leaves the class’s own title page in force (latex_constructs:: title_marks_unknown, OD #1053). A format file’s drops (latex.ltx over the plain pool’s\newif) are neither’s. - note_
setter_ call - A macro
csis called (Expandable::invoke, whilecrate::definition::origin::setter_watch): a watched setter called outside a stand-in copy’s read is the document’s (or its binding’s) call,<cs>:called, whatever its arguments —\author{}as much as\author{Jane Doe}, which a binding’s accumulating\author(inst_support’s) does not queue nor clear. - note_
stand_ in_ file - A stand-in binding’s own code loads
file, or makesfile’s binding’s definitions as code without loading it (svjour3_cls.rs over svjour’s, jhep_cls.rsjhep_definitions): a file it is built on (State::stand_in_load_files), not marked loaded. - note_
store_ call - A setter a raw class or a raw file of the document’s own directory made was called while the document’s text is read
(
Expandable::invoke, whilecrate::definition::origin::store_call_watch): its stored argumentsargs, and thosekeysoptional or in brackets, kept for the title-page check’s third source (latexml_enginetitle_page_check::digest_raw_setter_calls); a replacing setter’s earlier call is superseded by this one, as its store is. - open_
class_ load_ classes - The classes the stand-in binding’s load loaded — its base class — for the copy read now
(
ClassLoadRecord::classes). While the copy’s own code runs, the classes of the class load open now; inside a class the copy’s own\LoadClassloaded (a shipped mybase.cls between the copy and a TeX Live class), the classes loaded when the copy’s first class load began (State::copy_class_loads), so a class mybase.cls\LoadClasses meets the binding’s base class too, not the empty class load of mybase.cls (72a review r7 NIT 8; guardperfect_kernel_batchint23::a_shipped_intermediate_class_meets_the_class_slot). - open_
copy_ class_ load - The stand-in copy whose own
\LoadClassis open now, if any (ClassLoadFrame). - opened_
sources_ snapshot - Snapshot of the opened-sources read-log (see
record_opened_source). - owns_
calls - Whether the locked
bindingofcsowns its calls, so that the document’s own definition ofcstakes its other uses (install_definition): its signature reads a braced argument — its first mandatory parameter is one ofBRACED_ARGUMENT_TYPES, after optional ones only (\text{},\title[]{},\cite OptionalMatch:* [][] Semiverbatim) — or it is itself such an override (a loop redefining it on every iteration). Derived from the binding’s own parameter list; a binding that reads its argument downstream (\section’s\@startsection,\footnote,\url) or none (\maketitle) stays absolutely locked. So does the machinery (user ruling 2026-10-11: the machinery stays absolutely locked): LaTeX’s internal namespace, a name with@, which LaTeX’s convention keeps out of a document’s reach until\makeatletter(clsguide.tex:187, latex.ltx:1797). Its locks keep LaTeXML’s engine model against code that re-implements it (\alloc@{}{}{}{}{}, called\alloc@0\count\countdef\insc@unt;\@startsection,\@caption,\@lbibitem). - package_
loaded \@ifpackageloaded{name}(file_loaded).- pdf_
driver_ option - Whether the document is a pdflatex one by its class options (
set_pdf_driver_option). - plain_
tex_ document - Whether the document being converted is a plain TeX one (
set_plain_tex_document): latexml.sty’s preload must not load the LaTeX format for it. - pop_
daemon_ frame - pop_
frame - Ends the current level of grouping.
Note that this is lower level than
\egroup; - pop_
if_ frame - Perl
shiftValue('if_stack'): close the innermost active conditional. - pop_
value - pops the last value in a named
Stored::VecDequeStoredqueue, if any - provide_
only_ declines - Does a provide-only load (
ProvideOnlyGuard) decline this definition oftoken? While the guard lives, a binding’s definition (DefinitionOrigin::Binding,FallbackorBorrowed: OmniBus and every binding it requires, inst_support’s\author[]{}and epsf’s\epsfboxamong them) is declined when the name was defined before the guard: defined now in the\providecommandsense (latex.ltx\@ifundefined: a meaning other than\relax,binding::def::dialect::is_defined_token), not a fallback guess (is_fallback_meaning), and not assigned since the guard began (provide_only_assigned: the load’s own names, which it may define again — OmniBus’s\keywords{}before its\keywordsthat also opens{keywords}). An environment\begin{X}/\end{X}counts as defined when\Xis (latex.ltx\beginruns\X), and\end{X}also when\endXis. The binding definers (def_macro,def_primitive,def_constructor,def_register,def_conditional,def_environment,def_math) andLet!consult it before they assign anything; TeX’s own\def/\letdo not, so TeX code run during the load keeps its usual effect (a hook appended to, a scratch macro), nor does the loader’s bookkeeping, made at its caller’s origin. A macro markedextends(it wraps and delegates to the name’s current meaning) is not declined. - push_
daemon_ frame - push_
digested - Appends a digested box to the
Stored::VecDigestedlist underkey, creating the list globally when missing (aspush_tokens, PerlpushValue, State.pm:218-223). - push_
frame - push_
if_ frame - Perl
unshiftValue('if_stack', …)(Conditional.pm:63): open a conditional (seeState::if_stack). - push_
pending_ resource - push_
tokens - Pushes Tokens into a
Stored::Tokensvalue when defined, or assigns when new. - push_
value - manage a (global) list of values
- raw_
loaded - Was
file’s raw TeX read (<file>_raw_loaded, OXIDIZED_DESIGN #23)? - rebind_
let_ copies - Re-point every
\letcopy ofcs’s current definition — any other meaning bound to that very definition (the sameRc: taken while it was in force, and not redefined since) — tonew. Each binding is replaced in place, so a copy keeps its scope: a local copy stays local, and one a group shadows isnewagain when the group ends. Returns how many bindings were re-pointed;csitself is left to the caller, which installsnewfor it. For a definition TeX treats as fixed before any code runs but installed late here: the job’s\jobname(core_interface::install_jobname). - record_
opened_ source - Record a named source in the opened-sources read-log. Called from
Mouth::createfor file and cached-content mouths — a cold path (one call per file open, not per token). - record_
redefined_ default - Record the default of the optional argument a refused redefinition of
tokentakes first, as"{cs}:redefined@default"([1][\proofname]), for the locked binding to title its own use with — only under a lock that holds only against copies (copies_lock), whose binding reads it. - remove_
error_ stub - Undo
generate_error_stub:token(and a stubbed\ifX’s\Xtrue/\Xfalse) is undefined again. A discardedcrate::util::logger::DiagnosticsHoldtakes back its scope’s errors and the stubs standing in for them, so the document’s own later use of the command reports it. - remove_
meaning_ global - Remove a token’s meaning entirely — the token becomes undefined, as if it
had never been defined, so a later use takes the normal undefined-CS error
path naming the token itself. Bypasses the group-undo journal: intended
ONLY for format-bootstrap time (no user groups open), where a format layer
retracts a definition inherited from a lower layer that the emulated
format must not expose (e.g. plain.tex’s
\+in a LaTeX session — real LaTeX is INITEX-based and never defines it). - remove_
value - inline lookup_value after which globally assign an empty Tokens() to undo
- remove_
value_ sym remove_valuevariant for hot call sites with a pre-pinned SymStr (seecrate::pin!) — added forafter_assignment, which fires on every\def/\let/register assignment.- remove_
vecdeque - replace_
value_ in_ frame - Replaces the value
keyhas in stack frameframe(0 = innermost), which must have bound it; returns the value it had there,Nonewhen the frame made no binding ofkey(and nothing is changed). - reset_
document_ calls - Forget the document calls (
note_document_call): a conversion’s start. - reset_
pending_ resources - reset_
provide_ only_ assigned - Begin a provide-only load: no name assigned in it yet.
- reset_
thread_ state - Free every definition/register/box this thread accumulated, returning
all three
Statesingletons (STATE,STD_STATE,STY_STATE) to a fresh, empty baseline and the rotation toMain. - restore_
if_ stack - Put the active conditionals back as
if_stack_snapshottook them: the frames it held, their state as it was — those a run opened dropped, those it closed (a\fiof its own matching one opened before it) open again. - restore_
pushed - Make
valuethe list underkeyagain, in place: whattake_pushedtook, the list built since dropped. - robust_
inner - The inner
\cs␣that the robust commandcswraps (its meaning the parameterless\protect \cs␣:\DeclareRobustCommand, a binding’srobust => true,let_i’s copy of either), whose definition takes the arguments;Nonefor any other meaning. - routed_
copy_ text_ name_ yields - Does a routed copy, read now,
\newcommand(or\providecommand) a declared text name (copy_text_name_declared) that LaTeXML’s code defined (owned as rule 1 tells,owned_by_the_semantic_layer) and no base class the copy\LoadClasses defines? Then the declaration defines it, as the real class’s first definition (proto.cls:798’s\abstractname, :1731\newcommand\apj{\ref@jnl{\it Astrophys.\ J.}}over the aas_macros binding’s “ApJ”, 1402.7103; OXIDIZED_DESIGN_DIVERGENCES #731 rule 14); a name the copy’s base class has is LaTeX’s “already defined”, as before. Whether its definition stands for the document is decided when the copy’s read ends (leave_copy_provides_frame,copy_text_refusal). - search_
paths_ push_ front - Global prepend (Perl
UnshiftValue(SEARCHPATHS)) — a persistent search dir. - set_
absorb_ limit - Set
absorb_limit(Perllatexml.sty.ltxml:104). - set_
bindings_ dispatch - set_
dvi_ driver_ option - Records whether the main file’s
\documentclassnames a DVI driver option (dvips,dvipdfmx, …) and the file sets no\pdfoutput=1: the document is a latex+dvips one (the K6 ruling’s DVI cue, stream F). - set_
extra_ bindings_ dispatch - set_
figure_ output_ cue - Records the output-mode cue of the figures the document’s source includes (
FigureOutputCue); set per conversion before the session’s preloads load. - set_
font_ parameter - Set
\fontdimen<p>of the font whose array is stored underkey; a parameter past its end grows it with zeros (TeX_Fonts.pool.ltxml:138-146, tex.web §580), and a font without one gets an array of its own — as TeX’s\nullfonthas parameters, where Perl’s setter does nothing for a font without data (:141). Written in place and so global, as every font parameter assignment is (tex.web §1253): the array is created unbound by any group, whatever\globaldefs. Returns false, assigning nothing, for parameter 0 or one past TeX’s font memory (font::FONT_MEM_SIZE). - set_
if_ count - Put
if_countback: a discarded run the read budget ended counts against no limit (latexml_engine sect05.rsspeculative_run_read). - set_
if_ limit - Set
if_limit(Perllatexml.sty.ltxml:101). - set_
indirect_ model - set_
input_ encoding - set_
label_ mapping_ hook - set_
local_ binding_ finder - set_
nomathparse_ flag - set_
pdf_ driver_ option - Records whether the main file’s
\documentclassnames thepdftexdriver option: the document is a pdflatex one, whatever PostScript files it also ships (the K6 ruling’s PDF cue, mirroringset_dvi_driver_option). - set_
plain_ tex_ document - Records whether the document about to be converted is a plain TeX one, by arXiv AutoTeX’s test (its main file, or a
file a cue-less main file inputs, names neither
\documentclass,\documentstylenor\begin{document}before an\endinput); set per conversion before the session’s preloads load (latexml::converter::Converter::note_main_source). - set_
prefix - Set one of the definition prefixes global, etc (only global matters!)
- set_
search_ paths - Replace SEARCHPATHS GLOBALLY (Perl
AssignValue(SEARCHPATHS => [...], 'global')). For the local-by-default\importscoping, useset_search_paths_local. - set_
search_ paths_ local - Replace SEARCHPATHS in the CURRENT group only (Perl
AssignValue(SEARCHPATHS => [...])default-local): reverted when the enclosing\import/\subimportgroup closes. This is what makesimport.styfaithful without an explicit save/restore stack. - set_
source_ date_ epoch - Records the date of the document’s source (Unix seconds, UTC): the newest modification time among the TeX source
files of the bundle it came in (
Config::source_date_epoch),Nonewhen the source carries none; set per conversion before the session’s preloads load. ar5iv’s archival preload reads it as the job’s clock. - set_
source_ map_ flag - set_
state - setter_
call_ is_ observed - Would
note_setter_callobserve a call ofcs? Without the observation, for a native reader that declines such a call to whoever then makes it. - setter_
called - Was the watched setter
cscalled outside a stand-in copy’s read (note_setter_call)? - shift_
value - shrink_
thread_ state - Empty this thread’s three States to zero-capacity tables, for a thread about to exit
(
latexml_core::shrink_thread_engine): they are leaked roots, so what they hold outlives the thread. - snapshot_
top_ frame_ keys - snapshot_
top_ frame_ meaning_ keys - Snapshot of the keys currently bound at the topmost (calling) undo frame
for the Meaning table. Used by Perl-style autoload triggers that need to
promote everything a package’s load just installed at this scope to
GLOBAL — without that promotion, sibling autoload triggers fired AFTER
a group pop would re-fire on a now-undefined sibling CS (the canonical
case is
\begin{subequations}triggering amsmath autoload at depth=N, then a later\begin{align}at depth=0 finding\alignundefined because amsmath’s depth=N install was popped on\end{subequations}). - source_
date_ epoch - The date of the document’s source (
set_source_date_epoch). - source_
map_ enabled - Whether source-locator (
--source-map) tracking + emission is on. Read by the source-provenance machinery (mouth token-start capture,Document::absorbdata-sourceposstamping) to stay zero-cost when off. Seedocs/performance/SOURCE_PROVENANCE.md. - source_
table_ snapshot - Snapshot of the
sourcestable (index = tag) for emitting the document-level tag→file header. - source_
tag - Find-or-append a source file in the document-level
sourcestable, returning its integertag(index). The per-elementdata-sourceposattribute carries this compact integer rather than a path — the Source-Map-v3sourcesconvention (compact + anonymisable). Only called on the source-map path. Seedocs/performance/SOURCE_PROVENANCE.md§0.1. - stage_
snapshot - Take a snapshot now and store it under a named key for later retrieval.
Intended for phased engine init (e.g.
stage_snapshot("bootstrap")called right afterlatex_bootstraphas loaded). - stage_
snapshot_ value - Stage an already-taken snapshot under a named key. Used by callers
(like
ini_tex) that want to snapshot at a specific point without waiting for a pool hook. - stand_
in_ built_ on - The files the stand-in binding loaded last loaded from its own code (
State::stand_in_last_files). - stand_
in_ copy_ meaning - The meaning the latest stand-in copy of
file(a file name,NJDnatbib.sty) gavetokenin its own code: its overlaid version of a name its binding owns, if the copy redefined it (note_copy_provides_assignment). For a binding’s code that runs after its copy (\AtEndOfPackage), to tell the copy’s version by what it defined. - stand_
in_ last_ load_ names - Every name the latest stand-in binding’s own code assigned (
State::stand_in_last_load). - stand_
in_ public_ names - The public names (letters only: no
@) the latest stand-in binding’s own code assigned (State::stand_in_last_load). - standard_
class_ binding_ name - Is
tokena text name the standard class’s binding assigned in its own load, which a derivative of that class read now defines itself (binding::content::standard_class_binding_assigned, OXIDIZED_DESIGN_DIVERGENCES #731 rule 13)? In TeX the derivative is read in the class’s place, so its\newcommandof the name is the first: aip-cp.cls:875\newcommand\refname{REFERENCES}(1506.04050, 1604.08112). Only a declared text name yields (copy_text_name_declared:\refname,\figurename,\abstractname); every other name the binding defined stays its markup of the class —\appendix(<ltx:appendix>, article_cls.rs, book_cls.rs), book’s\frontmatter/\mainmatter/\backmatter(unnumbered chapters), whose\newcommands in a full class copy (hep-ex0405054’s book_modified.cls:531, math0301023’s khbook.cls:285; 0705.2210, hep-ph0008011, cond-mat0402505, quant-ph0409078) lost the appendices and numbered the preface; the caption formats (\fnum@table),\@ptsize,\@pnumwidth. Names a stand-in the derivative loads assigned are not the class’s (guardperfect_kernel_batch77w::standard_class_derivative_defines_only_its_class_names). - state_
unchanged_ since - Is the state unchanged since
watchbegan (watch_state)? - subfile_
scope_ at_ depth - Named scope bracketing a subfile LaTeXML included itself — a
standalonechild’s preamble, an\imported file. Real LaTeX has no group at either spot (standalone gobbles the child preamble; import restores its paths by plain\defafter the\input), so a package loaded inside one is an artifact of LaTeXML executing what the real packages skip. Bindings that open such a bracket activate this scope;require_packagereads it to decide whether a load must outlive the bracket. See OXIDIZED_DESIGN #65. - subfile_
scope_ here - The subfile scope for the CURRENT frame depth — what a bracket activates on
opening, and what
require_packagetests before hoisting. - swap_
copy_ provides_ hook_ seam - Put lthooks’ code registration (
\AddToHook code, the inner macro latex.ltx’s\AddToHookhands the hook name, label and code:\hook_gput_code:nnn{#1}{#2}{#3}) under\lx@copy@provides@AddToHook, which registers nothing (copy_provides_defers), whileon— a stand-in’s copy is read — and back after. The kernel’s own meaning is kept as\lx@copy@provides@saved@AddToHook. No-op where the format has no hooks or no seam is defined. - swap_
meaning_ log - Exchange what the meaning log (
begin_meaning_log) holds since it was last read withbuffer, an empty one: a field token’s read of the log, so it allocates nothing. - take_
dropped_ arguments - The arguments binding macros dropped (
note_dropped_argument) since the countfrom, taken; withfromthe count before them, for a nested watch. - take_
pending_ resources - take_
pushed - Take the list
push_tokensorpush_digestedhas built underkey, leaving it empty in place;Nonewhen there is none. - take_
snapshot - Take a snapshot of the current State (for dump diff).
- take_
store_ calls - The setter calls kept (
note_store_call), taken: none are left, a new conversion’s or after a title page’s. - takes_
optional_ first - Whether a definition takes an optional argument first whose default is not empty —
[1][\proofname](amsthm.sty:431),[1][\thu@proof@name](thuthesis.cls:4052): the shape of a copy of amsthm’s proof, whose optional argument is the head’s text and whose default the name, which a lock that holds only against copies reads (files_lock_holds). An empty default ([1][]) adds to a head of the file’s own (thmbox.sty:214\proofname\ #1) or makes a command, not a proof environment (nccthm.sty:173\newcommand*{\proof}[1][]). - top_
frame_ new_ meanings - The meanings first made in the innermost group: the control sequences bound at the topmost frame and nowhere outside it (every binding they have is the frame’s), with their current binding (a key bound there to nothing is left out).
- top_
group_ frames_ meanings - The meanings the topmost
nframes bind — new ones and changes to what an outer frame defined — that are plain groups ({…},\begingroup): a frame an environment or a mode opened (it bindscurrent_environmentorMODE) is skipped, its bindings being that construct’s own machinery. Each key with the binding of the innermost such frame that binds it (a key bound there to nothing is left out). For a replayed environment begin code (sect05.rsreplay_class_setter). - top_
if_ frame - The innermost active conditional, Perl
LookupValue('if_stack')->[0]. - try_
assign_ value_ global assign_valueglobally on the reporting path, where the state may be borrowed (astry_lookup_int): whether it was assigned.- try_
lookup_ int lookup_intvariant that never panics on a live mutable borrow.- try_
lookup_ string try_lookup_int’s string counterpart: the string atkey,Nonewhen it holds none or the state is borrowed.- unbind_
value_ in_ frame - Undoes the bindings of
keythat stack frameframe(0 = innermost) made — what popping that frame would undo, for this key alone — and leaves the frames above it as they are. - undo_
depth - Undo-stack depth (open TeX groups) — pass-1 streaming telemetry.
- unicode_
engine_ profile - Whether the document’s engine persona is a Unicode engine: the
luatexorxetexprofile of latexml.sty. Both formats load load-unicode-data (latex.ltx:22071-22076), take\charcode points above 255 natively and have no utf8.def byte model; the engine-identity probes stay per-profile. - unmark_
loaded - Take back a binding’s load of
filethat its original does not make (revtex4_support’s hyperref, which revtex4-2.cls never loads): its record, so the document’s own request runs the binding again, and\ver@<file>, so\@ifpackageloadedis false until then. The definitions stay; the binding’s other records too (mark_unloadedclears them all). - unmarked_
by_ document - Has the document unloaded
file(amsthm.sty), which a class binding marked loaded on its class’s behalf, by letting its\ver@<file>to\relaxor\undefined? LaTeX’s loaded test is that macro (latex.ltx\@ifl@aded:\expandafter\ifx\csname ver@#2.#1\endcsname\relax, true for both), which a binding load defines (content.rs, Perl Package.pm:2326). The rule is narrow, as floatrow’s marks are (user ruling 2026-10-14: no general loader\ver@rule; floatrow_sty.rs): only a file a binding recorded as<file>:class_marked— ams_support_sty.rs for amsart’s\@namedef{ver@amsthm.sty}(amsart.cls:41-42; amsproc, amsbook alike) — is so taken back; every other file keeps the loader’s own record. The amsart idiom is\expandafter\let\csname ver@amsthm.sty\endcsname\relaxbefore\usepackage{amsthm}(1510.08833, 1704.05671, 1707.00258, 1611.00843, 2106.07418, 2304.10644). Perl’s loader reads only<file>_loaded(Package.pm:2327-2329), KNOWN_PERL_ERRORS #720. - unshift_
value - use_
main_ state - use_
std_ state - use_
sty_ state - value_
history - Starts a new level of grouping.
Note that this is lower level than C<\bgroup>;
Diagnostic helper: dump the keys in undo
0’s value table. For temporary instrumentation only — no production callers should rely on this. The newestnvalues bound tokeyin the Value table, newest first — one entry per frame that bound it (LXML_TRACE_FRAMESgroup-stack dump). - value_
in_ frame - The value
keyhas in stack frameframe(0 = innermost): Perl State.pm:280-286valueInFrame, which skips the bindings the frames above it made. - warn_
not_ register - Perl
LookupRegister/AssignRegister’s Warning (Package.pm:1367-1369, 1404-1405) on a cs that is not a register. - watch_
meanings - Watch the meanings of the control sequences whose names
selecttakes, from now on: any later assignment by a document, a raw file or a format file that changes the standing meaning of one, however local, is seen bywatched_meaning_changedfor the rest of the conversion; a new name has none to change. A native path that stands for a family of macros answers only while they are what it ports, at the cost of a test by two bytes per such assignment and none per use (latexml_enginel3fp_native). - watch_
setters - Observe the calls of the setters
names(State::watched_setters). - watch_
state - Begin a watch on the state, ending the one held (the title-page reading’s key,
latex_constructs::title_page_reading). Every write ends it (an assignment, a write in place, a box’s\wd, a group’s end restoring a value) but anlx…value’s; a rollback (AssignmentJournalGuard::rollback) puts back the watch it began with, with the state. - watched_
meaning_ changed - Has a meaning
watch_meaningswatches changed? The first that did. - with_
build_ floor - Run a build step (a fragment’s
Document::absorb) that the streaming driver interleaves with digestion. Eager Rust and Perl build AFTER digestion, outside every group, so a constructor’s localassign_value(the aligning context’sALIGNING_NODE, a frontmatter store, a counter) never pops; interleaved, the same binding lands in whichever digestion group is open at the seam and is popped at that group’s end — tikz-network under tufte-book streamed with a stale root-level aligning context re-exposed by\end{fullwidth}, stampingltx_align_lefton chapters 4-5 and the appendices. Bindings made at the depth the step began at are therefore global for the step; the frames the build itself pushes above that depth (collected environment frames) keep their local bindings and pop as in eager. - with_
font_ info - with_
let Letmacro setter Runbodywithcstemporarily\lettotarget(local scope), then restorecs’s prior meaning — the{\let\cs\target …}idiom of latex.ltx (\protected@edef’s\let\protect\@unexpandable@protect, :1442) without a save-stack group, for a reader that must not open one. The prior meaning is restored whether or notbodyfails. Acswith no meaning is restored to none.- with_
mapping - manage a (global) hash of values
- with_
mapping_ keys - with_
mapping_ sym - with_
meaning - Closure-based variant of
lookup_meaning— avoids the per-callStored::clone()when the caller only needs to inspect the meaning (e.g. extract a CS Token from an Expandable/Primitive definition). Stored::clone is ~1% of total instructions on siunitx-heavy fixtures (5M+ calls per run, each cloning a full Stored enum). This helper borrows the stored value instead. - with_
pretended_ load - Run
readwithfilemarked loaded in the current group, its record and\ver@<file>, where it is not loaded and not recorded (a recorded load the document unmarked keeps its record): cleveref’s binding reads cleveref.sty as if amsmath were loaded (Perl cleveref.sty.ltxml:23-27). - with_
search_ paths - with_
stacked_ values - with_
stacked_ values_ sym - Sym-keyed variant of
with_stacked_values. - with_
tag_ property - with_
tag_ property_ mut - with_
value - with_
value_ mut - with_
value_ sym - Sym-keyed variant of
with_value— avoids the per-callarena::pin(key). - with_
vecdeque - x_
equals XEqualscheck for two token arguments
Type Aliases§
- Call
Arguments - The arguments a
DocumentCallread, shared by the entries made inside it. - Stash
Table - The
(table_name, key, value)contents of a stored table of assignments - Table
- The type of values that are storable by the different namespaced “tables” in State.