A module the LaTeX format holds (OXIDIZED_DESIGN_DIVERGENCES #1142): marker is a control sequence the format
defines while it does (\bbl@version from babel’s hyphen.cfg, \c__kernel_expl_date_tl from expl3-code.tex),
tree_dir the module’s directory in the TeX tree (babel, l3kernel), which finds the tree’s file past a copy in
the current directory (kpathsea’s . comes first).
The state mapping of the files read as the document’s content (load_tex_content: the main file, each
\input/\include of content, a literal: source as its text) to their reading order: the document’s own text,
which the title-page check reads for the words the document wrote (latexml_engine
base_utilities::frontmatter::title_page_check). Rust-only. A mapping, so a book of thousands of files interns each
path once (issue 1011: a list re-interned whole per file filled the arena).
Perl AddToMacro($cs, @tokens) (Package.pm:2534): append to a macro’s expansion, unlocked, in
add_to_macro_scope; an undefined cs is an Error and is defined with the tokens, as latex.ltx’s \g@addto@macro
does (OD #1036). One implementation for the AddToMacro! macro and Rhai’s AddToMacro.
The scope of a binding’s AddToMacro: global (Perl Package.pm:2545-2547), except in a package
loaded inside a standalone subfile bracket (OXIDIZED_DESIGN #63/#65), where the package’s own
definitions are local to the bracket: a global addition outlived them, and every later table of
the main document called xcolor’s undefined \@xcolor@tabular@before (2512.09430; Perl the
same, KNOWN_PERL_ERRORS #614). The addition then lives as long as the package does — and as in
pdflatex, where standalone.sty skips the sub-file’s preamble, the main document’s tables carry
no hook of a package only a sub-file loaded. OXIDIZED_DESIGN #543.
Does a compiled binding answer an existence test (\IfFileExists, \InputIfFileExists) for file, as the file
itself? Perl’s \IfFileExists asks FindFile (latex_constructs.pool.ltxml:5692-5697), which takes a .ltxml
binding for the file (Package.pm:2125-2128): pgf’s \IfFileExists{pgfsys-latexml.def} (LaTeXML’s own driver) and
babel’s \InputIfFileExists{italian.ldf} on a tree without it find their bindings. A binding standing in for an
author’s file is not that file (crate::binding::author_files): TeX finds arxiv.sty only where the paper ships
it, and so do we, by the disk search the caller makes first (2606.27281; Perl answers true for its own such
bindings, neurips.sty, KNOWN_PERL_ERRORS #770).
Perl Digest (Package.pm:393-402): digest with side effects and mode changes, then leave a horizontal mode the
digestion entered (leaveHorizontal_internal), as crate::parameter::Parameter::digest does for an argument.
The file request the innermost binding now loading answers, with its extension (epsf.sty for \usepackage{epsf}
and for \input epsf.sty, epsf.tex for \input epsf): the file TeX would read, which a binding serving several
spellings of one file may need to tell apart where \@currname/\@currext cannot, an \input leaving them unset
(epsf_sty.rs epsf_resets_globally; 0906.1361, astro-ph0006390, astro-ph0109126, astro-ph0410051,
astro-ph9701125). None outside a binding’s load.
String entry point for Invocation (Perl: Invocation($token,@args) with a string
first argument). The string is tokenized via TokenizeInternal; if it yields a single
token, this reduces to build_invocation on that token. Otherwise the tokens are
treated as an “anonymous macro” containing parameter markers like #1, and the
arguments are substituted in.
The calling file’s option list — latex.ltx:18637 \@loadwithoptions\lets \opt@<callee> to \opt@\@currname.\@currext, the shared half
of \RequirePackageWithOptions and \LoadClassWithOptions (Perl
withoptions => 1, Package.pm:2610 opt@prevname.prevext). Empty when no
file is being loaded.
Is a class loading now (load_class entered and not yet returned)? A class’s own tests are answered by what it
has defined so far (state::class_defines_chapter).
Convert a LaTeX-style argument spec to our Package form.
Ie. given $nargs and $optional, being the two optional arguments to
something like \newcommand, convert it to the form we use
Two-optional variant of convert_latex_args — mirrors Perl’s
convert2optArgs helper in twoopt.sty.ltxml. \newcommandtwoopt{\cs}[n][d1][d2]{…}
builds a signature of [Default d1][Default d2]{…}… where the remaining
n - 2 args are plain required.
The control sequence a binding’s DeclareOption defines, its name recorded as declared: Perl Package.pm:2421-2423,
\ds@<option> whole, and an empty name (Perl’s false $option, as undef) is the default handler \default@ds.
A name macro a heading is set from (\contentsname, \refname, \indexname, \acknowledgmentsname, …)
digested in a group of its own, {\name}, as a class’s \section*{\name} sets it: a font switch it makes
unbraced stays in the heading (RecipeBook.cls:207-209 \renewcommand{\contentsname}{\hypertarget{contents}{\bfseries \fontsize{…}{…}\selectfont Recipes}} leaked into every later heading and paragraph; recipebook/LongSample), and a
\centering in it, applied at the group’s end, still centres the heading (tidyres-doc.tex:9). Perl digests the
list names as text (DigestText, latex_constructs.pool.ltxml:734; Package.pm:405-411, a restricted-horizontal
mode frame that scopes the font but drops the \centering; the port’s bare digest leaked, Rust-only) and
\refname/\bibname/\indexname bare (DigestIf, :3885, :4523), which leaks the font in Perl too.
OXIDIZED_DESIGN #528, KNOWN_PERL_ERRORS #606.
The assignment of a file’s names (\CurrentFile, \CurrentFilePath and their Used twins) for request, and its
name: \__filehook_file_parse_full_name:nN, the directory without its last /, the name with .tex when the
request has no extension, each a string as \file_parse_full_name:nN makes it (outer_text.tex’s _ no
subscript).
Strip version/arxiv suffixes from package names to find existing bindings.
Returns the fallback filename (with extension) and which kind of fallback fired.
Perl Package.pm L2141-2210: FindFile_fallback
Pure-check variant of find_file_fallback: strips the same
suffix/prefix patterns and reports whether the fallback name has a
registered binding, but DOES NOT eagerly invoke the binding’s
load_definitions. Use this from pre-flight existence checks (e.g.
class_cls_via_fallback in tex_job.rs) where firing the binding’s
body has side effects (\LoadClass, \RequirePackage) that contaminate
the subsequent real load. Witness: astro-ph0002213 — the \psfig
cluster fix (mn1 → mn fallback was eagerly running mn.cls’s
\LoadClass{article} before the \documentstyle[epsfig]{mn1}
option-pass-through machinery had a chance to enqueue epsfig into
opt@article.cls).
Decode a codepoint using the fontmap for a given font and/or encoding (Perl: FontDecode).
Returns the decoded glyph (if any) and the possibly-adjusted font.
Decode a string using the fontmap for a given encoding (Perl: FontDecodeString).
If implicit is true, codepoints missing from the map decode to themselves.
Perl’s IfCondition($if, @args) (Package.pm:1238): the test runs on the caller’s arguments, never reading the
input; an argument not given is Perl’s undef.
\InputIfFileExists’ code after \@@input (latex.ltx:19670-19673, :19655), where a content file read with the
hooks ends (gullet::close_mouth): its names set again, file/<name>/after, file/after, the stack’s pop. With
both hooks empty and the file at a real end, the names are popped here and no token is left
(OXIDIZED_DESIGN_DIVERGENCES #1196, DG D-48): as LaTeX before 2020-10 read \InputIfFileExists, nothing follows
the file, so a file ending a row (a & b \\) leaves the next \hline, \toprule or \cline at the row’s start
(0908.0798, 1106.3602, 1710.05930); TL 2025’s non-expandable pop opens a row there (“Misplaced \noalign”). Code in
a hook keeps TL 2025’s reading.
The entries of \input@path (each brace group one directory, as \tl_map_tokens:Nn takes them; latex.ltx’s
\@iffileonpath and l3file’s \file_full_name:n look a file up under each in turn); none where it is undefined.
Whether a confined conversion searches the \input@path entry dir (absolute, or under one of paths); one
Warning per entry outside every root, which is then dropped.
A key=value processor’s mark without running options here (process_key_options): the current package’s
options are processed, and \@curroptions stays as it was at its end.
LaTeX’s argument count [n], 0 to 9: latex.ltx:1276-1283 \@yargd@f writes #1…#9 and then the count, so a
count outside is tex.web §476’s “You already have nine parameters”. An Error, then the count clamped into range.
loads a binding from the main binding dispatcher, if available+found.
Ok(Some(source)) on load — source is the on-disk path for a runtime
.rhai file binding, None for a compiled-in one; Ok(None) = not loaded.
Perl: LoadClass($name, withoptions => 1) — load a class passing the
caller’s class options through to the child. Reads class_options from
state (populated by the outer \documentclass invocation) and forwards
those as the child’s options list, matching Perl Package.pm LoadClass’s
withoptions branch.
\LoadClassWithOptions — the calling class’s options go to the loaded
class (latex.ltx:18637 \@loadwithoptions, calling_file_options);
with no file on the load stack (a class binding delegating directly, e.g.
amsart → ams_core) the document class’s recorded options stand in. The
\LoadClassWithOptions constructor once passed an EMPTY list, so a raw
class delegating its options (oblivoir.cls → oblivoir-utf.cls:77
\if@AMSmath\RequirePackage{amsmath}) never saw [amsmath] (istgame-doc).
Merge the font \selectfont chose from the NFSS codes (sect13.rs): those
codes are the state already, so nothing is written back — a family whose
table entry also carries a shape (cmsltt) must not overwrite the
\f@shape the next step selects.
Name the binding now loading by the file a dispatcher found (a runtime .rhai binding), before it runs: its
(Loading … note names that path even when the binding logs inside it (#560, #945).
The text an NFSS state macro (\f@family, …) holds, None while it is
undefined (plain TeX). An \edef leaves a parameterless list of
characters, read directly; anything else is expanded, as \selectfont
reads it.
An option’s ARGUMENT tokens (latex.ltx:18514 \@pass@ptions stores them by
\protected@xdef): letters LETTER (babel’s \ifx\CurrentOption\bbl@tempa
match), braces GROUP (vmargin={0mm,0mm} is one pair for \setkeys), and
@ a LETTER too — the list crossed a string, and a control word in it
came from package/class code where @ is a letter (xebaposter.cls passes
paperwidth=\xebaposter@finalpaperwidth, a register token, to geometry;
re-read with @ OTHER it split into the undefined \xebaposter; the
\@raw@opt@ writer makes the same choice) — without the tokenizer’s
end-of-line space, which is not part of the argument (landscape␣ matched
no key).
Pass the sequence of @options to the package $name (if $ext is ‘sty’),
or class $name (if $ext is ‘cls’).
Perl Package.pm: PassOptions($name, $ext, @options)
Stores options to be processed when the package/class is loaded.
latex.ltx:18509-18526 \@pass@ptions, the single writer of both option
records. \opt@<name>.<ext> is the \protected@xdefed list the loader
and \ProcessOptions read (here a State list of strings). \@raw@opt@<name>.<ext>
holds the unprocessed argument tokens, accumulated comma-separated
(:18521-18525): \gdef on the first pass, \g@addto@macro{,#2} after.
ltkeys’ \ProcessKeyOptions reads only this record (:19398, :19457-19470).
The options run as process_options runs them, for a package whose own options a key=value processor reads:
the kernel’s \ProcessKeyOptions (latex.ltx:19379), kvoptions (kvoptions.sty:739), xkeyval (xkeyval.sty:132),
pgfopts (pgfopts.sty:32), l3keys2e (l3keys2e.sty:67), caption3 (caption3.sty:399). Each marks the options processed
at the package’s end and leaves \@curroptions as it was.
The request a \ProvidesPackage/\ProvidesClass answers, as (\@currpath\@currname, \@currext)
(latex.ltx:18471-18486). Where our loader reads a .sty/.cls without making it the request — a binding’s raw read
of a file, a copy read in a binding’s place (routed_copy_request, read_stand_in_copy) — the request is the file
read, as TeX’s \RequirePackage of it would make it. None in a binding’s code, which declares its own name
(xcolor_sty.rs \ProvidesPackage{xcolor}), and with no request (an \input of a .sty in the document’s preamble,
where TeX’s \@currname is empty: the declared name is kept).
The [<date> <version> <info>] a package or class declares with
\ProvidesPackage{name}[…] / \ProvidesClass{name}[…] (ltclass:
\ver@name.ext is that text), or the date v<version> <info> that
\ProvidesExplPackage{name}{date}{version}{info} makes of its groups
(expl3.sty:35-48), read from the installed file so a binding exposes the
same string as the raw file would. latex.ltx \xdefs the text, so the
kernel’s \space and \ read as spaces; None when no file is on disk,
it declares nothing, or the text holds any other control sequence — the
file’s own macros (listings.sty:19-23 \filedate\space\fileversion, set by
a prologue a binding never runs), whose expansion a static read cannot know.
The files read raw as definitions in this conversion (RAW_READ_PATHS), canonical: the title-page check reads
those of the document’s own directory for the words the author wrote (latexml_engine
base_utilities::frontmatter::title_page_check). Rust-only.
Is the file now being read one the author shipped: under the document’s own source directory
(SOURCEDIRECTORY), not the TeX Live tree? K22’s ownership rule — the author’s files outrank our guesses — reads
it for a fallback meaning (is_definable_latex): a \newcommand in the paper’s own .sty replaces a binding’s
guess as the document’s does (0901.4335’s mn2e_journal_style.sty\newcommand{\araa}{ARAA}).
Is a standard-class derivative (read_standard_class_derivative) being read now, its own code (a file the paper
ships, reading_author_file) rather than a TeX Live file it loads? Its \newcommand of a name the standard class’s
binding assigned defines it (state::standard_class_binding_name).
A compiled binding’s load of file that the real file it stands for makes too (elsarticle.cls:1243, acmart.cls:300,
jmlr.cls:150, jheppub.sty:37): the file’s own, so a document’s later repeat with other options is LaTeX’s “Option
clash” (apply_repeat_options). The binding records it only where the paper ships no copy of that file or one
that makes the same load (shipped_class::shipped_copy_makes_load): a copy loading it otherwise or not at all
leaves the binding’s early load, and the document’s options apply (elsarticle.cls copies: 2105.06643
[authoryear], 2206.02837 none, 2402.13480 [numbers,sort&compress]; 2209.10785’s cidr.cls, an acmart.cls copy
without natbib).
Perl’s maybeRequireDependencies (Package.pm:2776-2813) for file — load
the classes and packages its source names that have a binding — except the
classes and packages in except, for a binding that stands in for an
unbound class and chooses or has already loaded those itself.
The same scan kept to the classes and packages in only: a binding that stands in for a file it does not
interpret, and loads its own choice of that file’s packages, leaves to the paper’s copy of the file the ones
whose choice differs between copies (the algorithm packages: icml2017.sty:72-73, which a paper edits to drop
algorithmic for algpseudocode; bmvc2k.cls, algorithmic or algpseudocode by year). The copy’s
\addbibresource files are registered as by every scan (the bibliography deduplicates them). false when the
source has no such file (or it cannot be read), or when another scan is running (the re-entrancy guard), so the
binding takes its own default.
Load the binding of package name for another binding to build on, without the package counting as loaded — a
binding’s way of borrowing a package the real one does not load (theorem.sty’s and ntheorem.sty’s bindings
borrow amsthm’s theorem machinery; neither real package loads amsthm). Unless the document had loaded name
already, it is then marked unloaded (crate::state::mark_unloaded), and so is every file first loaded during the
borrow (amsthm’s amsgen, crate::state::end_borrow): \@ifpackageloaded{name} is false, as in LaTeX, and the
document’s own later \usepackage{name} loads the binding again, whose definitions then take over (amsthm.sty:77’s
\newtheorem, amsthm_sty.rs \lx@amsthm@newtheorem); "{name}.sty:borrowed" tells that load it follows a
borrow. What the borrow defines carries DefinitionOrigin::Borrowed: in LaTeX those names do not exist, so they
yield to any later definition — the document’s, or any raw file’s, TeX Live’s or the author’s (\newcommand,
\newenvironment, \providecommand; latex_constructs is_definable_latex) — and the binding sets no lock while
"{name}.sty:borrowing" is set (amsthm’s proof lock), except that natbib’s locks (\citet, \citep, its
\bibitem internals) stay, and the ijcai binding lifts those on \citet/\citep (unless natbib was loaded
first), over its own IJCAI \cite and \shortcite (2107.13646). The names the borrowing package’s real file
defines too the binding claims as its own (crate::state::claim_borrowed_meanings: ntheorem’s [amsthm] proof,
theorem.sty’s skips), and they do not yield. Not covered: a conditional (\@ifundefined{proof}) still
sees a borrowed name defined, and a local assignment of a borrowed name clears its mark for good
(fallback_meanings). Witnesses 2211.14033, 2512.06733 (ifacconf), 1507.02955 (cc.cls’s ccproof.sty:56). Guards
perfect_kernel_batch67p::{theorem_then_amsthm_takes_over, amsthm_before_theorem_stays_loaded},
perfect_kernel_batch67ps::*.
Perl: RequirePackage($name, withoptions => 1) — forward the calling
package/class’s options (calling_file_options) to the required child
package as its explicit options list. Mirrors load_class_with_options
for the package path.
Perl RequireResource($resource, %options) (Package.pm:3139-3158): name (empty for Perl’s undef) with the
options type, media and content. Any other option is the Error Perl’s CheckOptions raises
(Package.pm:1062-1067), and the resource is still required. An absolute URL (https://…) is kept as the link’s
target: post-processing neither reads nor copies it (Perl Post/XSLT.pm:93). origin is who asks (OD #1249).
Is a standard-class derivative being read now (reading_standard_class_derivative), and did its standard class’s
binding assign the name key in its own load (state::stand_in_last_load_names when the derivative’s read began)?
Not a name a stand-in the derivative loads assigned, which LaTeX finds defined (guard
perfect_kernel_batch77w::standard_class_derivative_defines_only_its_class_names).
LaTeX file substitution (latex.ltx:19677-19716 \declare@file@substitution,
applied by \set@curr@file → \__filehook_file_subst_begin:nnn,
latex.ltx:19785-19810): \input, \InputIfFileExists and friends read
the REPLACEMENT when a \@file-subst@<name><ext> macro exists. The key
is the request’s basename (the directory is dropped on both sides,
\use_ii_iii:nnn) with .tex supplied for a missing extension
(\__filehook_subst_empty_name_chk:NN); the value is the composed
replacement name. Chains are followed with the same bound as the
kernel’s tortoise/hare loop. Perl has no such step (its \input binding
bypasses \set@curr@file, Package.pm:2248-2270), so it re-reads the
ORIGINAL file: tikzlings-doc.tex:73-75 substitutes each animal .sty by
the \jobname.cif its comment harvester just wrote and \inputs it —
without the substitution the raw .sty re-executes in the document body
(\RequirePackage “only in the preamble”, @threeD text leaks) and the
per-animal documentation is lost. Guard:
perfect_kernel_batch52::input_honors_file_substitution.
Name font in \f@family, \f@series, \f@shape and \f@size, every
component as if selected: the NFSS half of a font reset that assigns the
font directly (base_utilities.rs neutralize_font), as \reset@font —
\normalfont, latex.ltx:14122 — does in \@footnotetext
(latex.ltx:17658-17659 \reset@font\footnotesize).
The generic name Perl’s FindFile_fallback asks for (Package.pm:2191-2226): name’s basename with its version
suffixes, glued suffixes and rw/my/preprint prefixes stripped, or None when nothing was stripped
(aastex631 → aastex, neurips_2026 → neurips, mysvjour3 → svjour3).