浏览代码

ox-html.el (org-html-format-latex): Fix commit 25a4f5

* ox-html.el (org-html-format-latex): Don't set
`cache-relpath' and `cache-dir' when `processing-type' is
'mathjax.
Bastien Guerry 12 年之前
父节点
当前提交
cc61ad218d
共有 1 个文件被更改,包括 8 次插入6 次删除
  1. 8 6
      lisp/ox-html.el

+ 8 - 6
lisp/ox-html.el

@@ -1992,13 +1992,15 @@ CONTENTS is nil.  INFO is a plist holding contextual information."
 ;;;; Latex Environment
 
 (defun org-html-format-latex (latex-frag processing-type)
+  "Format LaTeX fragments into HTML."
   (let (cache-relpath cache-dir bfn)
-    (if (setq bfn (buffer-file-name))
-	(setq cache-relpath
-	      (concat "ltxpng/"
-		      (file-name-sans-extension
-		       (file-name-nondirectory bfn)))
-	      cache-dir (file-name-directory bfn)))
+    (unless (eq processing-type 'mathjax)
+      (setq bfn (buffer-file-name)
+	    cache-relpath
+	    (concat "ltxpng/"
+		    (file-name-sans-extension
+		     (file-name-nondirectory bfn)))
+	    cache-dir (file-name-directory bfn)))
     (with-temp-buffer
       (insert latex-frag)
       (org-format-latex cache-relpath cache-dir nil "Creating LaTeX Image..."