I have an org file, where I put a LaTeX
fragment to be rendered in line with C-c C-x C-l
. It is a simple formula:
\[
e^{i\pi} = -1
\]
I have MiKTeX
installed, latex
and dvi
commands work from command line in Windows without a problem.
I also have AUCTeX and preview of the same file (embedded in \begin{document}
and stuff) works fine.
I get the following message in the messages
buffer:
Failed to create dvi file from c:/Users/Michele/AppData/Local/Temp/orgtex6380KuB.tex
Creating images for entry...done. Use `C-c C-c' to remove images.
Cannot find image file `c:/Users/Michele/Documents/ltxpnghome_5e3cd2413a24591c2b9e10c34d704b6effc5776a.png'
What to do next?
UPDATE
I have tried to change org-latex-create-formula-image-program
to imagemagick
instead of dvipng
but got no luck. However, during my trials I opened the tex editor of MiKTeX
to do some other, basically unrelated, testing.
While editor and package manager were open, I went to emacs
and reverted back to dvipng
and tried again C-c C-x C-l
. At this point, I got a series of request to install missing packages!!
Guess what? When the requests ended (it was quite a few), everything was working fine and previews are now correctly displayed!
I have tried to trace back the last packages installed, they should be:
ulem, marvosym, wasysym, vasy
Hope this can help in a similar case.