Enabling LaTeX support for Mnemosyne on MacOS

May 2022

Mnemosyne showing error message "Problem with latex. Are latex and dvipng installed?"

Mnemosyne doesn't support LaTeX by default. It requires two additional packages — latex and dvipng.

First, install the lightweight version of TeX that has latex binary:

brew install --cask basictex

Then, update the package manager and install the dvipng package:

sudo tlmgr update --self
sudo tlmgr install dvipng

Mnemosyne fails to find executables in their installation locations on MacOS. Therefore, we need to specify these location in the configuration file first.

Get the full path to the installed binaries:

which latex
which dvipng

This should return:

/Library/TeX/texbin/latex
/Library/TeX/texbin/dvipng

Use these locations for latex and dvipng commands in /Library/Mnemosyne/config.py:

# Latex command.
latex = "/Library/TeX/texbin/latex -interaction=nonstopmode"

# Latex dvipng command.
dvipng = "/Library/TeX/texbin/dvipng -D 200 -T tight tmp.dvi"