texlive[73944] Master/texmf-dist: mathtools arrows in mathml, tex4ht

commits+karl at tug.org commits+karl at tug.org
Wed Feb 12 23:13:02 CET 2025


Revision: 73944
          https://tug.org/svn/texlive?view=revision&revision=73944
Author:   karl
Date:     2025-02-12 23:13:01 +0100 (Wed, 12 Feb 2025)
Log Message:
-----------
mathtools arrows in mathml, tex4ht r1639

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

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

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2025-02-12 21:33:05 UTC (rev 73943)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2025-02-12 22:13:01 UTC (rev 73944)
@@ -1,3 +1,12 @@
+2025-02-12  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-mathml.tex (mathml.4ht): fixed Mathtools arrows in MathML.
+	https://tex.stackexchange.com/q/736623/2891
+
+2025-02-09  Karl Berry  <karl at freefriends.org>
+
+	* tex4h5-options.tex (tex4ht.4ht): copyright 2025.
+
 2025-02-06  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-4ht.tex (scrbook.4ht, scrartcl.4ht, scrreprt.4ht): remove

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathml.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathml.tex	2025-02-12 21:33:05 UTC (rev 73943)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathml.tex	2025-02-12 22:13:01 UTC (rev 73944)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-mathml.tex 1626 2025-01-09 21:25:52Z karl $$
+% $Id: tex4ht-mathml.tex 1639 2025-02-12 15:02:29Z michal_h21 $$
 % compile 3 times: latex tex4ht-mathltx
 %           or   xhlatex tex4ht-mathltx "html,3,sections+"
 %
@@ -2843,6 +2843,42 @@
     \HCode{</\a:mathml mtd>}}
 >>>
 
+Fix MathML arrows with MathTools.
+
+\<configure mathml mathtools\><<<
+% support bidirectional harpoons
+\def\:leftrightharpoons{\HCode{<\a:mathml mo stretchy="true">}\PauseMathClass\x:unicode{21CC}\EndPauseMathClass\HCode{</\a:mathml mo>}}
+\def\:righleftharpoons{\HCode{<\a:mathml mo stretchy="true">}\PauseMathClass\x:unicode{21CB}\EndPauseMathClass\HCode{</\a:mathml mo>}}
+
+\providecommand*\:xleftrightharpoons[2][]{%
+\ext at arrow 3095\:leftrightharpoons{#1}{#2}}
+
+\providecommand*\:xrightleftharpoons[2][]{%
+\ext at arrow 3095\:leftrightharpoons{#1}{#2}}
+
+\HLet\xleftrightharpoons\:xleftrightharpoons
+\HLet\xrightleftharpoons\:xrightleftharpoons
+
+% correctly place text under and over arrows
+\def\:tempa#1#2#3#4#5#6#7{%
+  \bgroup%
+  \def\relbar{}% remove relbar in arrow fills
+  \def\arrowfill@##1##2##3##4{##1##2##3##4}% remove arrowfill@, to prevent errors
+  \@ifempty{#7}{%
+    \HCode{<\a:mathml munder><\a:mathml mrow><\a:mathml mo stretchy="true">}\PauseMathClass#5{}\EndPauseMathClass\HCode{</\a:mathml mo></\a:mathml mrow><\a:mathml mrow>}#6\HCode{</\a:mathml mrow></\a:mathml munder>}%
+  }{%
+    \@ifempty{#6}{%
+      \HCode{<\a:mathml mover><\a:mathml mrow><\a:mathml mo stretchy="true">}\PauseMathClass#5{}\EndPauseMathClass\HCode{</\a:mathml mo></\a:mathml mrow><\a:mathml mrow>}#7\HCode{</\a:mathml mrow></\a:mathml mover>}%
+    }{%
+      \HCode{<\a:mathml munderover><\a:mathml mrow><\a:mathml mo stretchy="true">}\PauseMathClass#5{}\EndPauseMathClass\HCode{</\a:mathml mo></\a:mathml mrow><\a:mathml mrow>}#6\HCode{</\a:mathml mrow><\a:mathml mrow>}#7\HCode{</\a:mathml mrow></\a:mathml munderover>}%
+    }%
+  }%
+  \egroup
+}
+
+\HLet\ext at arrow\:tempa
+>>>
+
 %%%%%%%%%%%%%%%%%%
 \section{Gaus}
 %%%%%%%%%%%%%%%%%%

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-options.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-options.tex	2025-02-12 21:33:05 UTC (rev 73943)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-options.tex	2025-02-12 22:13:01 UTC (rev 73944)
@@ -1,7 +1,7 @@
-% $Id: tex4ht-options.tex 1436 2024-01-10 22:44:00Z karl $
+% $Id: tex4ht-options.tex 1638 2025-02-09 16:05:28Z karl $
 % latex tex4ht-options   or    xhlatex tex4ht-options
 %
-% Copyright 2009-2024 TeX Users Group
+% Copyright 2009-2025 TeX Users Group
 % Copyright 2000-2009 Eitan M. Gurari
 % Released under LPPL 1.3c+.
 % See tex4ht-cpright.tex for license text.
@@ -49,7 +49,7 @@
   \string:RestoreCatcodes\endcsname{\catcode`\%|=\the
   \catcode`\%}\catcode`\%|=14\fi
 % tex4ht.4ht (|version), generated from |jobname.tex
-% Copyright 2009-2024 TeX Users Group
+% Copyright 2009-2025 TeX Users Group
 % Copyright |CopyYear.1997. Eitan M. Gurari
 |<TeX4ht copywrite|>
 |<save catcodes|>

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/mathml.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/mathml.4ht	2025-02-12 21:33:05 UTC (rev 73943)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/mathml.4ht	2025-02-12 22:13:01 UTC (rev 73944)
@@ -1,4 +1,4 @@
-% mathml.4ht (2025-01-09-13:26), generated from tex4ht-mathml.tex
+% mathml.4ht (2025-02-12-14:12), 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-02-12-14:12}
 
 \exit:ifnot{Preamble,% 
 accents,% 
@@ -4023,7 +4023,38 @@
        \HCode{</\a:mathml mtext>}%
     \fi
     \HCode{</\a:mathml mtd>}}
+% support bidirectional harpoons
+\def\:leftrightharpoons{\HCode{<\a:mathml mo stretchy="true">}\PauseMathClass\x:unicode{21CC}\EndPauseMathClass\HCode{</\a:mathml mo>}}
+\def\:righleftharpoons{\HCode{<\a:mathml mo stretchy="true">}\PauseMathClass\x:unicode{21CB}\EndPauseMathClass\HCode{</\a:mathml mo>}}
 
+\providecommand*\:xleftrightharpoons[2][]{%
+\ext at arrow 3095\:leftrightharpoons{#1}{#2}}
+
+\providecommand*\:xrightleftharpoons[2][]{%
+\ext at arrow 3095\:leftrightharpoons{#1}{#2}}
+
+\HLet\xleftrightharpoons\:xleftrightharpoons
+\HLet\xrightleftharpoons\:xrightleftharpoons
+
+% correctly place text under and over arrows
+\def\:tempa#1#2#3#4#5#6#7{%
+  \bgroup%
+  \def\relbar{}% remove relbar in arrow fills
+  \def\arrowfill@##1##2##3##4{##1##2##3##4}% remove arrowfill@, to prevent errors
+  \@ifempty{#7}{%
+    \HCode{<\a:mathml munder><\a:mathml mrow><\a:mathml mo stretchy="true">}\PauseMathClass#5{}\EndPauseMathClass\HCode{</\a:mathml mo></\a:mathml mrow><\a:mathml mrow>}#6\HCode{</\a:mathml mrow></\a:mathml munder>}%
+  }{%
+    \@ifempty{#6}{%
+      \HCode{<\a:mathml mover><\a:mathml mrow><\a:mathml mo stretchy="true">}\PauseMathClass#5{}\EndPauseMathClass\HCode{</\a:mathml mo></\a:mathml mrow><\a:mathml mrow>}#7\HCode{</\a:mathml mrow></\a:mathml mover>}%
+    }{%
+      \HCode{<\a:mathml munderover><\a:mathml mrow><\a:mathml mo stretchy="true">}\PauseMathClass#5{}\EndPauseMathClass\HCode{</\a:mathml mo></\a:mathml mrow><\a:mathml mrow>}#6\HCode{</\a:mathml mrow><\a:mathml mrow>}#7\HCode{</\a:mathml mrow></\a:mathml munderover>}%
+    }%
+  }%
+  \egroup
+}
+
+\HLet\ext at arrow\:tempa
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   
 \endinput\empty\empty\empty\empty\empty\empty

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/tex4ht.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/tex4ht.4ht	2025-02-12 21:33:05 UTC (rev 73943)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/tex4ht.4ht	2025-02-12 22:13:01 UTC (rev 73944)
@@ -1,8 +1,8 @@
 \ifnum\the\catcode`\%=14\else \expandafter\edef\csname
   \string:RestoreCatcodes\endcsname{\catcode`\%\the
   \catcode`\%}\catcode`\%14\fi
-% tex4ht.4ht (2025-02-03-13:12), generated from tex4ht-options.tex
-% Copyright 2009-2024 TeX Users Group
+% tex4ht.4ht (2025-02-09-08:05), generated from tex4ht-options.tex
+% Copyright 2009-2025 TeX Users Group
 % Copyright 1997-2009 Eitan M. Gurari
 %
 % This work may be distributed and/or modified under the
@@ -20,7 +20,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2025-02-03-13:12}
+\immediate\write-1{version 2025-02-09-08:05}
 
 \expandafter\edef\csname :RestoreCatcodes\endcsname{%
    \expandafter\ifx \csname :RestoreCatcodes\endcsname\relax\else



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