LaTeXML...thParser(3)
๐ 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 newXMToknode 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 anXMAppnode;0is the operator node.Annotate($node,%attributes);โ Add attributes to$node.$node = Apply($op,@args);โ Create a newXMAppnode representing the application of the node$opto the nodes@args.$node = ApplyDelimited($op,@stuff);โ Create a newXMAppnode 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 toApplyDelimited, this interprets a 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)))">. (Yes, that trailing>is exactly the flavor from the page ๐ญ)$node = InvisibleTimes;โ Creates an invisible times operator.$boole = isMatchingClose($open,$close);โ Checks whether$openand$closeform anormalpair 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 aFormulaeapplication, 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$tokenas a function, which may cause incorrect parsing. This is used to generate warning messages.
๐ AUTHOR ๐
Bruce Miller <bruce.miller@nist.gov> โ periodt.
๐ COPYRIGHT ๐
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
- nixos 26.05: perl5.42.3-LaTeXML 0.8.8
- nixpkgs unstable: perl5.42.3-LaTeXML 0.8.8
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms