1

So I have installed Anki and want to show latex equations in it. Downloaded Miktex and ensured that new packages will be installed on the fly. When I run an ANKI with an equation the following error shows up (after a lot of text):

Sorry, but dvipng did not succeed.

So I also downloaded an extra add on found in ANKI (https://ankiweb.net/shared/info/937148547). Still gives same error. When I open up the log file from the error it states the following:

2017-03-17 08:23:28,852+0100 FATAL dvipng - GUI framework cannot be initialized.
2017-03-17 08:23:28,852+0100 FATAL dvipng - Info: 
2017-03-17 08:23:28,852+0100 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2017-03-17 08:23:28,852+0100 FATAL dvipng - Line: 45
2017-03-17 08:23:29,775+0100 FATAL dvipng - GUI framework cannot be initialized.
2017-03-17 08:23:29,775+0100 FATAL dvipng - Info: 
2017-03-17 08:23:29,775+0100 FATAL dvipng - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2017-03-17 08:23:29,775+0100 FATAL dvipng - Line: 45

Can anybody help??

  • 2
    Welcome to TeX.SX! Please try to update MikTeX with its update manager. Are there any errors? – TeXnician Mar 17 '17 at 7:53
  • Do the update in both Admin and User mode (there will be 'MikTeX Update' in user mode and 'MikTeX Update (Admin)' in amdin mode). Due to MikTeX's update system you might have to run both updaters twice. The problem you describe seems as though the on-the-fly installation cannot open the installation window. I have seen this happening to some people. Do you have the install package on the fly option set to 'yes' or 'ask me first'? If you are using 'ask me first', does it help to go over to 'yes'? – moewe Mar 17 '17 at 9:12
  • @TeXnician There are no errrors when I update it. There used to be (like before I made the post) but then I reinstalled MikTex and there now are none. – Mia Jakobsen Mar 21 '17 at 12:24
  • @moewe I have already set both to "yes" and it makes no difference. – Mia Jakobsen Mar 21 '17 at 12:26
1

I realize this is kind of an old question, but I just struggled with the same and thought I'd share my answer.

The error message seen in the log file FATAL dvipng - GUI framework cannot be initialized I believe is MiKTeX trying to load the "install-missing-package?" prompt-window, but is unable to load its GUI when it's actioned through Anki.

What worked for me was to navigate to the .tex Anki is trying to compile, in powershell, and call dvipng manually from the commandline:

cd ~/AppData/Local/Temp/anki_temp/
dvipng tmp.tex

This trigged the Install package window, and let me install the missing package.

After installing the missing package Anki and latex worked together like they should :-)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.