Text::ASCIIMathMLPerl extension for parsing ASCIIMathML text into MathML | |
Download |
Text::ASCIIMathML Ranking & Summary
Advertisement
- License:
- GPL
- Price:
- FREE
- Publisher Name:
- Mark Nodine
- Publisher web site:
- http://search.cpan.org/~nodine/
Text::ASCIIMathML Tags
Text::ASCIIMathML Description
Perl extension for parsing ASCIIMathML text into MathML Text::ASCIIMathML is a Perl parser for ASCIIMathML text which produces MathML XML markup strings that are suitable for rendering by any MathML-compliant browser.The parser uses the following attributes which are settable through the SetAttributes method:ForMoz Specifies that the fonts should be optimized for Netscape/Mozilla/Firefox.The output of the TextToMathML method always follows the schema < mstyle >...< /mstyle >< /math > The first argument of TextToMathML is the ASCIIMathML text to be parsed into MathML. The second argument is a reference to an array of attribute/value pairs to be attached to the < math > node and the third argument is a reference to an array of attribute/value pairs for the < mstyle > node. Common attributes for the < math > node are "title" and "xmlns"=>"&mathml;". Common attributes for the < mstyle > node are "mathcolor" (for text color), "displaystyle"=>"true" for using display style instead of inline style, and "fontfamily".SYNOPSIS use Text::ASCIIMathML; $parser=new Text::ASCIIMathML(); $parser->SetAttributes(ForMoz => 1); $ASCIIMathML = "int_0^1 e^x dx"; $mathML = $parser->TextToMathML($ASCIIMathML); $mathML = $parser->TextToMathML($ASCIIMathML, ); $mathML = $parser->TextToMathML($ASCIIMathML, undef, ); $mathMLTree = $parser->TextToMathMLTree($ASCIIMathML); $mathMLTree = $parser->TextToMathMLTree($ASCIIMathML, ); $mathMLTree = $parser->TextToMathMLTree($ASCIIMathML,undef,); $mathML = $mathMLTree->text(); $latex = $mathMLTree->latex(); Requirements: · Perl
Text::ASCIIMathML Related Software