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

michal_h21 at gnu.org.ua michal_h21 at gnu.org.ua
Tue Dec 4 15:55:08 CET 2018


Author: michal_h21
Date: 2018-12-04 16:55:08 +0200 (Tue, 04 Dec 2018)
New Revision: 455

Added:
   trunk/lit/tex4ht-mathjax.tex
Modified:
   trunk/lit/ChangeLog
   trunk/lit/Makefile
   trunk/lit/tex4ht-html4.tex
Log:
Added basic MathJax support

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2018-11-29 23:25:43 UTC (rev 454)
+++ trunk/lit/ChangeLog	2018-12-04 14:55:08 UTC (rev 455)
@@ -1,3 +1,9 @@
+2018-12-04  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-html4.tex (html4-math.4ht): added "mathjax" option.
+	* tex4ht-mathjax.tex (mathjax-latex-4ht.4ht): new literate source holding
+	definitions for keeping of LaTeX commands in math commands and environments.
+
 2018-11-29  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-html4.tex (html4.4ht): Added \Configure{AddJs} and

Modified: trunk/lit/Makefile
===================================================================
--- trunk/lit/Makefile	2018-11-29 23:25:43 UTC (rev 454)
+++ trunk/lit/Makefile	2018-12-04 14:55:08 UTC (rev 455)
@@ -242,8 +242,13 @@
 derived += $(tex4ht_xhtmml_xtpipes_derived)
 tex4ht_xhtmml_xtpipes_derived = xhtmml.4xt XhtmmlUtilities.java
 
+derived += $(tex4ht_mathjax_derived)
+tex4ht_mathjax_derived = mathjax-latex-4ht.4ht
+
 # wripro.tex generates nothing (not literate).
+#
 
+
 derived += $(xtpipes_derived)
 xtpipes_derived = \
   $(wd)/xtpipes.java \
@@ -410,6 +415,9 @@
 
 $(xtpipes_derived): xtpipes.tex $(common)
 	htlatex $< "xhtml,3,next" "" "" $(tex_1opt)
+
+$(tex4ht_mathjax_derived): tex4ht-mathjax.tex
+	htlatex $<  "xhtml,3,next" "" "" $(tex_1opt)
 # Derived files are generated in . and $(wd).
 # (corresponds to src/java for xtpipes.tex)
 

Modified: trunk/lit/tex4ht-html4.tex
===================================================================
--- trunk/lit/tex4ht-html4.tex	2018-11-29 23:25:43 UTC (rev 454)
+++ trunk/lit/tex4ht-html4.tex	2018-12-04 14:55:08 UTC (rev 455)
@@ -8414,6 +8414,7 @@
 |<picmath latex|>
 |<32,4 picmath latex|>
 |<shared plain/latex pmatrix 4.0t|>
+|<mathjax|>
 >>>
 
 
@@ -8529,9 +8530,36 @@
 \Configure{underbrace} {}{\Picture+{}}{\EndPicture}
 >>>
 
+\<mathjax\><<<
+\:CheckOption{mathjax}\if:Option
+\input{mathjax-latex-4ht.4ht}
+\Configure{@HEAD}{\HCode{
+<script type="text/x-mathjax-config">                                           
+MathJax.Hub.Config({
+    'fast-preview': {disabled: true}, 
+    TeX: {           
+      extensions: ["color.js","AMSmath.js"], 
+      equationNumbers: { autoNumber: "AMS" }
+    },        
+    extensions: ["tex2jax.js"], 
+    tex2jax: {       
+      \unexpanded{
+        inlineMath: [ ["\\\(","\\\)"] ],
+      displayMath: [ ['$$','$$'], ["\\[","\\]"] ],}
+      processEscapes: true,
+      processEnvironments: true
+    }                   
+});                  
+</script>\Hnewline
+}}
+\Configure{@HEAD}{\HCode{ <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script> \Hnewline}}
+\Configure{$}{}{}{\expandafter\AltMathOne} 
+\Configure{()}{\AltlMath}{}
+\Configure{[]}{\AltlDisplay}{}
+\fi
+>>>
 
 
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{Shared plain latex Math}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



More information about the tex4ht-commits mailing list