Mathematica has some basic LaTeX export possibilities built in. However, the LaTeX support is far from optimal and at times quite buggy.
I just came across two issues: Missing support for Subsuperscript
and nonsensical \left
and \right
statements which
are inserted in connection with Abs
. I wrote a short python3 script as a workaround (together with Mathematica integration).
Mathematica version:
11.0.0 for Linux x86 (64-bit) (July 28, 2016
Minimal example for the bugs:
The workaround comes as a python3 script texexpression.py
, which either takes Mathematica generated LaTeX strings as an argument or
reads them from stdin
.
If texexpression.py
is in the same directory as your Mathematica file, it can also be called using the Mathematica wrapper fixLatexErrors.
Again the example from above:
As it should be.