Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

latexml::stomach(3pm) [debian man page]

LaTeXML::Stomach(3pm)					User Contributed Perl Documentation				     LaTeXML::Stomach(3pm)

NAME
"LaTeXML::Stomach" - digests tokens into boxes, lists, etc. DESCRIPTION
"LaTeXML::Stomach" digests tokens read from a LaTeXML::Gullet (they will have already been expanded). There are basically four cases when digesting a LaTeXML::Token: A plain character is simply converted to a LaTeXML::Box (or LaTeXML::MathBox in math mode), recording the current LaTeXML::Font. A primitive If a control sequence represents LaTeXML::Primitive, the primitive is invoked, executing its stored subroutine. This is typically done for side effect (changing the state in the LaTeXML::State), although they may also contribute digested material. As with macros, any arguments to the primitive are read from the LaTeXML::Gullet. Grouping (or environment bodies) are collected into a LaTeXML::List. Constructors A special class of control sequence, called a LaTeXML::Constructor produces a LaTeXML::Whatsit which 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 digested LaTeXML::List after reading and digesting a `body' from the its Gullet. The body extends until the current level of boxing or environment is closed. "$list = $stomach->digest($tokens);" Return the LaTeXML::List resuting 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. A List of Box's, Lists, Whatsit's is 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 $stomach is 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. perl v5.10.1 2009-06-11 LaTeXML::Stomach(3pm)

Check Out this Related Man Page

LaTeXML::Mouth(3pm)					User Contributed Perl Documentation				       LaTeXML::Mouth(3pm)

NAME
"LaTeXML::Mouth" - tokenize the input. DESCRIPTION
A "LaTeXML::Mouth" (and subclasses) is responsible for tokenizing, ie. converting plain text and strings into LaTeXML::Tokens according to the current category codes (catcodes) stored in the "LaTeXML::State". "LaTeXML::FileMouth" specializes "LaTeXML::Mouth" to tokenize from a file. "LaTeXML::StyleMouth" further specializes "LaTeXML::FileMouth" for processing style files, setting the catcode for "@" and ignoring comments. "LaTeXML::PerlMouth" is not really a Mouth in the above sense, but is used to definitions from perl modules with exensions ".ltxml" and ".latexml". Creating Mouths "$mouth = LaTeXML::Mouth->new($string);" Creates a new Mouth reading from $string. "$mouth = LaTeXML::FileMouth->new($pathname);" Creates a new FileMouth to read from the given file. "$mouth = LaTeXML::StyleMouth->new($pathname);" Creates a new StyleMouth to read from the given style file. Methods "$token = $mouth->readToken;" Returns the next LaTeXML::Token from the source. "$boole = $mouth->hasMoreInput;" Returns whether there is more data to read. "$string = $mouth->getLocator($long);" Return a description of current position in the source, for reporting errors. "$tokens = $mouth->readTokens($until);" Reads tokens until one matches $until (comparing the character, but not catcode). This is useful for the "verb" command. "$lines = $mouth->readRawLines($endline,$exact);" Reads raw (untokenized) lines from $mouth until a line matching $endline is found. If $exact is true, $endline is matched exactly, with no leading or trailing data (like in the c<comment> package). Otherwise, the match is done like with the c<verbatim> environment; any text preceding $endline is returned as the last line, and any characters after $endline remains in the mouth to be tokenized. 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. perl v5.10.1 2009-06-11 LaTeXML::Mouth(3pm)
Man Page