mathjax v2 to v3
This commit is contained in:
@@ -1066,90 +1066,80 @@ Uses function `my-org-headline-string-element'"
|
|||||||
(setq org-html-doctype "html5")
|
(setq org-html-doctype "html5")
|
||||||
(setq org-html-html5-fancy t)
|
(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-validation-link nil) ;; remove the "Validate" link at the bottom of the page
|
||||||
(setq org-html-mathjax-options
|
(setq org-html-mathjax-options ;; variables used in `org-html-mathjax-template'
|
||||||
'((path "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML")
|
'((path "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js")
|
||||||
;;(path "/js/MathJax-master/MathJax.js?config=TeX-AMS_HTML")
|
(scale "1.0")
|
||||||
(scale "100")
|
|
||||||
(align "center")
|
(align "center")
|
||||||
(font "TeX")
|
(font "TeX")
|
||||||
(linebreaks "false")
|
(overflow "overflow")
|
||||||
(autonumber "AMS")
|
(tags "ams")
|
||||||
(indent "0em")
|
(indent "0em")
|
||||||
(multlinewidth "85%")
|
(multlinewidth "85%")
|
||||||
(tagindent ".8em")
|
(tagindent ".8em")
|
||||||
(tagside "right"))) ;; #+HTML_MATHJAX: align: left indent: 5em tagside: left font: Neo-Euler
|
(tagside "right"))) ;; #+HTML_MATHJAX: align: left indent: 5em tagside: left font: Neo-Euler
|
||||||
;; http://docs.mathjax.org/en/latest/input/tex/macros/
|
;; http://docs.mathjax.org/en/latest/input/tex/macros/
|
||||||
(setq org-html-mathjax-template "<script type=\"text/x-mathjax-config\">
|
;; TODO: old config v2 to v3
|
||||||
MathJax.Ajax.config.path[\"Contrib\"] = \"https://cdn.mathjax.org/mathjax/contrib\";
|
;; variable ONLY in upper-case!
|
||||||
MathJax.Hub.Register.StartupHook(\"TeX Jax Ready\",function () {
|
(setq org-html-mathjax-template "
|
||||||
MathJax.Hub.Insert(MathJax.InputJax.TeX.Definitions.macros,{
|
<script>
|
||||||
cancel: [\"Extension\",\"cancel\"],
|
MathJax = {
|
||||||
bcancel: [\"Extension\",\"cancel\"],
|
chtml: {
|
||||||
xcancel: [\"Extension\",\"cancel\"],
|
scale: %SCALE
|
||||||
cancelto: [\"Extension\",\"cancel\"]
|
},
|
||||||
});
|
svg: {
|
||||||
});
|
scale: %SCALE
|
||||||
MathJax.Hub.Config({
|
},
|
||||||
extensions: [\"[Contrib]/siunitx/siunitx.js\"],
|
tex: {
|
||||||
displayAlign: \"%ALIGN\",
|
inlineMath: [['\\\\(', '\\\\)']],
|
||||||
displayIndent: \"%INDENT\",
|
tags: \"%TAGS\",
|
||||||
|
multlineWidth: \"%MULTLINEWIDTH\",
|
||||||
\"HTML-CSS\": { scale: %SCALE,
|
tagSide: \"$TAGSIDE\",
|
||||||
linebreaks: { automatic: \"%LINEBREAKS\" },
|
tagIndent: \"%TAGINDENT\",
|
||||||
webFont: \"%FONT\"
|
macros: {
|
||||||
},
|
ti: [\"{_\\\\text{#1}}\",1],
|
||||||
SVG: {scale: %SCALE,
|
ho: [\"{^\\\\text{#1}}\",1],
|
||||||
linebreaks: { automatic: \"%LINEBREAKS\" },
|
field: [\"\\\\mathbb{#1}\",1],
|
||||||
font: \"%FONT\"},
|
fC: \"{\\\\field{C}}\",
|
||||||
NativeMML: {scale: %SCALE},
|
fN: \"{\\\\field{N}}\",
|
||||||
TeX: { equationNumbers: {autoNumber: \"%AUTONUMBER\"},
|
fR: \"{\\\\field{R}}\",
|
||||||
MultLineWidth: \"%MULTLINEWIDTH\",
|
fQ: \"{\\\\field{Q}}\",
|
||||||
TagSide: \"%TAGSIDE\",
|
fI: \"{\\\\field{I}}\",
|
||||||
TagIndent: \"%TAGINDENT\",
|
fZ: \"{\\\\field{Z}}\",
|
||||||
Macros: {
|
qed: \"{\\\\blacksquare}\",
|
||||||
ti: [\"{_\\\\text{#1}}\",1],
|
T: \"{\\\\mathrm{T}}\",
|
||||||
ho: [\"{^\\\\text{#1}}\",1],
|
dif: \"{\\\\,\\\\mathop{}\\\\!\\\\mathrm{d}}\",
|
||||||
field: [\"\\\\mathbb{#1}\",1],
|
norm: [\"{\\\\lVert{}#1\\\\rVert}\",1],
|
||||||
fC: \"{\\\\field{C}}\",
|
abs: [\"{\\\\lvert{}#1\\\\rvert}\",1],
|
||||||
fN: \"{\\\\field{N}}\",
|
corresponds: \"{{\\\\kern0em\\\\raise{.5ex}{\\\\Large\\\\hat{}}\\\\kern-.73em\\\\raise{-.2ex}{=}}\\\\ }\",
|
||||||
fR: \"{\\\\field{R}}\",
|
dt: [\"{\\\\overset{{\\\\large\\\\bf{}.}}{#1}}\",1],
|
||||||
fQ: \"{\\\\field{Q}}\",
|
ddt: [\"{\\\\overset{{\\\\large\\\\bf{}.\\\\hspace{-0.1ex}.}}{#1}}\",1],
|
||||||
fI: \"{\\\\field{I}}\",
|
Eval: [\"{\\\\left.#1\\\\phantom{\\\\Big|}\\\\!\\\\!\\\\right\\\\rvert_{#2}^{#3}}\",3],
|
||||||
fZ: \"{\\\\field{Z}}\",
|
tensor: [\"{\\\\mathbf{#1}}\",1],
|
||||||
qed: \"{\\\\blacksquare}\",
|
tensorI: [\"{\\\\underline{\\\\mathbf{#1}}}\",1],
|
||||||
T: \"{\\\\mathrm{T}}\",
|
tensorII: [\"{\\\\underline{\\\\underline{\\\\mathbf{#1}}}}\",1],
|
||||||
dif: \"{\\\\,\\\\mathop{}\\\\!\\\\mathrm{d}}\",
|
tensorIII: [\"{\\\\underset{\\\\raise{.5ex}{\\\\Large\\\\tilde{\\\\small{}3}}}{\\\\mathbf{#1}}}\",1],
|
||||||
norm: [\"{\\\\lVert{}#1\\\\rVert}\",1],
|
tensorIV: [\"{\\\\underset{\\\\raise{.5ex}{\\\\Large\\\\tilde{\\\\small{}4}}}{\\\\mathbf{#1}}}\",1],
|
||||||
abs: [\"{\\\\lvert{}#1\\\\rvert}\",1],
|
tensori: [\"{\\\\overrightarrow{#1}}\",1],
|
||||||
corresponds: \"{{\\\\kern0em\\\\raise{.5ex}{\\\\Large\\\\hat{}}\\\\kern-.73em\\\\raise{-.2ex}{=}}\\\\ }\",
|
tensorii: [\"{\\\\overleftrightarrow{#1}}\",1],
|
||||||
dt: [\"{\\\\overset{{\\\\large\\\\bf{}.}}{#1}}\",1],
|
tensoriii: [\"{\\\\overrightarrow{\\\\overleftrightarrow{#1}}}\",1],
|
||||||
ddt: [\"{\\\\overset{{\\\\large\\\\bf{}.\\\\hspace{-0.1ex}.}}{#1}}\",1],
|
tensoriv: [\"{\\\\overleftrightarrow{\\\\overleftrightarrow{#1}}}\",1],
|
||||||
Eval: [\"{\\\\left.#1\\\\phantom{\\\\Big|}\\\\!\\\\!\\\\right\\\\rvert_{#2}^{#3}}\",3],
|
rank: \"{\\\\mathop{\\\\mathrm{rank}}}\",
|
||||||
tensor: [\"{\\\\mathbf{#1}}\",1],
|
tr: \"{\\\\mathop{\\\\mathrm{tr}}}\",
|
||||||
tensorI: [\"{\\\\underline{\\\\mathbf{#1}}}\",1],
|
dev: \"{\\\\mathop{\\\\mathrm{dev}}}\",
|
||||||
tensorII: [\"{\\\\underline{\\\\underline{\\\\mathbf{#1}}}}\",1],
|
var: \"{\\\\mathop{\\\\mathrm{var}}}\",
|
||||||
tensorIII: [\"{\\\\underset{\\\\raise{.5ex}{\\\\Large\\\\tilde{\\\\small{}3}}}{\\\\mathbf{#1}}}\",1],
|
grad: \"{\\\\mathop{\\\\mathrm{grad}}}\",
|
||||||
tensorIV: [\"{\\\\underset{\\\\raise{.5ex}{\\\\Large\\\\tilde{\\\\small{}4}}}{\\\\mathbf{#1}}}\",1],
|
divergence: \"{\\\\mathop{\\\\mathrm{div}}}\",
|
||||||
tensori: [\"{\\\\overrightarrow{#1}}\",1],
|
rot: \"{\\\\mathop{\\\\mathrm{rot}}}\",
|
||||||
tensorii: [\"{\\\\overleftrightarrow{#1}}\",1],
|
diag: \"{\\\\mathop{\\\\mathrm{diag}}}\",
|
||||||
tensoriii: [\"{\\\\overrightarrow{\\\\overleftrightarrow{#1}}}\",1],
|
adjungate: \"{\\\\mathop{\\\\mathrm{adj}}}\",
|
||||||
tensoriv: [\"{\\\\overleftrightarrow{\\\\overleftrightarrow{#1}}}\",1],
|
EUR: \"{\\\\text{€}}\"
|
||||||
rank: \"{\\\\mathop{\\\\mathrm{rank}}}\",
|
}
|
||||||
tr: \"{\\\\mathop{\\\\mathrm{tr}}}\",
|
}
|
||||||
dev: \"{\\\\mathop{\\\\mathrm{dev}}}\",
|
};
|
||||||
var: \"{\\\\mathop{\\\\mathrm{var}}}\",
|
|
||||||
grad: \"{\\\\mathop{\\\\mathrm{grad}}}\",
|
|
||||||
divergence: \"{\\\\mathop{\\\\mathrm{div}}}\",
|
|
||||||
rot: \"{\\\\mathop{\\\\mathrm{rot}}}\",
|
|
||||||
diag: \"{\\\\mathop{\\\\mathrm{diag}}}\",
|
|
||||||
adjungate: \"{\\\\mathop{\\\\mathrm{adj}}}\",
|
|
||||||
EUR: \"{\\\\text{€}}\"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
<script type=\"text/javascript\"
|
<script type=\"text/javascript\" id=\"MathJax-script\" async
|
||||||
src=\"%PATH\"></script>")
|
src=\"%PATH\"></script>
|
||||||
|
")
|
||||||
)
|
)
|
||||||
|
|
||||||
(use-package ox-latex
|
(use-package ox-latex
|
||||||
|
|||||||
Reference in New Issue
Block a user