summaryrefslogtreecommitdiff
path: root/support/TeX4ht/source/tex4ht-mathjax.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-10-24 03:03:39 +0000
committerNorbert Preining <norbert@preining.info>2022-10-24 03:03:39 +0000
commit74697976d2ffe935077542593ccbb18a00603251 (patch)
treeca88ce389275df22be5c2c843de613d8003bf684 /support/TeX4ht/source/tex4ht-mathjax.tex
parent588d4f81788b3a24bd9bd480ec40bb55be4d1da1 (diff)
CTAN sync 202210240303
Diffstat (limited to 'support/TeX4ht/source/tex4ht-mathjax.tex')
-rw-r--r--support/TeX4ht/source/tex4ht-mathjax.tex21
1 files changed, 19 insertions, 2 deletions
diff --git a/support/TeX4ht/source/tex4ht-mathjax.tex b/support/TeX4ht/source/tex4ht-mathjax.tex
index 97ac94d20d..e93531455a 100644
--- a/support/TeX4ht/source/tex4ht-mathjax.tex
+++ b/support/TeX4ht/source/tex4ht-mathjax.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-mathjax.tex 1214 2022-10-11 12:25:01Z michal_h21 $
+% $Id: tex4ht-mathjax.tex 1215 2022-10-17 13:58:09Z michal_h21 $
% compile: latex tex4ht-mathjax
%
% Copyright 2018-2022 TeX Users Group
@@ -72,12 +72,29 @@ We still use regula expressions to escape invalid XML characters to entities, so
>>>
-Provide configuratio for MathJax
+Provide configuration for MathJax
\<defined commands\><<<
\NewConfigure{MathJaxConfig}{1}
>>>
+The MathJaxMacros configuration includes a file with TeX macro
+definitions, and include them at the beginning of each HTML page.
+MathJax then interprets them, so they are available in math.
+This is an alternative to JavaScript method using MathJaxConfig.
+
+The file cannot contain any other commands than newcommand,
+all characters that could cause issues in the HTML parsing must
+be escaped, so \verb|<| should became \verb|&lt;|, for example.
+
+\<defined commands\><<<
+\NewConfigure{MathJaxMacros}[1]{%
+\Configure{@BODY}{\bgroup\NoFonts\ttfamily\detokenize{\(}%
+ \special{t4ht*<#1}%
+\detokenize{\)}\EndNoFonts\egroup}%
+}
+>>>
+
The following commands are used for patching of the standard math commands and
environments. They will then keep the LaTeX code unchanged.