texlive[70719] Master/texmf-dist: <mi> for qopname operators, tex4ht

commits+karl at tug.org commits+karl at tug.org
Thu Mar 21 22:23:54 CET 2024


Revision: 70719
          https://tug.org/svn/texlive?view=revision&revision=70719
Author:   karl
Date:     2024-03-21 22:23:54 +0100 (Thu, 21 Mar 2024)
Log Message:
-----------
<mi> for qopname operators, tex4ht r1492; mathop* cleanup, tex4ht r1493; \a:mathml prefix for <mo>, tex4ht r1494; \log formatting, tex4ht r1495

Revision Links:
--------------
    https://tug.org/svn/texlive?view=revision&revision=1492
    https://tug.org/svn/texlive?view=revision&revision=1493
    https://tug.org/svn/texlive?view=revision&revision=1494
    https://tug.org/svn/texlive?view=revision&revision=1495

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/mathml.4ht

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2024-03-21 19:51:44 UTC (rev 70718)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2024-03-21 21:23:54 UTC (rev 70719)
@@ -1,3 +1,15 @@
+2024-03-21  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-mathml.tex (mathml.4ht): redefine \log and similar LaTeX
+	functions to provide a correct formatting.
+
+	* tex4ht-mathml.tex (mathml.4ht): added \a:mathml prefix to <mo>
+	tags in function applications.
+
+	* tex4ht-mathml.tex (mathml.4ht): use <mi> instead of <mtext> for
+	math operators configured in \Configure{qopname}, to get a correct
+	spacing in function application.
+
 2024-03-10  Karl Berry  <karl at freefriends.org>
 
 	* tex4ht-4ht.tex (multibib-hooks.4ht): version.

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathml.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathml.tex	2024-03-21 19:51:44 UTC (rev 70718)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-mathml.tex	2024-03-21 21:23:54 UTC (rev 70719)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-mathml.tex 1490 2024-03-08 11:45:26Z michal_h21 $$
+% $Id: tex4ht-mathml.tex 1495 2024-03-21 16:39:31Z michal_h21 $$
 % compile 3 times: latex tex4ht-mathltx
 %           or   xhlatex tex4ht-mathltx "html,3,sections+"
 %
@@ -422,6 +422,47 @@
 |<lim inf/sup|>
 >>>
 
+This should provide correct formatting for built-in log function. By default, it is printed
+in italic and without space that would separate it from the following element.
+
+\<mathml latex\><<<
+\def\:tempa#1#2{%
+  \def\:tempb{\mathop{\PauseMathClass%
+    \HCode{<\a:mathml mi \mml:class="loglike">} #2\HCode{</\a:mathml mi>%
+    <\a:mathml mo>&\#x2061;<!--FUNCTION APPLICATION--></\a:mathml mo>}\EndPauseMathClass%
+    }\nolimits
+  }
+  \HLet#1\:tempb
+  \MakeRobust#1
+}
+
+\:tempa\log{log}
+% it seems that the other functions work correctly, 
+% so we don't need to redefine them, but I will keep 
+% them here if we want to do that in the future.
+% \:tempa\lg{lg}
+% \:tempa\ln{ln}
+% \:tempa\sin{sin}
+% \:tempa\arcsin{arcsin}
+% \:tempa\sinh{sinh}
+% \:tempa\cos{cos}
+% \:tempa\arccos{arccos}
+% \:tempa\cosh{cosh}
+% \:tempa\tan{tan}
+% \:tempa\arctan{arctan}
+% \:tempa\tanh{tanh}
+% \:tempa\cot{cot}
+% \:tempa\coth{coth}
+% \:tempa\sec{sec}
+% \:tempa\csc{csc}
+% \:tempa\arg{arg}
+% \:tempa\ker{ker}
+% \:tempa\dim{dim}
+% \:tempa\hom{hom}
+% \:tempa\exp{exp}
+% \:tempa\deg{deg}
+>>>
+
 \<limit functionsNO\><<<
 \def\:tempb#1{%
   \def\:tempc##11->##2///{\if :##2:%
@@ -2500,8 +2541,8 @@
 \<configure mathml amsopn\><<<
 \Configure{qopname}
    {\Configure{mathop}{*}
-      {<\a:mathml mtext \mml:class="qopname">}
-  {</\a:mathml mtext><mo> &\#x2061;<!--FUNCTION APPLICATION--> </mo>}
+      {<\a:mathml mi \mml:class="qopname">}
+  {</\a:mathml mi><\a:mathml mo> &\#x2061;<!--FUNCTION APPLICATION--> </\a:mathml mo>}
       {}}
 >>>
 
@@ -3234,7 +3275,7 @@
 \<mathml plain,fontmath\><<<
 \Configure{MathClass}{0}{*}{<\a:mathml mi\Hnewline>}{</\a:mathml mi>}{}
 \Configure{MathClass}{1}{*}{<\a:mathml mi\Hnewline
-             \mml:class="MathClass-op">}{</\a:mathml mi><mo> &\#x2061;<!--FUNCTION APPLICATION--></mo>}{}
+             \mml:class="MathClass-op">}{</\a:mathml mi><\a:mathml mo> &\#x2061;<!--FUNCTION APPLICATION--></\a:mathml mo>}{}
 \Configure{MathClass}{2}{*}{<\a:mathml mo\Hnewline
              \mml:class="MathClass-bin" \a:mathml stretchy="false">}{</\a:mathml mo>}{}
 \Configure{MathClass}{3}{*}{<\a:mathml mo\Hnewline
@@ -3567,8 +3608,7 @@
 
 \<configure mathml latex\><<<
 \AtBeginDocument{%
-\Configure{mathop*}{*}{}{}                                                                                                                                                          
-   { \Configure{mathop}{*}{<mo>}{</mo>}{} }   
+\Configure{mathop*}{*}{}{}{\Configure{mathop}{*}{<\a:mathml mo>}{</\a:mathml mo>}{}}   
 }
 >>>
 

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/mathml.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/mathml.4ht	2024-03-21 19:51:44 UTC (rev 70718)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/mathml.4ht	2024-03-21 21:23:54 UTC (rev 70719)
@@ -1,4 +1,4 @@
-% mathml.4ht (2024-03-08-15:31), generated from tex4ht-mathml.tex
+% mathml.4ht (2024-03-21-13:48), generated from tex4ht-mathml.tex
 % Copyright 2009-2024 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 2024-03-08-15:31}
+\immediate\write-1{version 2024-03-21-13:48}
 
 \exit:ifnot{Preamble,% 
 accents,% 
@@ -532,6 +532,41 @@
    {\DisplayMathtrue}%
 }
   {\B:equation}{\C:equation}
+\def\:tempa#1#2{%
+  \def\:tempb{\mathop{\PauseMathClass%
+    \HCode{<\a:mathml mi \mml:class="loglike">} #2\HCode{</\a:mathml mi>%
+    <\a:mathml mo>&\#x2061;<!--FUNCTION APPLICATION--></\a:mathml mo>}\EndPauseMathClass%
+    }\nolimits
+  }
+  \HLet#1\:tempb
+  \MakeRobust#1
+}
+
+\:tempa\log{log}
+% it seems that the other functions work correctly,
+% so we don't need to redefine them, but I will keep
+% them here if we want to do that in the future.
+% \:tempa\lg{lg}
+% \:tempa\ln{ln}
+% \:tempa\sin{sin}
+% \:tempa\arcsin{arcsin}
+% \:tempa\sinh{sinh}
+% \:tempa\cos{cos}
+% \:tempa\arccos{arccos}
+% \:tempa\cosh{cosh}
+% \:tempa\tan{tan}
+% \:tempa\arctan{arctan}
+% \:tempa\tanh{tanh}
+% \:tempa\cot{cot}
+% \:tempa\coth{coth}
+% \:tempa\sec{sec}
+% \:tempa\csc{csc}
+% \:tempa\arg{arg}
+% \:tempa\ker{ker}
+% \:tempa\dim{dim}
+% \:tempa\hom{hom}
+% \:tempa\exp{exp}
+% \:tempa\deg{deg}
 \Configure{hspace}
   {\ifmathml\ifmtext\else \Tg<\a:mathml mspace width="\the\tmp:dim"/>\fi\fi}{}{ }
 \Configure{romannumeral}
@@ -1386,8 +1421,7 @@
 \:temp\Upsilon{03A5}
 \:temp\Omega{03A9}
 \AtBeginDocument{%
-\Configure{mathop*}{*}{}{}
-   { \Configure{mathop}{*}{<mo>}{</mo>}{} }
+\Configure{mathop*}{*}{}{}{\Configure{mathop}{*}{<\a:mathml mo>}{</\a:mathml mo>}{}}
 }
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1636,7 +1670,7 @@
    {}
 \Configure{MathClass}{0}{*}{<\a:mathml mi\Hnewline>}{</\a:mathml mi>}{}
 \Configure{MathClass}{1}{*}{<\a:mathml mi\Hnewline
-             \mml:class="MathClass-op">}{</\a:mathml mi><mo> &\#x2061;<!--FUNCTION APPLICATION--></mo>}{}
+             \mml:class="MathClass-op">}{</\a:mathml mi><\a:mathml mo> &\#x2061;<!--FUNCTION APPLICATION--></\a:mathml mo>}{}
 \Configure{MathClass}{2}{*}{<\a:mathml mo\Hnewline
              \mml:class="MathClass-bin" \a:mathml stretchy="false">}{</\a:mathml mo>}{}
 \Configure{MathClass}{3}{*}{<\a:mathml mo\Hnewline
@@ -2652,7 +2686,7 @@
    {}
 \Configure{MathClass}{0}{*}{<\a:mathml mi\Hnewline>}{</\a:mathml mi>}{}
 \Configure{MathClass}{1}{*}{<\a:mathml mi\Hnewline
-             \mml:class="MathClass-op">}{</\a:mathml mi><mo> &\#x2061;<!--FUNCTION APPLICATION--></mo>}{}
+             \mml:class="MathClass-op">}{</\a:mathml mi><\a:mathml mo> &\#x2061;<!--FUNCTION APPLICATION--></\a:mathml mo>}{}
 \Configure{MathClass}{2}{*}{<\a:mathml mo\Hnewline
              \mml:class="MathClass-bin" \a:mathml stretchy="false">}{</\a:mathml mo>}{}
 \Configure{MathClass}{3}{*}{<\a:mathml mo\Hnewline
@@ -3269,8 +3303,8 @@
 \HLet\injlim=\:tempc
 \Configure{qopname}
    {\Configure{mathop}{*}
-      {<\a:mathml mtext \mml:class="qopname">}
-  {</\a:mathml mtext><mo> &\#x2061;<!--FUNCTION APPLICATION--> </mo>}
+      {<\a:mathml mi \mml:class="qopname">}
+  {</\a:mathml mi><\a:mathml mo> &\#x2061;<!--FUNCTION APPLICATION--> </\a:mathml mo>}
       {}}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



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