This add-on allows you to edit the command-line arguments passed to LaTeX and dvipng when creating LaTeX cards. It is not necessary to use LaTeX with Anki in most cases; it is only needed if you are trying to change the commands Anki uses to generate LaTeX output.
Directions The add-on initially changes nothing. To modify the options for your needs, you need to change the configuration.
In Anki 2.0, edit the add-on and follow the directions in the add-on file. In Anki 2.1, choose Tools > Add-ons, select this add-on from the list, click the Configure button, and follow the directions at the top of the window.
Support If you have problems, I can be reached in the add-ons forum or at the email address listed at the top of the add-on file.
Changelog 2018/08/11: Updated for Anki 2.1.
2014/07/21: Updated for Anki 2.0.27, which uses a new system for running LaTeX commands.
2013/11/01: No changes to the code were made, just improvements to the directions. If this add-on is working correctly for you currently, there is no reason to update.
Reviews (29)
👍 2026-02-15
One or more errors occurred:
937148547: Invalid code, or add-on not available for your version of Anki.
👍 2025-11-08
Unable to install on version 25.09.2, it throws an error message :(
👍 2025-11-02
Unable to install on version 25.09.2, it throws an error message :(
👍 2024-10-29
It does work, be careful as if you have generated a latex code once the image is stored in cache regardless of if the latex process has been changed.
👍 2024-10-17
Looks like it was a great addon, but now it just seems unable to render tikz code. Version 24.04.
👍 2024-01-10
I think it doesn’t work on latest versions
👍 2023-10-02
In some cases you have to give the full path to latex, dvipng and dvisvgm.
👍 2023-09-06
Crucial for ogmode work. https://rgoswami.me/posts/anki-decks-orgmode/
👍 2023-08-24
Thank you for this add-on, I’ve been using it to typeset my cards with LaTeX.
With ImageMagick and Ghostscript installed, I have the pngCommand set as “pngCommands”: [ [ “pdflatex”, “-interaction=nonstopmode”, “—shell-escape”, “tmp.tex” ], [ “magick”, “-density”, “144”, “tmp.pdf”, “-trim”, “tmp.png” ] ]
This is based on the instruction
👍 2023-07-01
Works as expected.
👍 2023-03-09
Great!
👍 2022-08-24
Thanks!
👍 2022-01-22
Finally Latex works in Anki on Windows
👍 2021-08-30
I used this add-on to configure “dvisvgm”. Indeed I found using latex MathJax Chemistry that some characters were cropped above and below when generating the svg image. The man page of dvisvgm mentions this issue and explains how the “—exact-bbox” parameter have to be included in the command line as a remediation.
I then added this using the add-on proposed here and it works fine for me !
Thanks for this very useful tool !
👍 2021-04-10
Great to solve path problems
👍 2021-01-02
Very handy indeed
Used this to switch away from latex + dvipng to pdflatex + imagemagick. Now I am also able to use TikZ to draw staff in cards.
Hint: to convert .pdf to .png with this add-on one can use imagemagick:
convert -trim -density 300 tmp.pdf tmp.png
👍 2020-01-15
useful
👍 2019-10-11
When I tried to use a LaTex formula it shows me this
Error al ejecutar latex.
Archivo generado: C:\Users\E5-523~1\AppData\Local\Temp\anki_temp\tmp.tex
Ha instalado latex y dvipng/dvisvgm?
What can I do about that? I just put [latex]\in[/latex]
👍 2019-08-12
works great. thank you!
👍 2019-04-08
latex is usually best viewing
👍 2019-02-16
who can change size of latex formulas?
👍 2018-10-16
Enables me to use MacPorts Latex without having to launch Anki from the terminal.
👍 2018-08-15
Funciona muito bem.
👍 2018-02-01
Crucial for advanced Latex setups. Also consider the Anki 2.1 compatible version found here: https://github.com/trimitri/edit_latex_toolchain
👍 2016-12-04
This is the add on you need if you want to use tikz. For further instructions go to here:
http://pastebin.com/raw/mJj7gTQ7
👍 2016-09-10
Fixed LaTeX on my NixOS For some reason on my NixOS installation LaTeX didn’t render. I replaced default commands with:
[“pdflatex”, “tmp.tex”],
[“convert”, “-density”, “150”, “-trim”, “tmp.pdf”, “tmp.png”]
Now LaTeX generates nicely in Anki Desktop.
👍 2015-01-24
Alternative latex paths I use the portable version of miktex so it didn’t work with anki out of the box. This addon helped to redefine the paths for latex and dvipng. Thanks mate, great job!
👍 2014-07-27
Very useful. I used it to change to pdflatex and imagemagick’s convert.
Now I can use TikZ diagrams in my cards.
👍 2012-10-26
Useful for latex and dvipng installed via macports This add-on is very useful because it lets you use your macports latex and dvi installations with Anki 2. When you configure the plugin, just substitute “/opt/local/bin/latex” for “latex” and “/opt/local/bin/dvipng” for “dvipng”