1

I am relatively new to Emacs and org-mode, and I would like the images displayed by org-latex-preview to be svg. I am trying to follow the instructions from this Stack Exchange question.

I have (setq org-latex-create-formula-image-program 'dvisvgm) in my configuration file, but the image I'm seeing is definitely not svg and rather seems to be the same as what appears with that variable set to dvipng instead.

Changing the variable to imagemagick does visibly change the image, so I know that Emacs is reading this line of the config file. I can open and view a separate svg image with Emacs, so I know that Emacs is able to view svg files. Also, when I include #+OPTIONS: tex:dvisvgm, the LaTeX is rendered as an svg, so I know that Emacs can talk to dvisvgm.

I am using:

  • Doom with Emacs 26.3
  • org-mode 9.4
  • MacOS Catalina
2
  • Although the variable should work, it is obsolete: you should use org-preview-latex-default-process. As for whether or not it works, you should check the ltximg subdirectory to see whether there is an org-<mumble>.svg file there and cat the file to make sure that it is an SVG. It may just look very much like the corresponding PNG file, fooling you into thinking that it is not SVG.
    – NickD
    Commented Aug 8, 2020 at 14:59
  • @NickD Thanks for your help! You were right.
    – Paige
    Commented Aug 8, 2020 at 16:19

1 Answer 1

1

The answer to the question is that the images I was looking at were svg files (they were not in a ltximg subdirectory, but in ~/.emacs.d/.local/cache/org-latex, maybe something to do with Doom). I learned from this question that the blurriness is a known issue in Emacs.

1
  • The image directory is the value of the variable org-preview-latex-image-directory. It is ltximg/ by default, but Doom may very well set it differently indeed.
    – NickD
    Commented Aug 9, 2020 at 2:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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