0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-16 08:16:27 +00:00

org-e-html: Fix mathjax

This commit is contained in:
Jambunathan K 2012-03-01 10:30:41 +05:30
parent f0af36a348
commit 4d58568076

View file

@ -120,7 +120,8 @@
(:html-preamble nil nil org-e-html-preamble) (:html-preamble nil nil org-e-html-preamble)
(:html-table-tag nil nil org-e-html-table-tag) (:html-table-tag nil nil org-e-html-table-tag)
(:xml-declaration nil nil org-e-html-xml-declaration) (:xml-declaration nil nil org-e-html-xml-declaration)
(:LaTeX-fragments nil "LaTeX" org-export-with-LaTeX-fragments)) (:LaTeX-fragments nil "LaTeX" org-export-with-LaTeX-fragments)
(:mathjax "MATHJAX" nil "" space))
"Alist between export properties and ways to set them. "Alist between export properties and ways to set them.
The car of the alist is the property name, and the cdr is a list The car of the alist is the property name, and the cdr is a list
@ -1567,6 +1568,7 @@ This function shouldn't be used for floats. See
(defun org-e-html-mathjax-config (template options in-buffer) (defun org-e-html-mathjax-config (template options in-buffer)
"Insert the user setup into the matchjax template." "Insert the user setup into the matchjax template."
(when (member (plist-get info :LaTeX-fragments) '(mathjax t))
(let (name val (yes " ") (no "// ") x) (let (name val (yes " ") (no "// ") x)
(mapc (mapc
(lambda (e) (lambda (e)
@ -1590,16 +1592,7 @@ This function shouldn't be used for floats. See
(if (string-match ":MMLNO:" template) (if (string-match ":MMLNO:" template)
(setq template (replace-match no t t template))) (setq template (replace-match no t t template)))
;; Return the modified template ;; Return the modified template
template)) template)))
(defun org-e-html-mathjax (info)
(when (or (eq (plist-get info :HTML-fragments) 'mathjax)
(and org-export-have-math
(eq (plist-get info :HTML-fragments) t)))
(org-e-html-mathjax-config
org-e-html-mathjax-template
org-e-html-mathjax-options
(or (plist-get info :mathjax) ""))))
(defun org-e-html-preamble (info) (defun org-e-html-preamble (info)
(when (plist-get info :html-preamble) (when (plist-get info :html-preamble)
@ -1732,7 +1725,9 @@ original parsed data. INFO is a plist holding export options."
<head>" <head>"
(org-e-html-meta-info info) ; meta (org-e-html-meta-info info) ; meta
(org-e-html-style info) ; style (org-e-html-style info) ; style
(org-e-html-mathjax info) ; mathjax (org-e-html-mathjax-config ; mathjax
org-e-html-mathjax-template org-e-html-mathjax-options
(or (plist-get info :mathjax) ""))
" "
</head>" </head>"