[tex4ht-commits] [SCM] tex4ht updated: r1215 - trunk/lit

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Mon Oct 17 15:58:09 CEST 2022


Author: michal_h21
Date: 2022-10-17 13:58:09 +0000 (Mon, 17 Oct 2022)
New Revision: 1215

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-mathjax.tex
Log:
\Configure{MathJaxMacros}

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2022-10-11 12:25:01 UTC (rev 1214)
+++ trunk/lit/ChangeLog	2022-10-17 13:58:09 UTC (rev 1215)
@@ -1,3 +1,9 @@
+2022-10-17  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-mathjax.tex (mathjax-latex-4ht.4ht): added
+	\Configure{MathJaxMacros} for inclusion of file with \LaTeX\ command
+	declarations.
+
 2022-10-11  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-mathjax.tex (mathjax-latex-4ht.4ht): corrected Mhchem

Modified: trunk/lit/tex4ht-mathjax.tex
===================================================================
--- trunk/lit/tex4ht-mathjax.tex	2022-10-11 12:25:01 UTC (rev 1214)
+++ trunk/lit/tex4ht-mathjax.tex	2022-10-17 13:58:09 UTC (rev 1215)
@@ -72,12 +72,29 @@
 
 >>>
 
-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|<|, 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.
 



More information about the tex4ht-commits mailing list.