From 4ad24215f86f24d44439e013c16a4d78e1df68b6 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Sun, 9 Sep 2012 10:48:02 -0600 Subject: [PATCH] replace org-create-formula-image w/new functions A previous commit deleted the definition of `org-create-formula-image' without removing all calls to the function. This commit fixes the resultant bug in ob-latex by replacing the deleted function with a conditional call to one of the two replacement functions. --- lisp/ob-latex.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ob-latex.el b/lisp/ob-latex.el index 43f673e..339584e 100644 --- a/lisp/ob-latex.el +++ b/lisp/ob-latex.el @@ -86,7 +86,12 @@ This function is called by `org-babel-execute-src-block'." org-export-latex-packages-alist))) (cond ((and (string-match "\\.png$" out-file) (not imagemagick)) - (org-create-formula-image + (funcall + (case org-latex-create-formula-image-program + ('dvipng #'org-create-formula-image-with-dvipng) + ('imagemagick #'org-create-formula-image-with-imagemagick) + (t (error + "invalid value of `org-latex-create-formula-image-program'"))) body out-file org-format-latex-options in-buffer)) ((or (string-match "\\.pdf$" out-file) imagemagick) (require 'org-latex) -- 1.7.12