LaTeXM...tomach(3pm)
π LaTeXML::Core::Stomach β aka LaTeXM...tomach(3pm) π
okay bestie, this is the LaTeXM...tomach(3pm) manual page from the User Contributed Perl Documentation, and the main character is LaTeXML::Core::Stomach β it digests tokens into boxes, lists, etc. β¨ No cap, it's giving core-core energy. π«Ά
β¨ NAME β¨
"LaTeXML::Core::Stomach" β digests tokens into boxes, lists, etc. π
πΈ DESCRIPTION πΈ
okay so "LaTeXML::Core::Stomach" digests tokens read from a LaTeXML::Core::Gullet (they will have already been expanded). It extends LaTeXML::Common::Object. π¦
There are basically four cases when digesting a LaTeXML::Core::Token:
- A plain character β is simply converted to a
LaTeXML::Core::Boxrecording the currentLaTeXML::Common::Font. π - A primitive β if a control sequence represents
LaTeXML::Core::Definition::Primitive, the primitive is invoked, executing its stored subroutine. This is typically done for side effect (changing the state in theLaTeXML::Core::State), although they may also contribute digested material. As with macros, any arguments to the primitive are read from theLaTeXML::Core::Gullet. π₯ - Grouping (or environment bodies) β are collected into a
LaTeXML::Core::List. π§ - Constructors β a special class of control sequence, called a
LaTeXML::Core::Definition::Constructor, produces aLaTeXML::Core::Whatsitwhich remembers the control sequence and arguments that created it, and defines its own translation into"XML"elements, attributes and data. Arguments to a constructor are read from the gullet and also digested. π
π₯ Digestion π₯
$list = $stomach->digestNextBody;β return the digestedLaTeXML::Core::Listafter reading and digesting abodyfrom the itsGullet. The body extends until the current level of boxing or environment is closed. π«Ά$list = $stomach->digest($tokens);β return theLaTeXML::Core::Listresuting from digesting the given tokens. This is typically used to digest arguments to primitives or constructors. πΈ@boxes = $stomach->invokeToken($token);β invoke the given (expanded) token. If it corresponds to a Primitive or Constructor, the definition will be invoked, reading any needed arguments fromt he current input source. Otherwise, the token will be digested. AListofBox's,Lists,Whatsit'sis returned. π@boxes = $stomach->regurgitate;β removes and returns a list of the boxes already digested at the current level. This peculiar beast is used by things like\choose(which is a Primitive in TeX, but a Constructor in LaTeXML). π
π Grouping π
$stomach->bgroup;β begin a new level of binding by pushing a new stack frame, and a new level of boxing the digested output. π$stomach->egroup;β end a level of binding by popping the last stack frame, undoing whatever bindings appeared there, and also decrementing the level of boxing. π¦$stomach->begingroup;β begin a new level of binding by pushing a new stack frame. πΈ$stomach->endgroup;β end a level of binding by popping the last stack frame, undoing whatever bindings appeared there. π
π Modes π
$stomach->beginMode($mode);β begin processing in$mode; one of'text','display-math'or'inline-math'. This also begins a new level of grouping and switches to a font appropriate for the mode. β¨$stomach->endMode($mode);β end processing in$mode; an error is signalled if$stomachis not currently in$mode. This also ends a level of grouping. π«Ά
π AUTHOR π
Bruce Miller <bruce.miller@nist.gov> π
π«Ά COPYRIGHT π«Ά
Public domain software, produced as part of work done by the United States Government & not subject to copyright in the US. π
okay that's the whole page, bestie: source/version perl v5.40.1, date 2025-11-16, and the manual is LaTeXM...tomach(3pm) from User Contributed Perl Documentation. mwah π periodt.
π¦ where this page comes from
- ubuntu resolute: latexml 0.8.8-4 Β· PD
- ubuntu stonking: latexml 0.8.8-4 Β· PD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms