texlive[74887] Master/texmf-dist: \mathopen fix in amsmath, tex4ht

commits+karl at tug.org commits+karl at tug.org
Tue Apr 8 22:42:35 CEST 2025


Revision: 74887
          https://tug.org/svn/texlive?view=revision&revision=74887
Author:   karl
Date:     2025-04-08 22:42:34 +0200 (Tue, 08 Apr 2025)
Log Message:
-----------
\mathopen fix in amsmath, tex4ht r1663

Revision Links:
--------------
    https://tug.org/svn/texlive?view=revision&revision=1663

Modified Paths:
--------------
    trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
    trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathml.tex
    trunk/Master/texmf-dist/tex/generic/tex4ht/html-mml.4ht
    trunk/Master/texmf-dist/tex/generic/tex4ht/mathml.4ht

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2025-04-08 20:17:45 UTC (rev 74886)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2025-04-08 20:42:34 UTC (rev 74887)
@@ -1,3 +1,15 @@
+2025-04-08  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-mathml.tex (mathml.4ht, html-mml.4ht): patch \mathopen in
+	Amsmath equations, to avoid need for the patch in the equation
+	configuration.
+	https://tex.stackexchange.com/a/740412/2891
+
+2025-03-30  Karl Berry  <karl at freefriends.org>
+
+	* tex4ht-ooffice.tex: replace | in comment (gets undefined
+	control sequence \ddd) with workaround $\vert$.
+
 2025-03-28  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-ooffice.tex (ooffice.4ht): fixed support for internal ODT

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathml.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathml.tex	2025-04-08 20:17:45 UTC (rev 74886)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathml.tex	2025-04-08 20:42:34 UTC (rev 74887)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-mathml.tex 1651 2025-02-26 11:32:51Z michal_h21 $$
+% $Id: tex4ht-mathml.tex 1663 2025-04-08 14:28:07Z michal_h21 $$
 % compile 3 times: latex tex4ht-mathltx
 %           or   xhlatex tex4ht-mathltx "html,3,sections+"
 %
@@ -99,7 +99,14 @@
 \Css{table.equation-star { width:100\%; }   }
 >>>
 
+Amsmath uses empty mathopen at the beginning of an equation, and it discards some 
+tokens. This results in missing markup for subsequent numbers and characters.
 
+\<amsmath mathml\><<<
+|<alt mathopen for eq|>
+% fix \mathopen inside equation
+\Configure{@begin}{equation}{|<mathopen in equation|>}
+>>>
 
 \<amsmath html-mml pre 2000\><<<
 % pre 2000
@@ -150,14 +157,11 @@
 
 
 \<amsmath html-mml july 2000\><<<
-% and here it should be
-|<alt mathopen for eq|>
 \Configure{equation}
   {\ifvmode \IgnorePar\fi\EndP
    \HCode{<table class="equation"><tr><td>}%
    |<amsmath equation july 2000|>%
    |<math display in equation|>%
-   |<mathopen in equation|>
   }
   {\ifvmode \IgnorePar\fi\EndP
    \HCode{</td><td class="eq-no">}%

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/html-mml.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/html-mml.4ht	2025-04-08 20:17:45 UTC (rev 74886)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/html-mml.4ht	2025-04-08 20:42:34 UTC (rev 74887)
@@ -1,4 +1,4 @@
-% html-mml.4ht (2025-01-09-13:26), generated from tex4ht-mathml.tex
+% html-mml.4ht (2025-04-08-13:29), generated from tex4ht-mathml.tex
 % Copyright 2009-2025 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 2025-01-09-13:26}
+\immediate\write-1{version 2025-04-08-13:29}
 
 \exit:ifnot{amsmath,% 
 array,% 
@@ -719,10 +719,7 @@
 
    \fi
 \else
-   % and here it should be
-\def\eq:mathopen#1{\ifx\relax#1\relax\else\a:mathopen\fi\o:mathopen:{#1}}
-
-\Configure{equation}
+   \Configure{equation}
   {\ifvmode \IgnorePar\fi\EndP
    \HCode{<table class="equation"><tr><td>}%
    \Configure{gather}
@@ -751,8 +748,6 @@
    {\EndDviMath\EndP}
    {\DisplayMathtrue}%
 %
-   \let\mathopen\eq:mathopen%
-
   }
   {\ifvmode \IgnorePar\fi\EndP
    \HCode{</td><td class="eq-no">}%

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/mathml.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/mathml.4ht	2025-04-08 20:17:45 UTC (rev 74886)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/mathml.4ht	2025-04-08 20:42:34 UTC (rev 74887)
@@ -1,4 +1,4 @@
-% mathml.4ht (2025-02-26-14:10), generated from tex4ht-mathml.tex
+% mathml.4ht (2025-04-08-13:29), generated from tex4ht-mathml.tex
 % Copyright 2009-2025 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 2025-02-26-14:10}
+\immediate\write-1{version 2025-04-08-13:29}
 
 \exit:ifnot{Preamble,% 
 accents,% 
@@ -1844,6 +1844,11 @@
   }{}{}
 \Css{.equation-star td{text-align:center; vertical-align:middle; }}
 \Css{table.equation-star { width:100\%; }   }
+\def\eq:mathopen#1{\ifx\relax#1\relax\else\a:mathopen\fi\o:mathopen:{#1}}
+
+% fix \mathopen inside equation
+\Configure{@begin}{equation}{\let\mathopen\eq:mathopen%
+}
 \Configure{above}
    {\Send{GROUP}{0}{<\a:mathml mfrac
                       linethickness="\the\tmp:dim"><\a:mathml mrow>}%



More information about the tex-live-commits mailing list.