25 0
Sign in to rate

Edit LaTeX build process

<10kB. Updated 2018-10-13. Supports both Anki 2.0.x and 2.1.x.

Description

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.

Download

As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.

To download this add-on, please copy and paste the following code into the desktop program:

937148547

If you were linked to this page from the internet, please open Anki on your computer, go to the Tools menu and then Add-ons>Browse & Install to paste in the code.

Other Anki 2.0.x Add-Ons Other Anki 2.1.x Add-Ons Ask a Question

Reviews

on 1539725223
Enables me to use MacPorts Latex without having to launch Anki from the terminal.
on 1534363052
Funciona muito bem.
on 1517443200
Crucial for advanced Latex setups. Also consider the Anki 2.1 compatible version found here: https://github.com/trimitri/edit_latex_toolchain
on 1480809600
This is the add on you need if you want to use tikz.

For further instructions go to here:

http://pastebin.com/raw/mJj7gTQ7
on 1476057600
Update perhaps ?

Currently this add-on is not supporting all the latex code. Thanks to the help of a member of this forum I have little resolve its lascune. Thank you for this add-on.

http://tex.stackexchange.com/questions/333174/convert-latex-tikz-anki-note-to-png-error/333245?noredirect=1#333245
on 1473465600
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.
on 1422057600
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!
on 1421107200
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
on 1406419200
Very useful.

I used it to change to pdflatex and imagemagick's convert.
Now I can use TikZ diagrams in my cards.
on 1351209600
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"