mathjax v2 to v3
This commit is contained in:
@@ -1066,47 +1066,36 @@ Uses function `my-org-headline-string-element'"
|
||||
(setq org-html-doctype "html5")
|
||||
(setq org-html-html5-fancy t)
|
||||
(setq org-html-validation-link nil) ;; remove the "Validate" link at the bottom of the page
|
||||
(setq org-html-mathjax-options
|
||||
'((path "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML")
|
||||
;;(path "/js/MathJax-master/MathJax.js?config=TeX-AMS_HTML")
|
||||
(scale "100")
|
||||
(setq org-html-mathjax-options ;; variables used in `org-html-mathjax-template'
|
||||
'((path "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js")
|
||||
(scale "1.0")
|
||||
(align "center")
|
||||
(font "TeX")
|
||||
(linebreaks "false")
|
||||
(autonumber "AMS")
|
||||
(overflow "overflow")
|
||||
(tags "ams")
|
||||
(indent "0em")
|
||||
(multlinewidth "85%")
|
||||
(tagindent ".8em")
|
||||
(tagside "right"))) ;; #+HTML_MATHJAX: align: left indent: 5em tagside: left font: Neo-Euler
|
||||
;; http://docs.mathjax.org/en/latest/input/tex/macros/
|
||||
(setq org-html-mathjax-template "<script type=\"text/x-mathjax-config\">
|
||||
MathJax.Ajax.config.path[\"Contrib\"] = \"https://cdn.mathjax.org/mathjax/contrib\";
|
||||
MathJax.Hub.Register.StartupHook(\"TeX Jax Ready\",function () {
|
||||
MathJax.Hub.Insert(MathJax.InputJax.TeX.Definitions.macros,{
|
||||
cancel: [\"Extension\",\"cancel\"],
|
||||
bcancel: [\"Extension\",\"cancel\"],
|
||||
xcancel: [\"Extension\",\"cancel\"],
|
||||
cancelto: [\"Extension\",\"cancel\"]
|
||||
});
|
||||
});
|
||||
MathJax.Hub.Config({
|
||||
extensions: [\"[Contrib]/siunitx/siunitx.js\"],
|
||||
displayAlign: \"%ALIGN\",
|
||||
displayIndent: \"%INDENT\",
|
||||
|
||||
\"HTML-CSS\": { scale: %SCALE,
|
||||
linebreaks: { automatic: \"%LINEBREAKS\" },
|
||||
webFont: \"%FONT\"
|
||||
;; TODO: old config v2 to v3
|
||||
;; variable ONLY in upper-case!
|
||||
(setq org-html-mathjax-template "
|
||||
<script>
|
||||
MathJax = {
|
||||
chtml: {
|
||||
scale: %SCALE
|
||||
},
|
||||
SVG: {scale: %SCALE,
|
||||
linebreaks: { automatic: \"%LINEBREAKS\" },
|
||||
font: \"%FONT\"},
|
||||
NativeMML: {scale: %SCALE},
|
||||
TeX: { equationNumbers: {autoNumber: \"%AUTONUMBER\"},
|
||||
MultLineWidth: \"%MULTLINEWIDTH\",
|
||||
TagSide: \"%TAGSIDE\",
|
||||
TagIndent: \"%TAGINDENT\",
|
||||
Macros: {
|
||||
svg: {
|
||||
scale: %SCALE
|
||||
},
|
||||
tex: {
|
||||
inlineMath: [['\\\\(', '\\\\)']],
|
||||
tags: \"%TAGS\",
|
||||
multlineWidth: \"%MULTLINEWIDTH\",
|
||||
tagSide: \"$TAGSIDE\",
|
||||
tagIndent: \"%TAGINDENT\",
|
||||
macros: {
|
||||
ti: [\"{_\\\\text{#1}}\",1],
|
||||
ho: [\"{^\\\\text{#1}}\",1],
|
||||
field: [\"\\\\mathbb{#1}\",1],
|
||||
@@ -1146,10 +1135,11 @@ Uses function `my-org-headline-string-element'"
|
||||
EUR: \"{\\\\text{€}}\"
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<script type=\"text/javascript\"
|
||||
src=\"%PATH\"></script>")
|
||||
<script type=\"text/javascript\" id=\"MathJax-script\" async
|
||||
src=\"%PATH\"></script>
|
||||
")
|
||||
)
|
||||
|
||||
(use-package ox-latex
|
||||
|
||||
Reference in New Issue
Block a user