texlive[49330] Master/texmf-dist/tex/generic/tex4ht: mathjax, tex4ht

commits+karl at tug.org commits+karl at tug.org
Thu Dec 6 03:12:43 CET 2018


Revision: 49330
          http://tug.org/svn/texlive?view=revision&revision=49330
Author:   karl
Date:     2018-12-06 03:12:43 +0100 (Thu, 06 Dec 2018)
Log Message:
-----------
mathjax, tex4ht r455-457

Revision Links:
--------------
    http://tug.org/svn/texlive?view=revision&revision=455

Modified Paths:
--------------
    trunk/Master/texmf-dist/tex/generic/tex4ht/html-mml.4ht
    trunk/Master/texmf-dist/tex/generic/tex4ht/html4-math.4ht
    trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/html-mml.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/html-mml.4ht	2018-12-06 01:23:15 UTC (rev 49329)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/html-mml.4ht	2018-12-06 02:12:43 UTC (rev 49330)
@@ -1,4 +1,4 @@
-% html-mml.4ht (2018-02-23-15:42), generated from tex4ht-mathml.tex
+% html-mml.4ht (2018-12-05-15:46), generated from tex4ht-mathml.tex
 % Copyright 2009-2018 TeX Users Group
 % Copyright 1999-2009 Eitan M. Gurari
 %
@@ -17,7 +17,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2018-02-23-15:42}
+\immediate\write-1{version 2018-12-05-15:46}
 
 \exit:ifnot{amsmath,% 
 array,% 
@@ -285,6 +285,10 @@
 \Css{math .textsl { font-style: oblique; }}
 \Css{math .textsf { font-family: sans-serif; }}
 \Css{math .textbf { font-weight: bold; }}
+\:CheckOption{mathjax}\if:Option
+\Configure{MathjaxSource}{https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=MML_HTMLorMML}
+\Configure{@HEAD}{\HCode{ <script type="text/javascript" src="\a:MathjaxSource"></script> \Hnewline}}
+\fi
 \Configure{multicolumn}
    {\let\sv:VBorder\VBorder
     \let\VBorder\empty
@@ -723,6 +727,10 @@
 
 
 
+
+
+
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{array}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -814,7 +822,6 @@
 
 
 
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{color}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -891,7 +898,6 @@
 
 
 
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{rlbabel}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -939,7 +945,6 @@
 
 
 
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{frenchb}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1009,6 +1014,11 @@
 
 
 
+
+
+
+
+
 
 
 

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/html4-math.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/html4-math.4ht	2018-12-06 01:23:15 UTC (rev 49329)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/html4-math.4ht	2018-12-06 02:12:43 UTC (rev 49330)
@@ -1,5 +1,5 @@
-% html4-math.4ht (2017-03-30-16:04), generated from tex4ht-html4.tex
-% Copyright 2009-2017 TeX Users Group
+% html4-math.4ht (2018-12-05-18:11), generated from tex4ht-html4.tex
+% Copyright 2009-2018 TeX Users Group
 % Copyright 1999-2009 Eitan M. Gurari
 %
 % This work may be distributed and/or modified under the
@@ -17,7 +17,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2017-03-30-16:04}
+\immediate\write-1{version 2018-12-05-18:11}
 
 \exit:ifnot{accents,% 
 amsfonts,% 
@@ -314,6 +314,34 @@
 \Css{div.pmatrix {text-align:center;}}
 \Css{table.pmatrix {width:100\%;}}
 
+\: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{MathjaxSource}{https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML}
+\Configure{@HEAD}{\HCode{ <script type="text/javascript" src="\a:MathjaxSource"></script> \Hnewline}}
+\Configure{$}{}{}{\expandafter\AltMathOne}
+\Configure{()}{\AltlMath}{}
+\Configure{[]}{\AltlDisplay}{}
+\fi
+
 \NewConfigure{bar-css}{2}
 \Configure{bar-css}
    {\HCode{<span class="bar-css">}}
@@ -443,6 +471,7 @@
 
 
 
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{amsmath}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -483,8 +512,10 @@
 \fi}
 \Configure{substack}{\Picture+{}}{\EndPicture}
 \def\m:env#1{\relax\ifmmode\else\par\fi\:xhtml{\IgnorePar\EndP}%
-  \HCode{<center class="#1"><table class="#1"\Hnewline
-   border="0" cellpadding="0" cellspacing="15"><tr><td>}}
+  \HCode{<div class="center-#1"><table class="#1"\Hnewline
+   border="0" cellpadding="0" cellspacing="15"><tr><td>}
+   \Css{div.center-#1{text-align: center;}}
+ }
 \def\endm:env{\:xhtml{\IgnorePar\EndP}%
    \HCode{</td></tr></table></center>}\IgnorePar
    \ifmmode\else\par\fi}
@@ -728,8 +759,10 @@
   {}{}{}{}
 \Configure{linebreak}{\HCode{<br />}}
 \def\m:env#1{\relax\ifmmode\else\par\fi\:xhtml{\IgnorePar\EndP}%
-  \HCode{<center class="#1"><table class="#1"\Hnewline
-   border="0" cellpadding="0" cellspacing="15"><tr><td>}}
+  \HCode{<div class="center-#1"><table class="#1"\Hnewline
+   border="0" cellpadding="0" cellspacing="15"><tr><td>}
+   \Css{div.center-#1{text-align: center;}}
+ }
 \def\endm:env{\:xhtml{\IgnorePar\EndP}%
    \HCode{</td></tr></table></center>}\IgnorePar
    \ifmmode\else\par\fi}
@@ -1058,6 +1091,8 @@
 
 
 
+
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{fleqn}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1085,6 +1120,8 @@
 
 
 
+
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                 \ConfigureHinput{gauss}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1448,6 +1485,14 @@
 
 
 
+
+
+
+
+
+
+
+
 
 
 

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht	2018-12-06 01:23:15 UTC (rev 49329)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/html4.4ht	2018-12-06 02:12:43 UTC (rev 49330)
@@ -1,4 +1,4 @@
-% html4.4ht (2018-11-29-15:34), generated from tex4ht-html4.tex
+% html4.4ht (2018-12-05-18:11), generated from tex4ht-html4.tex
 % Copyright 2009-2018 TeX Users Group
 % Copyright 1997-2009 Eitan M. Gurari
 %
@@ -17,7 +17,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2018-11-29-15:34}
+\immediate\write-1{version 2018-12-05-18:11}
 
 \exit:ifnot{8859-6,% 
 CJK,% 
@@ -565,7 +565,8 @@
 }
 
 
-\newcommand\AddFontFace[4]{%
+% \newcommand\AddFontFace[4]{%
+\def\AddFontFace#1#2#3#4{%
 \Css{@font-face {
     font-family: #1;
     src: local("#2"),

Added: trunk/Master/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht	2018-12-06 02:12:43 UTC (rev 49330)
@@ -0,0 +1,533 @@
+% mathjax-latex-4ht.sty (2018-12-05-18:11), generated from tex4ht-mathjax.tex
+% Copyright 2018 TeX Users Group
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3c of this license or (at your option) any
+% later version. The latest version of this license is in
+%   http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions
+% of LaTeX version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainer of this work
+% is the TeX4ht Project <http://tug.org/tex4ht>.
+%
+% If you modify this program, changing the
+% version identification would be appreciated.
+\immediate\write-1{version 2018-12-05-18:11}
+
+\RequirePackage{etoolbox,expl3,environ}
+
+\ExplSyntaxOn
+\cs_new_protected:Npn \alteqtoks #1
+{
+  \tl_set:Nx \l_tmpa_tl {\detokenize{#1}}
+  % delete spaces before left brackets
+  \regex_replace_all:nnN { \x{20} \x{7B} } { \x{7B} } \l_tmpa_tl
+  % replace < > and & with xml entities
+  \regex_replace_all:nnN { \x{26} } { & } \l_tmpa_tl
+  \regex_replace_all:nnN { \x{3C} } { < } \l_tmpa_tl
+  \regex_replace_all:nnN { \x{3E} } { > } \l_tmpa_tl
+  \tl_set:Nx \l_tmpb_tl{ \l_tmpa_tl }
+  \HCode{\l_tmpb_tl}
+}
+\ExplSyntaxOff
+
+\long\def\AltlMath#1\){\expandafter\alteqtoks{\(#1\)}\)}
+\long\def\AltlDisplay#1\]{\alteqtoks{\[#1\]}\]}
+\long\def\AltMathOne#1${\alteqtoks{\(#1\)}$}
+
+\newcommand\VerbMathToks[2]{%
+  \alteqtoks{\begin{#2}
+    #1
+  \end{#2}}%
+}
+\newcommand\VerbMath[1]{%
+\ifcsdef{#1}{%
+  \RenewEnviron{#1}{%
+  \NoFonts\expandafter\VerbMathToks\expandafter{\BODY}{#1}\EndNoFonts%
+  }
+}{}%
+}
+\def\fixmathjaxtoc#1{\def#1{\detokenize{#1}}}
+
+\VerbMath{subarray}
+\VerbMath{smallmatrix}
+\VerbMath{matrix}
+\VerbMath{pmatrix}
+\VerbMath{bmatrix}
+\VerbMath{Bmatrix}
+\VerbMath{vmatrix}
+\VerbMath{Vmatrix}
+\VerbMath{cases}
+\VerbMath{subequations}
+\VerbMath{aligned}
+\VerbMath{alignedat}
+\VerbMath{gathered}
+\VerbMath{gather}
+\VerbMath{gather*}
+\VerbMath{alignat}
+\VerbMath{alignat*}
+\VerbMath{xalignat}
+\VerbMath{xalignat*}
+\VerbMath{xxalignat}
+\VerbMath{align}
+\VerbMath{align*}
+\VerbMath{flalign}
+\VerbMath{flalign*}
+\VerbMath{split}
+\VerbMath{multline}
+\VerbMath{multline*}
+\VerbMath{equation}
+\VerbMath{equation*}
+\VerbMath{math}
+\VerbMath{displaymath}
+\ConfigureEnv{multline}{}{}{}{}
+\ConfigureEnv{multline*}{}{}{}{}
+\fixmathjaxtoc\left
+\fixmathjaxtoc\right
+\fixmathjaxtoc\int
+\fixmathjaxtoc\,
+\fixmathjaxtoc\sin
+\fixmathjaxtoc\cos
+\fixmathjaxtoc\tan
+\fixmathjaxtoc\arcsin
+\fixmathjaxtoc\arccos
+\fixmathjaxtoc\arctan
+\fixmathjaxtoc\csc
+\fixmathjaxtoc\sec
+\fixmathjaxtoc\cot
+\fixmathjaxtoc\sinh
+\fixmathjaxtoc\cosh
+\fixmathjaxtoc\tanh
+\fixmathjaxtoc\coth
+\fixmathjaxtoc\log
+
+\endinput
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\endinput
+


Property changes on: trunk/Master/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property


More information about the tex-live-commits mailing list