Expand description
latex.ltx:9521-9522 \gdef\do#1{\global\let#1\@notprerr}\@preamblecmds: after \begin{document} each listed
command IS \@notprerr, which raw code tests with \ifx (ltnews23.tex:42-43). LaTeXML also reads a package, class
or sub-file preamble in the body (Perl’s recovery for a body \usepackage, a binding’s load, standalone and
subfiles), which pdflatex never does: there the walk’s commands are reopened, and disabled again after it. The walk
keeps each meaning under \lx@onlypreamble@<name>; the State holds the list (OXIDIZED_DESIGN_DIVERGENCES #226).
A binding’s lock goes aside with its meaning: \@notprerr is no binding’s, and the body’s \renewcommand of it
stands as in TeX (imsart.sty:1223 \@onlypreamble\doi over OmniBus’s locked \doi, 2606.22730).
Structs§
- Reopened
ForLoad reopen_preamble_commandsfor the extent of a load, closed when dropped (also on an Error’s early return).
Functions§
- close_
preamble_ commands - The walk again over the reopened commands: what the load (re)defined is kept for the next reopening.
- close_
subfile_ preamble - The close of the reopening a sub-file’s preamble holds; false when it holds none (closed at its
\begin{document}). - disable_
preamble_ command - The walk’s
\global\let<cs>\@notprerr, its meaning kept for a laterreopen_preamble_commands. - end_
subfile_ preamble \lx@subfile@preamble@end: a sub-file that ends with no\begin{document}ends its preamble there (pdflatex: “File ended while scanning use of \sa@gobble”).- reopen_
for_ subfile_ preamble reopen_preamble_commandsfor a sub-file’s preamble (standalone, subfiles): closed at its\begin{document}or, without one, where the sub-file ends (\lx@subfile@preamble@end,close_subfile_preamble).- reopen_
preamble_ commands - Give the disabled commands back their meanings and locks (a body load, a sub-file’s preamble); false when there is nothing to reopen (still in the preamble, or reopened by an enclosing load). One the body has redefined since is the body’s: the walk no longer holds it, and neither this nor the next walk touches it.