Jens Nöckel's Homepage

Computer notes home

Editing, copying and pasting Mathematica equations via LaTeX

Here is some information on how to convert formulas from Mathematica to LaTeX and vice versa (see also this post). For my writing I always use LyX, a LaTeX editor and front end that can format equations while you type them.

Some people prefer to do all their writing in Mathematica. However, for larger documents, I find that impractical. because important editor functions (such citation management, and publication-ready PDF output) are missing. This is the reason why I do the bulk of my writing in LyX – it is not only a LaTeX frontend, but it moreover leaves you immense freedom to customize and export the document.

In going back and forth between Mathematica and LyX, it's convenient that both of them understand LaTeX. Although LaTeX code is semantically ambiguous, it can serve as a bridge connecting these applications.

If you're not interested in using LaTeX, look instead at converting Mathematica formulas to PDF.

Copying individual equations

This is a selective approach that works well when you aren't interested in moving text between Mathematica and LaTeX, only equations:

Exporting an entire Mathematica Notebook as LaTeX

This approach is sometimes necessary, but I would suggest trying the previous approach first, because the exported equations are almost certainly not going to be coded as real LaTeX equation environments.

To bring a whole Mathematica Notebook into LaTeX format, you can do this via the File > Export menu. However, there are some restrictions that one should keep in mind to avoid surprises:

Finally, even if you decide to export the whole document to LaTeX, it will generally be necessary to go through the source with a text editor to clean up formatting problems.


Last modified: Thu Mar 31 10:23:15 PDT 2022