32 1
Sign in to rate

Edit LaTeX build process

<10kB. Updated 2018-10-13.
The author has shared 9 other item(s).

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.

Supported Anki versions:

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

937148547

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

All Anki 2.1.x Add-Ons

Reviews

on 1678371680
Great!
on 1661335702
Thanks!
on 1642869485
Finally Latex works in Anki on Windows
on 1630325588
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 !
on 1618049341
Great to solve path problems
on 1609591566
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 1579105783
useful
on 1570762378
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]
on 1565640729
works great. thank you!
on 1554749251
latex is usually best viewing
on 1550339636
who can change size of latex formulas?
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 1504828800
on 1497484800
on 1483833600
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 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 1457827200
on 1454198400
on 1452902400
on 1446681600
on 1444089600
on 1442275200
on 1438905600
on 1427414400
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 1406419200
Very useful.

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