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

michal_h21 at gnu.org.ua michal_h21 at gnu.org.ua
Mon Aug 26 12:58:30 CEST 2019


Author: michal_h21
Date: 2019-08-26 13:58:30 +0300 (Mon, 26 Aug 2019)
New Revision: 594

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-4ht.tex
   trunk/lit/tex4ht-mathml.tex
Log:
Added support for additional math space commands

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2019-08-20 14:13:36 UTC (rev 593)
+++ trunk/lit/ChangeLog	2019-08-26 10:58:30 UTC (rev 594)
@@ -1,3 +1,9 @@
+2019-08-26 Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-4ht.tex (latex.4ht),
+	tex4ht-mathml.tex (mathml.4ht): added support for different math space
+	commands.
+
 2019-08-20 Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-html4.tex (html4.4ht),

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2019-08-20 14:13:36 UTC (rev 593)
+++ trunk/lit/tex4ht-4ht.tex	2019-08-26 10:58:30 UTC (rev 594)
@@ -6587,6 +6587,7 @@
 \NewConfigure{qquad}{1}       \Configure{qquad}{\o:qquad:}
 >>>
 
+
 % \def\,{\mskip\thinmuskip}
 % \def\>{\mskip\medmuskip}
 % \def\;{\mskip\thickmuskip}
@@ -6596,7 +6597,21 @@
 %    \relax\ifmmode\mskip\thinmuskip\else\thinspace\fi
 % }
 
+We should try to support more math space commands. These definitions should
+keep the original meaning by default.
+
 \<latex math\><<<
+\def\:tempc{\csname a:>\endcsname} \HLet\>|=\:tempc
+\def\:tempc{\csname a:;\endcsname} \HLet\;|=\:tempc
+\def\:tempc{\csname a:!\endcsname} \HLet\!|=\:tempc
+\def\:tempc{\csname a::\endcsname} \HLet\:|=\:tempc
+\NewConfigure{>}{1} \Configure{>}{\csname o:>\endcsname}
+\NewConfigure{;}{1} \Configure{;}{\csname o:;\endcsname}
+\NewConfigure{!}{1} \Configure{!}{\csname o:!\endcsname}
+\NewConfigure{:}{1} \Configure{:}{\csname o::\endcsname}
+>>>
+
+\<latex math\><<<
 \def\:tempc{\relax\ifmmode\csname a:,\endcsname\else\thinspace\fi}
 \expandafter\HLet\csname , \endcsname=\:tempc
 \def\:tempc{\relax

Modified: trunk/lit/tex4ht-mathml.tex
===================================================================
--- trunk/lit/tex4ht-mathml.tex	2019-08-20 14:13:36 UTC (rev 593)
+++ trunk/lit/tex4ht-mathml.tex	2019-08-26 10:58:30 UTC (rev 594)
@@ -702,11 +702,15 @@
       |<vanilla mathml|>
   >>>
 
-     \<plain,latex mathml\><<<
+  I've calculated the space widths according to
+  \Link[https://chenfuture.wordpress.com/2008/03/22/math-spacing-and-length-units/]{}{}Math
+  Spacing and Length Units\EndLink\ blog post.
+
+\<plain,latex mathml\><<<
 \let\mathml:on|=\relax
 \Configure{ }
    {\ifmathml \ifmtext \space \else\Tg<\a:mathml mspace 
-    width="1em" \mml:class="nbsp" />\fi
+    width="0.33em" \mml:class="nbsp" />\fi
     \else \:nbsp\fi} 
 >>>
 
@@ -4055,7 +4059,15 @@
    {\HCode{<\a:mathml mspace width="2em" \mml:class="qquad"/>}}\fi
     \else \o:qquad: \fi}}
 \Configure{,}
-   {{\HCode{<\a:mathml mspace width="0em" \mml:class="thinspace"/>}}}
+   {{\HCode{<\a:mathml mspace width="0.17em" \mml:class="thinspace"/>}}}
+\Configure{:}
+   {{\HCode{<\a:mathml mspace width="0.22em" \mml:class="thinspace"/>}}}
+\Configure{;}
+   {{\HCode{<\a:mathml mspace width="0.28em" \mml:class="thickpace"/>}}}
+\Configure{>}
+   {{\HCode{<\a:mathml mspace width="0.30em" \mml:class="medspace"/>}}}
+\Configure{!}
+   {{\HCode{<\a:mathml mspace width="-0.17em" \mml:class="negthinspace"/>}}}
 >>>
 
 



More information about the tex4ht-commits mailing list