LaTeX equations that worked before only work now if copy-pasted

I’m unable to enter any LaTeX into my notes, even when typing in code that is identical to code that worked before. For instance, one of the notes I created back in 2014 contains the following code:

[latex]\tiny$A = \pi r^2$[/latex]

This was obviously rendered a long time ago and so displays perfectly fine. Additionally, I can copy and paste this same code, as on the next line, and it will render twice as expected:

[latex]\tiny$A = \pi r^2$[/latex] [latex]\tiny$A = \pi r^2$[/latex]

This will even work if I copy and paste the code into a different note. However, if I type the same exact code out, as in the following line, it will not render and throws errors:

[latex]\tiny$A = \pi r^2$[/latex]

This is the same behavior on my Windows desktop and my Windows laptop. Both have MikTeX installed and updated. Both have the latest version of Anki installed.

I assume this has something to do with text encoding, but I don’t know how to work around that in Anki. If it matters, I use Keyman keyboard layouts, though that has not caused any such issues in the past.

All of your code snippets work for me without errors. Maybe it’s a problem with your setup? What was the error you got?

1 Like

Here’s the error when I to render through the Tools menu:

Problème à l’exécution de <U+2068>dvipng<U+2069>.
Fichier généré : <U+2068>C:\Users\josh8\AppData\Local\Temp\anki_temp\tmp.tex<U+2069>

This is pdfTeX, Version 3.141592653-2.6-1.40.24 (MiKTeX 22.3) (preloaded format=latex.fmt)
 restricted \write18 enabled.
entering extended mode
(tmp.tex
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2022-02-24>
(C:\Program Files\MiKTeX\tex/latex/base\article.cls
Document Class: article 2021/10/04 v1.4n Standard LaTeX document class
(C:\Program Files\MiKTeX\tex/latex/base\size12.clo))
(C:\Program Files\MiKTeX\tex/latex/amsfonts\amssymb.sty
(C:\Program Files\MiKTeX\tex/latex/amsfonts\amsfonts.sty))
(C:\Program Files\MiKTeX\tex/latex/amsmath\amsmath.sty
For additional information on amsmath, use the `?' option.
(C:\Program Files\MiKTeX\tex/latex/amsmath\amstext.sty
(C:\Program Files\MiKTeX\tex/latex/amsmath\amsgen.sty))
(C:\Program Files\MiKTeX\tex/latex/amsmath\amsbsy.sty)
(C:\Program Files\MiKTeX\tex/latex/amsmath\amsopn.sty))
(C:\Program Files\MiKTeX\tex/latex/l3backend\l3backend-dvips.def)
No file tmp.aux.
(C:\Program Files\MiKTeX\tex/latex/amsfonts\umsa.fd)
(C:\Program Files\MiKTeX\tex/latex/amsfonts\umsb.fd) [1] (tmp.aux) )
Output written on tmp.dvi (1 page, 388 bytes).
Transcript written on tmp.log.
This is dvipng 1.16 Copyright 2002-2015, 2019 Jan-Ake Larsson

Sorry, but dvipng did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\josh8\AppData\Local\MiKTeX\miktex\log\dvipng.log

And here’s what the log file that it references contains:

2020-12-01 21:17:40,145-0500 INFO  dvipng - this process (14108) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2020-12-01 21:17:40,247-0500 INFO  dvipng - this process (14108) finishes with exit code 0
2022-03-22 10:55:19,244-0400 INFO  dvipng - this process (10816) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 10:55:19,259-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 10:55:19,259-0400 FATAL dvipng.core - Data: 
2022-03-22 10:55:19,259-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 10:55:19,262-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 10:55:19,262-0400 FATAL dvipng - Info: 
2022-03-22 10:55:19,262-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 10:55:19,262-0400 FATAL dvipng - Line: 126
2022-03-22 10:55:19,272-0400 INFO  dvipng - this process (10816) finishes with exit code 1
2022-03-22 10:55:20,112-0400 INFO  dvipng - this process (13392) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 10:55:20,122-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 10:55:20,123-0400 FATAL dvipng.core - Data: 
2022-03-22 10:55:20,123-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 10:55:20,123-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 10:55:20,123-0400 FATAL dvipng - Info: 
2022-03-22 10:55:20,123-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 10:55:20,123-0400 FATAL dvipng - Line: 126
2022-03-22 10:55:20,132-0400 INFO  dvipng - this process (13392) finishes with exit code 1
2022-03-22 11:00:42,107-0400 INFO  dvipng - this process (18204) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:00:42,117-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:00:42,117-0400 FATAL dvipng.core - Data: 
2022-03-22 11:00:42,117-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:00:42,118-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:00:42,118-0400 FATAL dvipng - Info: 
2022-03-22 11:00:42,118-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:00:42,118-0400 FATAL dvipng - Line: 126
2022-03-22 11:00:42,127-0400 INFO  dvipng - this process (18204) finishes with exit code 1
2022-03-22 11:00:42,883-0400 INFO  dvipng - this process (5396) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:00:42,894-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:00:42,894-0400 FATAL dvipng.core - Data: 
2022-03-22 11:00:42,894-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:00:42,894-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:00:42,894-0400 FATAL dvipng - Info: 
2022-03-22 11:00:42,894-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:00:42,894-0400 FATAL dvipng - Line: 126
2022-03-22 11:00:42,905-0400 INFO  dvipng - this process (5396) finishes with exit code 1
2022-03-22 11:00:43,977-0400 INFO  dvipng - this process (1272) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:00:43,988-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:00:43,988-0400 FATAL dvipng.core - Data: 
2022-03-22 11:00:43,988-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:00:43,988-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:00:43,988-0400 FATAL dvipng - Info: 
2022-03-22 11:00:43,988-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:00:43,988-0400 FATAL dvipng - Line: 126
2022-03-22 11:00:43,997-0400 INFO  dvipng - this process (1272) finishes with exit code 1
2022-03-22 11:00:44,802-0400 INFO  dvipng - this process (13856) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:00:44,813-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:00:44,813-0400 FATAL dvipng.core - Data: 
2022-03-22 11:00:44,813-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:00:44,814-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:00:44,814-0400 FATAL dvipng - Info: 
2022-03-22 11:00:44,814-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:00:44,814-0400 FATAL dvipng - Line: 126
2022-03-22 11:00:44,823-0400 INFO  dvipng - this process (13856) finishes with exit code 1
2022-03-22 11:00:53,579-0400 INFO  dvipng - this process (13400) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:00:53,589-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:00:53,589-0400 FATAL dvipng.core - Data: 
2022-03-22 11:00:53,589-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:00:53,589-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:00:53,589-0400 FATAL dvipng - Info: 
2022-03-22 11:00:53,589-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:00:53,589-0400 FATAL dvipng - Line: 126
2022-03-22 11:00:53,598-0400 INFO  dvipng - this process (13400) finishes with exit code 1
2022-03-22 11:00:54,368-0400 INFO  dvipng - this process (9512) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:00:54,378-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:00:54,378-0400 FATAL dvipng.core - Data: 
2022-03-22 11:00:54,378-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:00:54,378-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:00:54,378-0400 FATAL dvipng - Info: 
2022-03-22 11:00:54,378-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:00:54,378-0400 FATAL dvipng - Line: 126
2022-03-22 11:00:54,387-0400 INFO  dvipng - this process (9512) finishes with exit code 1
2022-03-22 11:00:55,397-0400 INFO  dvipng - this process (16072) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:00:55,407-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:00:55,408-0400 FATAL dvipng.core - Data: 
2022-03-22 11:00:55,408-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:00:55,408-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:00:55,408-0400 FATAL dvipng - Info: 
2022-03-22 11:00:55,408-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:00:55,408-0400 FATAL dvipng - Line: 126
2022-03-22 11:00:55,417-0400 INFO  dvipng - this process (16072) finishes with exit code 1
2022-03-22 11:00:56,191-0400 INFO  dvipng - this process (17380) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:00:56,202-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:00:56,202-0400 FATAL dvipng.core - Data: 
2022-03-22 11:00:56,202-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:00:56,203-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:00:56,203-0400 FATAL dvipng - Info: 
2022-03-22 11:00:56,203-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:00:56,203-0400 FATAL dvipng - Line: 126
2022-03-22 11:00:56,213-0400 INFO  dvipng - this process (17380) finishes with exit code 1
2022-03-22 11:01:03,444-0400 INFO  dvipng - this process (10808) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:01:03,454-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:01:03,454-0400 FATAL dvipng.core - Data: 
2022-03-22 11:01:03,454-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:01:03,455-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:01:03,455-0400 FATAL dvipng - Info: 
2022-03-22 11:01:03,455-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:01:03,455-0400 FATAL dvipng - Line: 126
2022-03-22 11:01:03,464-0400 INFO  dvipng - this process (10808) finishes with exit code 1
2022-03-22 11:01:04,240-0400 INFO  dvipng - this process (15972) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:01:04,251-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:01:04,251-0400 FATAL dvipng.core - Data: 
2022-03-22 11:01:04,251-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:01:04,251-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:01:04,251-0400 FATAL dvipng - Info: 
2022-03-22 11:01:04,251-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:01:04,251-0400 FATAL dvipng - Line: 126
2022-03-22 11:01:04,260-0400 INFO  dvipng - this process (15972) finishes with exit code 1
2022-03-22 11:01:05,530-0400 INFO  dvipng - this process (4828) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:01:05,541-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:01:05,541-0400 FATAL dvipng.core - Data: 
2022-03-22 11:01:05,541-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:01:05,541-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:01:05,541-0400 FATAL dvipng - Info: 
2022-03-22 11:01:05,541-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:01:05,541-0400 FATAL dvipng - Line: 126
2022-03-22 11:01:05,550-0400 INFO  dvipng - this process (4828) finishes with exit code 1
2022-03-22 11:01:06,343-0400 INFO  dvipng - this process (8904) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:01:06,353-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:01:06,353-0400 FATAL dvipng.core - Data: 
2022-03-22 11:01:06,354-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:01:06,354-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:01:06,354-0400 FATAL dvipng - Info: 
2022-03-22 11:01:06,354-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:01:06,354-0400 FATAL dvipng - Line: 126
2022-03-22 11:01:06,363-0400 INFO  dvipng - this process (8904) finishes with exit code 1
2022-03-22 11:01:45,270-0400 INFO  dvipng - this process (16444) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:01:45,280-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:01:45,280-0400 FATAL dvipng.core - Data: 
2022-03-22 11:01:45,281-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:01:45,281-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:01:45,281-0400 FATAL dvipng - Info: 
2022-03-22 11:01:45,281-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:01:45,281-0400 FATAL dvipng - Line: 126
2022-03-22 11:01:45,290-0400 INFO  dvipng - this process (16444) finishes with exit code 1
2022-03-22 11:01:46,061-0400 INFO  dvipng - this process (9600) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:01:46,072-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:01:46,072-0400 FATAL dvipng.core - Data: 
2022-03-22 11:01:46,072-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:01:46,072-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:01:46,072-0400 FATAL dvipng - Info: 
2022-03-22 11:01:46,072-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:01:46,072-0400 FATAL dvipng - Line: 126
2022-03-22 11:01:46,082-0400 INFO  dvipng - this process (9600) finishes with exit code 1
2022-03-22 11:01:47,138-0400 INFO  dvipng - this process (10736) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:01:47,149-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:01:47,149-0400 FATAL dvipng.core - Data: 
2022-03-22 11:01:47,149-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:01:47,149-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:01:47,149-0400 FATAL dvipng - Info: 
2022-03-22 11:01:47,149-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:01:47,149-0400 FATAL dvipng - Line: 126
2022-03-22 11:01:47,158-0400 INFO  dvipng - this process (10736) finishes with exit code 1
2022-03-22 11:01:47,932-0400 INFO  dvipng - this process (14192) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:01:47,943-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:01:47,943-0400 FATAL dvipng.core - Data: 
2022-03-22 11:01:47,943-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:01:47,943-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:01:47,943-0400 FATAL dvipng - Info: 
2022-03-22 11:01:47,943-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:01:47,943-0400 FATAL dvipng - Line: 126
2022-03-22 11:01:47,952-0400 INFO  dvipng - this process (14192) finishes with exit code 1
2022-03-22 11:02:11,326-0400 INFO  dvipng - this process (11888) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:02:11,336-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:02:11,336-0400 FATAL dvipng.core - Data: 
2022-03-22 11:02:11,336-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:02:11,336-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:02:11,336-0400 FATAL dvipng - Info: 
2022-03-22 11:02:11,337-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:02:11,337-0400 FATAL dvipng - Line: 126
2022-03-22 11:02:11,346-0400 INFO  dvipng - this process (11888) finishes with exit code 1
2022-03-22 11:02:12,133-0400 INFO  dvipng - this process (6304) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:02:12,144-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:02:12,144-0400 FATAL dvipng.core - Data: 
2022-03-22 11:02:12,144-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:02:12,144-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:02:12,144-0400 FATAL dvipng - Info: 
2022-03-22 11:02:12,144-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:02:12,144-0400 FATAL dvipng - Line: 126
2022-03-22 11:02:12,153-0400 INFO  dvipng - this process (6304) finishes with exit code 1
2022-03-22 11:02:13,296-0400 INFO  dvipng - this process (14808) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:02:13,306-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:02:13,306-0400 FATAL dvipng.core - Data: 
2022-03-22 11:02:13,306-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:02:13,307-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:02:13,307-0400 FATAL dvipng - Info: 
2022-03-22 11:02:13,307-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:02:13,307-0400 FATAL dvipng - Line: 126
2022-03-22 11:02:13,316-0400 INFO  dvipng - this process (14808) finishes with exit code 1
2022-03-22 11:02:14,091-0400 INFO  dvipng - this process (11656) started by 'anki' with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-22 11:02:14,102-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-22 11:02:14,102-0400 FATAL dvipng.core - Data: 
2022-03-22 11:02:14,102-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-22 11:02:14,102-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-22 11:02:14,102-0400 FATAL dvipng - Info: 
2022-03-22 11:02:14,102-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-22 11:02:14,102-0400 FATAL dvipng - Line: 126
2022-03-22 11:02:14,112-0400 INFO  dvipng - this process (11656) finishes with exit code 1
2022-03-23 11:50:00,906-0400 INFO  dvipng - this process (14256) started by anki in directory C:\Users\josh8\AppData\Local\Temp\anki_temp with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-23 11:50:00,919-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-23 11:50:00,919-0400 FATAL dvipng.core - Data: 
2022-03-23 11:50:00,919-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-23 11:50:00,922-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-23 11:50:00,922-0400 FATAL dvipng - Info: 
2022-03-23 11:50:00,922-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-23 11:50:00,922-0400 FATAL dvipng - Line: 126
2022-03-23 11:50:00,931-0400 INFO  dvipng - this process (14256) finishes with exit code 1
2022-03-23 11:50:01,705-0400 INFO  dvipng - this process (688) started by anki in directory C:\Users\josh8\AppData\Local\Temp\anki_temp with command line: dvipng -D 200 -T tight tmp.dvi -o tmp.png
2022-03-23 11:50:01,716-0400 FATAL dvipng.core - GUI framework cannot be initialized.
2022-03-23 11:50:01,716-0400 FATAL dvipng.core - Data: 
2022-03-23 11:50:01,716-0400 FATAL dvipng.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2022-03-23 11:50:01,716-0400 FATAL dvipng - GUI framework cannot be initialized.
2022-03-23 11:50:01,716-0400 FATAL dvipng - Info: 
2022-03-23 11:50:01,716-0400 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2022-03-23 11:50:01,716-0400 FATAL dvipng - Line: 126
2022-03-23 11:50:01,725-0400 INFO  dvipng - this process (688) finishes with exit code 1

Did you try updating the packages from the MiKTeX console?

Some details: https://tex.stackexchange.com/a/27141

The manual suggests running Anki as an administrator temporarily: Math & Symbols - Anki Manual

1 Like

Sorry for the very late reply. By now, I’ve updated my LaTeX packages and Anki several times and I’m still getting this problem today. I tried running Anki as admin, but I get the some errors.

For your own sake, do not “just run as admin to see if it helps” (this goes for Anki as well as for any other software).


Can you reproduce this issue without add-ons? That being said, could you try typing the exact same code but in the HTML editor? Does that help?

This was in response to @abdo 's suggestion.

I don’t use any add-ons. I’ve now tried entering the LaTeX code in the HTML editor and still had the same issue, as well.

The logs you posted above show the dvipng command Anki runs to render LaTeX. You’ll need to run it yourself outside of Anki. If it works, then that will probably resolve the issue in Anki as well. If it doesn’t work, then you should take this up on a LaTeX forum.

Ah sorry my bad :slight_smile:

Interesting. I ran the dvipng command manually, and MikTeX prompted me to install the package zhmetrics. It seems that the LaTeX code now compiles correctly in Anki. Thanks for leading me in the right direction.

1 Like