Documentation
The guide explains how to use mathconv and what its output looks like; the internals describe how it works and how it is tested. The playground runs the converter in the browser, and the changelog lists what changed in each release.
Guide
Using mathconv from Python and Rust, and what its output looks like.
- Getting started
Install mathconv and convert MathML formulas to LaTeX or plain text in Python, one at a time or in batches.
- Python API reference
Reference for the mathconv Python package: the convert function, the Converter class, results, fallbacks, errors and threading.
- JavaScript API reference
Reference for the mathconv npm package: installation, loading the WebAssembly module in Node.js, bundlers and browsers, the convert function, the Converter class, results, errors and performance.
- Conversion options
The source and target formats of a conversion and every option they take: math delimiters, equation labels and carried TeX.
- Using the LaTeX output
How to render the LaTeX that mathconv writes with KaTeX and MathJax or use it in LaTeX documents, including display mode, equation labels and text.
- Supported MathML
Which MathML elements and attributes mathconv converts, how it reads broken markup, and how fallbacks report what it cannot convert.
- Performance
How fast mathconv converts, what the published throughput figures measure, and how to get that speed from Python with batches and several cores.
- FAQ and troubleshooting
Answers to common questions about converting MathML with mathconv: whole documents, empty output, renderer errors and unexpected LaTeX.
- Concepts
Terms and background used throughout the documentation: MathML, LaTeX, display formulas, carried TeX, fallbacks and canonical output.
- LaTeX output style
The rules that fix the LaTeX mathconv writes for each MathML construct, with an example of every rule.
- Text output
The rules for the plain text target, which writes a formula as one line of readable Unicode text such as x^2 + 1.
Internals
How mathconv works inside, how it is tested, and how to change it.
- Architecture
How mathconv converts a formula: the math tree, the four-stage pipeline, the MathML reader, the rewrite rules and the writers.
- Project layout
Where code belongs in the mathconv repository, what each directory holds, and how the tables, packages and website are built.
- Testing
How mathconv is tested: test cases, the conversion checks, corpus evaluation, fuzzing and the checks of the documentation and bindings.
- Benchmarks
How the speed of mathconv is measured and guarded: the benchmark set, the instruction-count gate, CodSpeed, the published throughput and the allocation check.