How do you set up Anki to use Latex equations on its cards? I would love to be able to use Anki cards to review maths definitions, theorems, proofs etc.

I really hope someone in this community knows how to achieve this. I have scoured the Internet to no avail, but I cannot find any good guides on setting this up.

Here is the Anki app

Here are some things I have tried to decipher:


The answer should include how Latex is set-up within the Anki app itself, as well as any Latex set-up that is purely Latex specific (if any).

  • What is Anki? Can you provide a link or a more detailed example?
    – Rmano
    Sep 3, 2015 at 10:27
  • apps.ubuntu.com/cat/applications/precise/anki and ankisrs.net . It is a flash card program.
    – JasoonS
    Sep 3, 2015 at 14:41
  • The link you gave claims that Anki can do this. What have you tried and how did it fail? Did you read the relevant documentation?
    – terdon
    Sep 3, 2015 at 19:16
  • I know. Basically you need to get Anki to 'understand' latex. It is not the writing of the latex that is a problem. I hope I don't seem like I am just being lazy here, but genuinely I have been unsuccessful at finding the way to do this. I haven't found documentation with clear instructions.
    – JasoonS
    Sep 5, 2015 at 21:33

1 Answer 1

  1. Install LaTeX

    • TeX Live: Essential programs and files support in your system

      sudo apt-get install texlive-base


    • TeX Live: metapackage pulling in all components of TeX Live

      sudo apt-get install texlive-full
  2. Start Anki

    enter image description here

  3. Create a deck

    Click the button Create Deck in the lower part of the main window and create a deck, in my example Math

    enter image description here

  4. Click the field Add below the menu bar…

    …and add some LaTeX, eg

    Does the sum below converge?
    [latex]\begin{displaymath}\sum_{k = 1}^{\infty}\frac{1}{k}\end{displaymath}[/latex]

    enter image description here

    and click Add and Close

  5. Click the entry Math

    enter image description here

    and you will see this

    enter image description here

  6. Click Study Now

    …and you have your LaTeX

    enter image description here

Source and more information here

  • 2
    For me, on Ubuntu 16.04, it was enough to install texlive-base and dvipng: sudo apt-get install texlive-base dvipng (dvipng is installed automatically with the texlive-full package, but this is way larger that texlive-base)
    – mlovic
    Apr 22, 2018 at 11:43
  • 4
    I've tried the above above but it does not work for me. For some reason I get the following error: Error executing latex. Generated file: /tmp/anki_temp/tmp.tex Have you installed latex and dvipng? My system is Ubuntu 14.04 LTS
    – Geosphere
    Aug 5, 2018 at 13:19
  • I managed to find a solution. This thread has been useful ubuntuforums.org/showthread.php?t=2240255, in particular sudo fmtutil-sys --all command which installed pdflatex.fmt. Now it's working.
    – Geosphere
    Aug 5, 2018 at 13:38
  • 1
    Geosphere's fmtutil-sys didn't work for me. What worked for me on Ubuntu 18.04 was to apt install texlive-latex-recommended dvipng (base wasn't enough, but recommended was).
    – labyrinth
    Mar 23, 2020 at 16:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .