# mathconverter **Repository Path**: wangcl_deep/mathconverter ## Basic Information - **Project Name**: mathconverter - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-11-06 - **Last Updated**: 2023-11-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Converter for AsciiMath, LaTeX & MathML equations Converts from AsciiMath, LaTeX, MathML to LaTeX, MathML utilizes MathMLCloud (for MathML output) and XSL transforms (for LaTeX output). (Optional): ```bash virtualenv env . env/bin/activate ``` Install: ```bash pip install -r requirements.txt ``` ## Usage: ```bash ./converter.py --help ``` ### Example ```bash $ ./converter.py --equation "x^2" --iformat asciimath --oformat mathml x 2 ``` ## Known issues Don't use bash shell confusing/specific signs like e.g. `$$` or `"` in the commandline or escape them properly. If you're unsure how to do that, run the command without `--equation` like this: ```bash $ ./converter.py --iformat asciimath --oformat mathml ``` it will prompt you for the equation that way. ### Background information For generating MathML it is using the public reachable MathMLCloud on https://api.mathmlcloud.org/equation which is utilizing a Node.js server version of Mathjax for generating output. LaTeX is generated by XSLTs from MathML input. A special case is the AsciiMath to LaTeX conversion. On the first step it generates MathML from MathMLCloud and then uses the XSLTs to generate LaTeX out of it. #### MathML to LaTeX XSLTs available in this repo: * `xsl_yarosh` by [Vasil Yaroshevich](http://www.raleigh.ru/MathML/mmltex/). Contains XSLT 1 transformation from MathML to LaTeX * `xsl_transpect` by [transpect.io](https://github.com/transpect/mml2tex). Contains XSLT 2 transformations from MathML to LaTeX (not used currently)