[tex4ht-commits] [SCM] tex4ht updated: r1014 - trunk/lit
Michal Hoftich
INVALID.NOREPLY at gnu.org.ua
Tue Nov 23 17:46:25 CET 2021
Author: michal_h21
Date: 2021-11-23 16:46:25 +0000 (Tue, 23 Nov 2021)
New Revision: 1014
Modified:
trunk/lit/ChangeLog
trunk/lit/tex4ht-4ht.tex
Log:
protect redefinitions of \( and \)
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2021-11-23 14:57:55 UTC (rev 1013)
+++ trunk/lit/ChangeLog 2021-11-23 16:46:25 UTC (rev 1014)
@@ -3,6 +3,9 @@
* tex4ht-4ht.tex (tcolorbox.4ht): add destinations for \label to Tcolorbox
environments.
https://tex.stackexchange.com/a/623697/2891
+ * tex4ht-4ht.tex (latex.4ht): protect redefinitions of \( and \), so they
+ work correctly in sectioning commands with MathML.
+ https://github.com/michal-h21/make4ht/issues/52#issuecomment-976835368
2021-11-19 Michal Hoftich <michal.h21 at gmail.com>
Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex 2021-11-23 14:57:55 UTC (rev 1013)
+++ trunk/lit/tex4ht-4ht.tex 2021-11-23 16:46:25 UTC (rev 1014)
@@ -7487,8 +7487,8 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%55
\<latex,sty math del\><<<
- \def\({\leavevmode\st:math}
- \def\){\ed:math}
+ \protected\def\({\leavevmode\st:math}
+ \protected\def\){\ed:math}
\NewConfigure{()}[2]{\def\st:math{#1}\def\ed:math{#2}}
\def\[{\st:Math}
\def\]{\ed:Math}
@@ -7524,9 +7524,13 @@
>>>
\<protect (...) math\><<<
-\pend:def\({\bgroup\let\a:mth|=\empty
- \let\b:mth|=\empty \let\c:mth|=\empty }%
-\append:def\){\egroup}%
+\let\orig:smath\(
+\let\orig:emath\)
+\protected\def\:tempa{\bgroup\let\a:mth\empty
+ \let\b:mth\empty \let\c:mth\empty\orig:smath}
+\let\(\:tempa
+\protected\def\:tempa{\orig:emath\egroup}
+\let\)\:tempa
>>>
\<protect [...] math\><<<
More information about the tex4ht-commits
mailing list.