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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Thu Mar 21 17:39:31 CET 2024


Author: michal_h21
Date: 2024-03-21 16:39:31 +0000 (Thu, 21 Mar 2024)
New Revision: 1495

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-mathml.tex
Log:
fixed formatting of \log in LaTeX

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2024-03-21 15:54:41 UTC (rev 1494)
+++ trunk/lit/ChangeLog	2024-03-21 16:39:31 UTC (rev 1495)
@@ -1,5 +1,8 @@
 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.
 

Modified: trunk/lit/tex4ht-mathml.tex
===================================================================
--- trunk/lit/tex4ht-mathml.tex	2024-03-21 15:54:41 UTC (rev 1494)
+++ trunk/lit/tex4ht-mathml.tex	2024-03-21 16:39:31 UTC (rev 1495)
@@ -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:%



More information about the tex4ht-commits mailing list.