- Reduce the work in postfixing by converting to canonical operations. So "Math.sin(", "math.sin(", "\sin(", and "sin(" all become "sin(".
- Parse lots of LaTeX.
- Don't do anything that can more easily be done while postfixing.
- Don't do anything that makes the output hard for humans to understand.
- Simple 1-to-1 substring replacements with important whitespace.
            - x in y becomes x∈y
 
- Handle any complex replacements before whitespace removal.
- Remove whitespace.
- Simple 1-to-1 substring replacements.
            - \alpha becomes α
- Math.sin becomes sin
 
- Handle any complex replacements.
            - \frac{1}{2} becomes (1)/(2)
- LaTeX matrices become arrays.
 
