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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Tue Oct 25 13:32:48 CEST 2022


Author: michal_h21
Date: 2022-10-25 11:32:47 +0000 (Tue, 25 Oct 2022)
New Revision: 1221

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-mathml.tex
Log:
fixed support for hline inside array in mathml

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2022-10-23 18:52:19 UTC (rev 1220)
+++ trunk/lit/ChangeLog	2022-10-25 11:32:47 UTC (rev 1221)
@@ -1,3 +1,9 @@
+2022-10-25  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-mathml.tex (mathml.4ht, html-mml.4ht): fixed support for
+	\hline inside the array environment.
+	https://tex.stackexchange.com/a/662845/2891
+
 2022-10-23  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-html4.tex (html4.4ht): added the Gin-percent option. It

Modified: trunk/lit/tex4ht-mathml.tex
===================================================================
--- trunk/lit/tex4ht-mathml.tex	2022-10-23 18:52:19 UTC (rev 1220)
+++ trunk/lit/tex4ht-mathml.tex	2022-10-25 11:32:47 UTC (rev 1221)
@@ -1173,7 +1173,7 @@
 \Configure{array} 
    {\halignTB{array}}
    {\ifvmode \IgnorePar\fi |<insert Clr|>\Tg</\a:mathml mtable>}
-   {\Tg<\a:mathml mtr>}{\Tg</\a:mathml mtr>}
+   {\Tg<\a:mathml mtr \mml:class="array-row">}{\Tg</\a:mathml mtr>}
    {|<mtd array|>}
    {\Tg</\a:mathml mtd>}
 \ConfigureEnv{array}
@@ -1205,7 +1205,7 @@
 
 
 \<mtd array\><<<
-\HCode{<\a:mathml mtd\Hnewline \mml:class="array" 
+\HCode{<\a:mathml mtd\Hnewline \mml:class="array-td" 
    \ifnum 1<\HMultispan columnspan="\HMultispan"\fi}%
    \halignTD    \HCode{>}%
 >>>
@@ -1232,15 +1232,15 @@
 \def\:MM{m}
 \def\mathml:hborder{%
 \Configure{HBorder}
-   {<\a:mathml mtr\Hnewline \mml:class="hline">} 
+   {<\a:mathml mtr\Hnewline \mml:class="array-hline">} 
    {|<mml hline|>}
    {</\a:mathml mtr>}
-   {<\a:mathml mtr\Hnewline \mml:class="cline">}
+   {<\a:mathml mtr\Hnewline \mml:class="array-cline">}
    {<\a:mathml mtd></\a:mathml mtd>}
    {|<mml hline|>}
    {</\a:mathml mtr>}
    {<\a:mathml mtr\Hnewline
-         \mml:class="vspace" style="font-size:\HBorderspace">}
+         \mml:class="array-vspace" style="font-size:\HBorderspace">}
    {<\a:mathml mtd\Hnewline></\a:mathml mtd>}
    {</\a:mathml mtr>}
   }
@@ -1252,18 +1252,18 @@
 \def\:MM{\ifmathml \a:mathml m\fi}
 \Configure{HBorder}
    {<\:MM tr\Hnewline 
-       \ifmathml \expandafter\mml:class\else class\fi="hline">} 
+       \ifmathml \expandafter\mml:class\else class\fi="array-hline">} 
    {\ifmathml|<mml hline|>\else
-            <td><hr\xml:empty></td>\fi} 
+            <td></td>\fi} 
    {</\:MM tr>}
    {<\:MM tr\Hnewline
-       \ifmathml \expandafter\mml:class\else class\fi ="cline">}
+       \ifmathml \expandafter\mml:class\else class\fi ="array-cline">}
    {<\:MM td></\:MM td>}
    {\ifmathml|<mml hline|>\else
-            <td><hr\xml:empty></td>\fi}
+            <td></td>\fi}
    {</\:MM tr>}
    {<\:MM tr\Hnewline
-         \ifmathml \expandafter\mml:class\else  class\fi="vspace"
+         \ifmathml \expandafter\mml:class\else  class\fi="array-vspace"
          style="font-size:\HBorderspace">}
    {<\:MM td\Hnewline>\ifmathml\else\string&\#x00A0;\fi
       </\:MM td>}
@@ -1286,16 +1286,19 @@
                \HCode{</\:MT td>}|<td recall EndP|>}
 >>>
 
+It seems that Firefox doesn't support MathML styling
+using element names, but classes works. We need to hide
+rows produced by hline.
 
 \<configure html-mml latex\><<<
-\Css{mtr.hline mtd{ 
+\Css{.array-hline,.array-cline{ 
   border-bottom:black solid 1px;  
-  padding-top:2px; 
-  padding-bottom:0em; 
+  height:0px;
 }} 
-\Css{mtr.hline mtd mo{ 
+\Css{.hline-mtd{ 
   display:none 
 }}
+\Css{.array-hline + .array-row:last-child{display:none;}}
 >>>
 
 \<td save EndP\><<<
@@ -1308,7 +1311,7 @@
 
 
 \<mml hline\><<<
-<\a:mathml mtd><mo> \string&\#x0332; </mo></\a:mathml mtd>
+<\a:mathml mtd \mml:class="hline-mtd"></\a:mathml mtd>
 >>>
 
 



More information about the tex4ht-commits mailing list.