diff options
Diffstat (limited to 'support/TeX4ht/source/tex4ht-4ht.tex')
-rw-r--r-- | support/TeX4ht/source/tex4ht-4ht.tex | 67 |
1 files changed, 55 insertions, 12 deletions
diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex index 23b2e60f1e..6665307bad 100644 --- a/support/TeX4ht/source/tex4ht-4ht.tex +++ b/support/TeX4ht/source/tex4ht-4ht.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-4ht.tex 1618 2025-01-05 16:19:50Z karl $ +% $Id: tex4ht-4ht.tex 1622 2025-01-08 15:24:04Z michal_h21 $ % tex tex4ht-4ht or ht tex tex4ht-4ht % % Copyright 2009-2025 TeX Users Group @@ -21916,28 +21916,61 @@ Without the \''\HRestore\noalign' we get infinite loop. Where? Why? \RecallMkHalignConfig \restorecolumn@ \egroup \b:start@aligned} \HLet\endaligned|=\:tempc +\def\reg:aligned{\reg:start@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@testopt - \futurelet\:temp\aligned:a} -\def\aligned:a{\ifx [\:temp \expandafter\aligned:b - \else \def\:temp{\aligned:b[c]}\expandafter\:temp \fi} + \aligned:a} + \providecommand\aligned:a[1][c]{\aligned:b[#1]} \def\aligned:b[#1]{% \al:gned{aligned}{#1}\m@ne} \HLet\aligned|=\:temp -\def\reg:aligned{\reg:start@aligned} -\NewConfigure{aligned}{6} >>> + +This report and fix comes from Linas Stonys: + \<equations of amsmath.sty\><<< -\def\:temp{\futurelet\:temp\alignedat:a} -\def\alignedat:a{\ifx [\:temp \expandafter\alignedat:b - \else \def\:temp{\alignedat:b[c]}\expandafter\:temp \fi} -\def\alignedat:b[#1]{% +\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@testopt + \expandafter\al:gned\expandafter{\@currenvir}{#1}} +\HLet\start@aligned\:temp + +>>> + + +\<equations of amsmath.sty\><<< +\def\reg:alignedat{\reg:start@aligned} +\NewConfigure{alignedat}{6} +>>> + +This code is superseded by start@aligned code above. + +\<alignedat do not use\><<< +\def\:temp{\alignedat:a} +\providecommand\alignedat:a[1][c]{\alignedat:b[#1]} +\def\alignedat:b[#1]#2{% \let\@testopt\alignsafe@testopt \al:gned{alignedat}{#1}\m@ne} \HLet\alignedat|=\:temp -\def\reg:alignedat{\reg:start@aligned} -\NewConfigure{alignedat}{6} >>> % \def\:tempc{\crcr\EndMkHalign @@ -21949,6 +21982,16 @@ Without the \''\HRestore\noalign' we get infinite loop. Where? Why? \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@ifnextchar[{\gathered:a}{\gathered:a[c]}% + } +\HLet\gathered\:temp +>>> + \<equations of amsmath.sty\><<< \catcode`\#|=13 \catcode`\!|=6 \def\reg:gathered[!1]{% |