LaTeXM...hParser(3pm)
π NAME π
Okay so this is the LaTeXM...hParser(3pm) page from User Contributed Perl Documentation, and the actual star of the show is "LaTeXML::MathParser" β parses mathematics content. Periodt. π
β¨
πΈ DESCRIPTION πΈ
"LaTeXML::MathParser" parses the mathematical content of a document. It uses Parse::RecDescent and a grammar "MathGrammar". No cap, that's the whole setup. π§ββοΈ
β¨ Math Representation β¨
Needs description. Literally, that's what it says, bestie. π«Ά
π Possibile Customizations π
Needs description. And yes, the spelling stays exactly like that. π
π§ Convenience functions π§
The following functions are exported for convenience in writing the grammar productions. Obsessed. π«Ά
$node = New($name,$content,%attributes);β Creates a new"XMTok"node with given$name(a string orundef), and$content(a string orundef) (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;0is 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$opto the nodes@args.$node = ApplyDelimited($op,@stuff);β Create a new"XMApp"node representing the application of the node$opto the arguments found in@stuff.@stuffare 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 sequence of delimited, punctuated items as being the application of$opto those items.$node = recApply(@ops,$arg);β Given a sequence of operators and an argument, forms the nested application"op(op(...(arg)))">.$node = InvisibleTimes;β Creates an invisible times operator. Sneaky lil operator. π$boole = isMatchingClose($open,$close);β Checks whether$openand$closeform anormal'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 anexprfollowed by repeated(op expr), compose the left recursive tree. For example"a + b + c - d"would give"(- (+ a b c) d)">.MaybeFunction($token);β Note the possible use of$tokenas a function, which may cause incorrect parsing. This is used to generate warning messages.
π AUTHOR π
Bruce Miller <bruce.miller@nist.gov> β icon behavior. π«Ά
π COPYRIGHT π
Public domain software, produced as part of work done by the United States Government & not subject to copyright in the US. That's the whole copyright vibe. π
π And that's a wrap, bestie! This page is from perl v5.40.1, dated 2025-11-16, and it's the LaTeXM...hParser(3pm) manual β go parse some math and slay. β¨
π¦ 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