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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Tue Jul 25 16:28:00 CEST 2023


Author: michal_h21
Date: 2023-07-25 14:28:00 +0000 (Tue, 25 Jul 2023)
New Revision: 1349

Modified:
   trunk/lit/ChangeLog
   trunk/lit/mktex4ht-cnf.tex
   trunk/lit/tex4ht-4ht.tex
Log:
Fixed commands declared using \DeclarePairedDelimiters

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2023-07-25 14:18:41 UTC (rev 1348)
+++ trunk/lit/ChangeLog	2023-07-25 14:28:00 UTC (rev 1349)
@@ -1,5 +1,9 @@
 2023-07-25  Michal Hoftich  <michal.h21 at gmail.com>
 
+	* tex4ht-4ht.tex (usepackage.4ht, mathtools-hooks.4ht): fixed
+	commands declared by \DeclarePairedDelimiter with MathML.
+	https://github.com/michal-h21/make4ht/issues/126
+
 	* tex4ht-4ht.tex (listings.4ht): fixed captions in inputed listings.
 	https://tex.stackexchange.com/a/691965/2891
 

Modified: trunk/lit/mktex4ht-cnf.tex
===================================================================
--- trunk/lit/mktex4ht-cnf.tex	2023-07-25 14:18:41 UTC (rev 1348)
+++ trunk/lit/mktex4ht-cnf.tex	2023-07-25 14:28:00 UTC (rev 1349)
@@ -136,6 +136,7 @@
 \AddFile{5}{amstex1}
 \AddFile{9}{braket}
 \AddFile{9}{mathtools}
+\AddFile{9}{mathtools-hooks}
 \AddFile{9}{llncs}
 \AddFile{9}{llncs-a}
 \AddFile{9}{lncse}

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2023-07-25 14:18:41 UTC (rev 1348)
+++ trunk/lit/tex4ht-4ht.tex	2023-07-25 14:28:00 UTC (rev 1349)
@@ -22080,6 +22080,45 @@
 \NewConfigure{dcases*}{6}
 >>>
 
+\<add to usepackage\><<<
+\Configure{PackageHooks}{mathtools.sty}{mathtools-hooks.4ht}
+>>>
+
+\<mathtools-hooks.4ht\><<<
+% mathtools-hooks.4ht, generated from |jobname.tex
+% Copyright 2023 TeX Users Group
+|<TeX4ht license text|>
+|<mathtools inner wrapper|>
+>>> 
+\AddFile{9}{mathtools-hooks}
+
+
+This should prevent compilation errors with commands declared using \''\DeclarePairedDelimiter' and MathML. 
+We need to patch the command at the moment when it is declared, so it must be available
+already in the preamble. This is why we use early hooks.
+
+\<mathtools inner wrapper\><<<
+\ExplSyntaxOn
+\:AtEndOfPackage{
+\renewcommand\MT_delim_default_inner_wrappers:n [1]{
+   \@namedef{MT_delim_\MH_cs_to_str:N #1 _star_wrapper:nnn}##1##2##3{
+      \ifx\EndPicture\undefined
+      \bgroup ##1 ##2  ##3\egroup
+      \else
+      \mathopen{}\mathclose\bgroup ##1 ##2  \aftergroup\egroup ##3
+      \fi
+    }
+    \@namedef{MT_delim_\MH_cs_to_str:N #1 _nostarscaled_wrapper:nnn}##1##2##3{
+      \mathopen{##1}##2\mathclose{##3}
+    }
+    \@namedef{MT_delim_\MH_cs_to_str:N #1 _nostarnonscaled_wrapper:nnn}##1##2##3{
+      \mathopen##1##2\mathclose##3
+    }
+  }
+}
+\ExplSyntaxOff
+>>>
+
 %%%%%%%%%%%%%%%%%%%%%%
 \Chapter{Other}
 %%%%%%%%%%%%%%%%%%%%%%



More information about the tex4ht-commits mailing list.