pub enum DefinitionOrigin {
Unknown,
Plain,
LatexDump,
Pool,
Binding,
Fallback,
Stub,
Borrowed,
Format,
File,
Document,
}Expand description
Who made a definition.
Variants§
Unknown
Made before any loader seam set an origin (engine bootstrap) — ours.
Plain
The PLAIN layer: restored from the plain format dump (embedded or a
plain.YYYY.dump.txt on disk), or made by a plain pool (plain_*). Perl
tells the same layer by its definitions’ source (isDefinableLaTeX,
latex_constructs.pool.ltxml:2512-2517: getShortSource =~ /^plain/): LaTeX’s
\newcommand/\@ifdefinable may redefine what plain defined.
LatexDump
Restored from the LaTeX format dump (<embedded:latex>).
Pool
A Rust pool (InnerPool!/LoadPool!: TeX.pool, LaTeX.pool, constructs).
Binding
A compiled binding’s own code (DefMacro!/RawTeX! in a *_sty.rs).
Fallback
The guess of a fallback class — OmniBus, loaded for a class with no binding: what it defines is a
convenience the real class may not have, so a document’s own \newcommand (and \providecommand,
\newenvironment, \@ifdefinable) of the name wins over it, unless it is locked
(state::is_fallback_meaning) — and as OmniBus’s fallback, locked too (state::document_redefines_guess).
Stub
A kernel stand-in for a name a class or style defines only where the document cannot reach it (aaai’s
\equalcontrib, set inside its \@maketitle): yields as Fallback does, and to a raw class’s or package’s own
\newcommand of the name too, since the real file does define it (copernicus.cls:1673 \equalcontrib[1]).
Borrowed
What a binding borrows from a package the real one does not load (binding::content::require_package_borrowed:
theorem.sty’s and ntheorem.sty’s bindings borrow amsthm’s): in LaTeX the names do not exist, so they yield as
Fallback does, and to every raw file’s own definition too — TeX Live’s or the author’s (cc.cls’s ccproof.sty:56
\newenvironment{proof} after theorem.sty; 1507.02955).
Format
A raw format file read as definitions (latex.ltx, plain.tex, expl3-code.tex).
File
A raw .sty/.cls/.def/.tex the document loaded as definitions.
Document
The document’s own preamble or body.
Implementations§
Source§impl DefinitionOrigin
impl DefinitionOrigin
Sourcepub fn is_latexml_owned(self) -> bool
pub fn is_latexml_owned(self) -> bool
Is this definition LaTeXML’s own — a pool, dump, binding or format layer — rather than the document’s? The l3/ltcmd declarators tolerate redefinition of our own pre-definitions (the class-level names real LaTeX keeps in article.cls) and report genuine double declarations.
Sourcepub fn is_binding_made(self) -> bool
pub fn is_binding_made(self) -> bool
Is this definition a binding’s — its own code, a fallback class’s guess, a stand-in, a borrowing — rather than the
kernel’s (a pool, a dump, a format) or the document’s (state::note_dropped_argument)?