summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-02-15 14:50:38 (GMT)
committer Bastien Guerry <bzg@altern.org>2013-02-15 14:50:38 (GMT)
commit94dbeedd4a259aaf8f644a9b65371452fc841e36 (patch)
tree92611c8207f8dbb8767dba024c4cb1ba354fe085
parent0641a2260638915529da2d258be9bd4a993549c6 (diff)
downloadorg-mode-94dbeedd4a259aaf8f644a9b65371452fc841e36.zip
org-mode-94dbeedd4a259aaf8f644a9b65371452fc841e36.tar.gz
ox-html.el (org-html--build-mathjax-config): Do not always include MathJax configuration
* ox-html.el (org-html--build-mathjax-config): Only include MathJax configuration if the resulting HTML contains LaTeX fragments.
-rw-r--r--lisp/ox-html.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index f5312e7..4575599 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1268,7 +1268,9 @@ INFO is a plist used as a communication channel."
(defun org-html--build-mathjax-config (info)
"Insert the user setup into the mathjax template.
INFO is a plist used as a communication channel."
- (when (memq (plist-get info :with-latex) '(mathjax t))
+ (when (and (memq (plist-get info :with-latex) '(mathjax t))
+ (org-element-map (plist-get info :parse-tree)
+ '(latex-fragment) 'identity info t))
(let ((template org-html-mathjax-template)
(options org-html-mathjax-options)
(in-buffer (or (plist-get info :html-mathjax) ""))