LaTeXML...thParser(3)

๐Ÿ“ฆ version 0.8.8, in nixos 26.05, nixpkgs unstable

๐Ÿ’– LaTeXML::MathParser ๐Ÿ’–

bestie, welcome in โ€” the manual name folded up here is User Contributed Perl Documentation, and this page is literally about LaTeXML::MathParser, no cap โœจ

โœจ NAME โœจ

LaTeXML::MathParser โ€” parses mathematics content ๐Ÿ’…

๐ŸŒธ DESCRIPTION ๐ŸŒธ

LaTeXML::MathParser parses the mathematical content of a document. It uses Parse::RecDescent and a grammar called MathGrammar. Itโ€™s giving parser main character energy fr fr ๐Ÿงš

๐Ÿงฎ Math Representation ๐Ÿงฎ

Official text check: Needs description. Thatโ€™s what it says, bestie โ€” Iโ€™m not gonna invent lore ๐Ÿซถ

๐Ÿ’… Possibile Customizations ๐Ÿ’…

Also just: Needs description. (Yes, the heading has that spelling โ€” iconic, keeping it ๐Ÿ’€)

๐ŸŽ€ Convenience functions ๐ŸŽ€

The following functions are exported for convenience in writing the grammar productions. Hereโ€™s the whole roster, no skips, no cap ๐Ÿ‘‘

  • $node = New($name,$content,%attributes); โ€” Creates a new XMTok node with the given $name (a string or undef), and $content (a string or undef) (but at least one of name or content should be provided), and attributes. โœจ
  • $node = Arg($node,$n); โ€” Returns the $n-th argument of an XMApp node; 0 is the operator node.
  • Annotate($node,%attributes); โ€” Add attributes to $node.
  • $node = Apply($op,@args); โ€” Create a new XMApp node representing the application of the node $op to the nodes @args.
  • $node = ApplyDelimited($op,@stuff); โ€” Create a new XMApp node representing the application of the node $op to the arguments found in @stuff. @stuff are delimited arguments in the sense that the leading and trailing nodes should represent open and close delimiters and the arguments are separated by punctuation nodes.
  • $node = InterpretDelimited($op,@stuff); โ€” Similar to ApplyDelimited, this interprets a sequence of delimited, punctuated items as being the application of $op to those items.
  • $node = recApply(@ops,$arg); โ€” Given a sequence of operators and an argument, forms the nested application "op(op(...(arg)))">. (Yes, that trailing > is exactly the flavor from the page ๐Ÿ˜ญ)
  • $node = InvisibleTimes; โ€” Creates an invisible times operator.
  • $boole = isMatchingClose($open,$close); โ€” Checks whether $open and $close form a normal pair of delimiters, or if either is ".".
  • $node = Fence(@stuff); โ€” Given a delimited sequence of nodes, starting and ending with open/close delimiters, and with intermediate nodes separated by punctuation or such, attempt to guess what type of thing is represented such as a set, absolute value, interval, and so on. This would be a good candidate for customization! ๐Ÿ‘€
  • $node = NewFormulae(@stuff); โ€” Given a set of formulas, construct a Formulae application, if there are more than one, else just return the first.
  • $node = NewList(@stuff); โ€” Given a set of expressions, construct a "list" application, if there are more than one, else just return the first.
  • $node = LeftRec($arg1,@more); โ€” Given an expr followed by repeated (op expr), compose the left recursive tree. For example, "a + b + c - d" would give "(- (+ a b c) d)">. (Again with the little trailing > โ€” preserving the exact mood ๐Ÿ’…)
  • MaybeFunction($token); โ€” Note the possible use of $token as a function, which may cause incorrect parsing. This is used to generate warning messages.

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Bruce Miller <bruce.miller@nist.gov> โ€” periodt.

Public domain software, produced as part of work done by the United States Government & not subject to copyright in the US.


Source/version + date sign-off: perl v5.42.3, 2024-02-26, and the page tag LaTeXML...thParser(3). Thatโ€™s the footer tea, bestie โ€” slay and goodbye ๐Ÿ’–๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from