[tex4ht-commits] [SCM] tex4ht updated: r780 - trunk/lit
michal_h21 at gnu.org.ua
michal_h21 at gnu.org.ua
Sun Jul 26 19:56:45 CEST 2020
Author: michal_h21
Date: 2020-07-26 20:56:45 +0300 (Sun, 26 Jul 2020)
New Revision: 780
Modified:
trunk/lit/ChangeLog
trunk/lit/tex4ht-html4.tex
trunk/lit/tex4ht-mathjax.tex
Log:
Added MatHJaxConfig cofiguration
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2020-07-26 16:18:05 UTC (rev 779)
+++ trunk/lit/ChangeLog 2020-07-26 17:56:45 UTC (rev 780)
@@ -1,3 +1,9 @@
+2020-07-26 Michal Hoftich <michal.h21 at gmail.com>
+
+ * tex4ht-mathjax.tex (mathjax-latex-4ht.4ht),
+ * tex4ht-html4.tex (html4-math.4ht): added MathJaxConfig configuration.
+ https://github.com/michal-h21/make4ht/issues/33
+
2020-07-26 Karl Berry <karl at freefriends.org>
* Makefile (diff-htfonts): rename from diff-ht-fonts, and also
Modified: trunk/lit/tex4ht-html4.tex
===================================================================
--- trunk/lit/tex4ht-html4.tex 2020-07-26 16:18:05 UTC (rev 779)
+++ trunk/lit/tex4ht-html4.tex 2020-07-26 17:56:45 UTC (rev 780)
@@ -8545,9 +8545,8 @@
\<mathjax\><<<
\:CheckOption{mathjax}\if:Option
\input{mathjax-latex-4ht.4ht}
-\Configure{@HEAD}{\HCode{
-<script>
-window.MathJax = {
+\ifx\a:MathJaxConfig\relax
+\Configure{MathJaxConfig}{{
tex: {
tags: "ams",
\detokenize{%
@@ -8561,8 +8560,9 @@
load: ['[tex]/color', '[tex]/ams']
}
};
-</script>\Hnewline
-}}
+}
+\fi
+\Configure{@HEAD}{\HCode{<script>window.MathJax = \a:MathJaxConfig</script>\Hnewline}}
\Configure{MathjaxSource}{https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js}
\Configure{@HEAD}{\HCode{ <script type="text/javascript" async="async" id="MathJax-script" src="\a:MathjaxSource"></script> \Hnewline}}
\edef\:RestoreMathjaxCatcodes{\catcode`\noexpand \&=\the\catcode`\&}
Modified: trunk/lit/tex4ht-mathjax.tex
===================================================================
--- trunk/lit/tex4ht-mathjax.tex 2020-07-26 16:18:05 UTC (rev 779)
+++ trunk/lit/tex4ht-mathjax.tex 2020-07-26 17:56:45 UTC (rev 780)
@@ -58,10 +58,17 @@
>>>
+Provide configuratio for MathJax
+
+\<defined commands\><<<
+\NewConfigure{MathJaxConfig}{1}
+>>>
+
The following commands are used for patching of the standard math commands and
environments. They will then keep the LaTeX code unchanged.
\<defined commands\><<<
+
\long\def\AltlMath#1\){\expandafter\alteqtoks{\(#1\)}\)}
\long\def\AltlDisplay#1\]{\alteqtoks{\[#1\]}\]}
\long\def\AltMathOne#1${\alteqtoks{\(#1\)}$}
More information about the tex4ht-commits
mailing list.