> > Nothing - it's a bug introduced by commit a9d3ce0bcd3492eb0cd2aa7b0d1f6ee93276114b: > > ,---- > | commit a9d3ce0bcd3492eb0cd2aa7b0d1f6ee93276114b > | Author: Feng Shu > | Date: Fri Apr 20 19:21:43 2012 +0200 > | > | Allow to use imagemagick for previewing LaTeX fragements. > | > | * org.el (org-latex-create-formula-image-program): New option > | to use either dvipng or imagemagick to convert and preview > | LaTeX fragments. > | (org-preview-latex-fragment, org-format-latex): Handle the new > | option. > | (org-create-formula-image-with-dvipng): Rename from > | `org-create-formula-image'. > | (org-create-formula-image-with-imagemagick): New defun to > | handle LaTeX preview with imagemagick. > | (org-latex-color, org-latex-color-format): New defuns to > | handle color conversions. > | > | * org-latex.el (org-latex-to-pdf-process, org-export-as-pdf): > | Allow to use imagemagick to convert LaTeX fragments. > | > | * org-html.el (org-export-html-preprocess): Ditto. > | > | * org-exp.el (org-export-with-LaTeX-fragments): Ditto. > | > | * org.texi (@LaTeX{} fragments): Document imagemagick as an > | alternative to dvipng. > | > `---- > > org-create-formula-image got renamed, but the reference in ob-latex.el > to the original name was not changed. > > The quick-and-dirty "fix" is to change the reference in ob-latex.el to > org-create-formula-image-dvipng or org-create-formula-image-imagemagick, > depending on which method you happen to be using. But one would resort > to that only in the direst emergency in order to get something working > as quickly as possible. > > IMO, it would be better to have split the dvipng/imagemagick decision at > a lower level in the code. That way, both org-format-latex and > org-babel-execute:latex would use the common function. As it is, > org-format-latex is a fairly "dirty" function and with the split, it got > even dirtier. > > But there may be difficulties that my quick glance through the code has > not uncovered: it needs a deeper look. > So, what would you recommend as a full fix in ob-latex.el? The attached commit selects an alternate function based on the value of the `org-latex-create-formula-image-program' variable. Does this seem like an appropriate fix to the problem? Thanks,