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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Wed Jan 8 16:24:04 CET 2025


Author: michal_h21
Date: 2025-01-08 15:24:04 +0000 (Wed, 08 Jan 2025)
New Revision: 1622

Modified:
   trunk/lit/tex4ht-4ht.tex
Log:
another fix for aligned

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2025-01-08 11:21:23 UTC (rev 1621)
+++ trunk/lit/tex4ht-4ht.tex	2025-01-08 15:24:04 UTC (rev 1622)
@@ -21916,6 +21916,14 @@
     \RecallMkHalignConfig \restorecolumn@
     \egroup  \b:start at aligned}
 \HLet\endaligned|=\:tempc
+\def\reg:aligned{\reg:start at aligned}
+\NewConfigure{aligned}{6}
+>>>
+
+This is the original code for the aligned environment. It had issues with empty
+first cell, resulting in compilaton error.
+
+\<aligned do not use\><<<
 \def\:temp{%
   \let\@testopt\alignsafe at testopt 
   \aligned:a}
@@ -21923,11 +21931,40 @@
 \def\aligned:b[#1]{%   
    \al:gned{aligned}{#1}\m at ne}
 \HLet\aligned|=\:temp
-\def\reg:aligned{\reg:start at aligned}
-\NewConfigure{aligned}{6}
 >>>
 
+
+This report and fix comes from Linas Stonys: 
+
 \<equations of amsmath.sty\><<<
+\def\Hlcr{z}
+%% \Hlcr macro stores math environment optional possitionig argument
+%% and can be used for custom setup. For example:
+%%   \Configure{gathered}
+%%      {\HCode{<\a:mathml mtable\space displaystyle="true" 
+%%         \mml:class="gathered"%
+%%         \if t\Hlcr\space\a:mathml align="axis 1"\fi%
+%%         \if b\Hlcr\space\a:mathml align="axis -1"\fi%
+%%         >}}
+%%      {}...
+            
+\def\:temp#1{%
+  \def\Hlcr{#1}% 
+  \let\@testopt\alignsafe at testopt
+  \expandafter\al:gned\expandafter{\@currenvir}{#1}}
+\HLet\start at aligned\:temp
+
+>>>
+
+
+\<equations of amsmath.sty\><<<
+\def\reg:alignedat{\reg:start at aligned}
+\NewConfigure{alignedat}{6}
+>>>
+
+This code is superseded by start at aligned code above.
+
+\<alignedat do not use\><<<
 \def\:temp{\alignedat:a}
 \providecommand\alignedat:a[1][c]{\alignedat:b[#1]}
 \def\alignedat:b[#1]#2{%
@@ -21934,8 +21971,6 @@
     \let\@testopt\alignsafe at testopt 
     \al:gned{alignedat}{#1}\m at ne}
 \HLet\alignedat|=\:temp
-\def\reg:alignedat{\reg:start at aligned}
-\NewConfigure{alignedat}{6}
 >>>
 
 % \def\:tempc{\crcr\EndMkHalign 
@@ -21947,7 +21982,17 @@
 \SubSection{Gathered}
 %%%%%%%%%%%%%
 
+This code comes from Linas Stonys.
+
 \<equations of amsmath.sty\><<<
+\def\gathered:a[#1]{\def\Hlcr{#1}\pic:MkHalign{gathered}[#1]}
+\def\:temp{%
+  \kernel at ifnextchar[{\gathered:a}{\gathered:a[c]}%
+  }
+\HLet\gathered\:temp
+>>>
+
+\<equations of amsmath.sty\><<<
                                     \catcode`\#|=13 \catcode`\!|=6    
 \def\reg:gathered[!1]{%
   \RIfM@\else 



More information about the tex4ht-commits mailing list.