texlive[67731] Master/texmf-dist: \DeclarePairedDelimited fix, tex4ht

commits+karl at tug.org commits+karl at tug.org
Tue Jul 25 21:51:24 CEST 2023


Revision: 67731
          http://tug.org/svn/texlive?view=revision&revision=67731
Author:   karl
Date:     2023-07-25 21:51:24 +0200 (Tue, 25 Jul 2023)
Log Message:
-----------
\DeclarePairedDelimited fix, tex4ht r1349; captions for input listings, tex4ht r1348

Revision Links:
--------------
    http://tug.org/svn/texlive?view=revision&revision=1349
    http://tug.org/svn/texlive?view=revision&revision=1348

Modified Paths:
--------------
    trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
    trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
    trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
    trunk/Master/texmf-dist/tex/generic/tex4ht/listings.4ht
    trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/generic/tex4ht/mathtools-hooks.4ht

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2023-07-25 19:34:11 UTC (rev 67730)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/ChangeLog	2023-07-25 19:51:24 UTC (rev 67731)
@@ -1,3 +1,12 @@
+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
+
 2023-07-11  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-mathml.tex (mathml.4ht): fixed \tilde accent in MathML.

Modified: trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex	2023-07-25 19:34:11 UTC (rev 67730)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex	2023-07-25 19:51:24 UTC (rev 67731)
@@ -1,4 +1,4 @@
-% $Id: mktex4ht-cnf.tex 1325 2023-04-21 13:23:46Z michal_h21 $
+% $Id: mktex4ht-cnf.tex 1349 2023-07-25 14:28:00Z michal_h21 $
 % Manually-maintained file, listing *.4ht files created by tex4ht-4ht.tex.
 % Read by tex4ht-cond4ht.
 %
@@ -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/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
===================================================================
--- trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex	2023-07-25 19:34:11 UTC (rev 67730)
+++ trunk/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex	2023-07-25 19:51:24 UTC (rev 67731)
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1339 2023-06-11 15:01:09Z karl $
+% $Id: tex4ht-4ht.tex 1349 2023-07-25 14:28:00Z michal_h21 $
 % tex tex4ht-4ht   or   ht tex tex4ht-4ht
 %
 % Copyright 2009-2023 TeX Users Group    
@@ -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}
 %%%%%%%%%%%%%%%%%%%%%%
@@ -32410,7 +32449,10 @@
       \expandafter\lstset\expandafter{\lst at set}% 
       \lsthk at DisplayStyle%
       \catcode\active=\active%
-      \a:lstinputlisting\ht:special{t4ht@[}\lst at Init\relax \let\lst at gobble\z@%
+      \a:lstinputlisting\ht:special{t4ht@[}
+      \pend:def\cptA:{\ht:special{t4ht@]}}
+      \append:def\cptD:{\ht:special{t4ht@[}}
+      \lst at Init\relax \let\lst at gobble\z@%
       \lst at SkipToFirst%
       \lst at ifprint \def\lst at next{\input{#1}}% 
              \else \let\lst at next\@empty \fi%

Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/listings.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/listings.4ht	2023-07-25 19:34:11 UTC (rev 67730)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/listings.4ht	2023-07-25 19:51:24 UTC (rev 67731)
@@ -1,6 +1,6 @@
-% listings.4ht (2022-05-22-13:50), generated from tex4ht-4ht.tex
+% listings.4ht (2023-07-25-12:42), generated from tex4ht-4ht.tex
 % Copyright 2001-2009 Eitan M. Gurari
-% Copyright 2009-2022 TeX Users Group
+% Copyright 2009-2023 TeX Users Group
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either
@@ -17,7 +17,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2022-05-22-13:50}
+\immediate\write-1{version 2023-07-25-12:42}
 
 \@ifpackageloaded{xcolor}{}{%
 \RequirePackage{xcolor}
@@ -74,7 +74,10 @@
       \expandafter\lstset\expandafter{\lst at set}%
       \lsthk at DisplayStyle%
       \catcode\active=\active%
-      \a:lstinputlisting\ht:special{t4ht@[}\lst at Init\relax \let\lst at gobble\z@%
+      \a:lstinputlisting\ht:special{t4ht@[}
+      \pend:def\cptA:{\ht:special{t4ht@]}}
+      \append:def\cptD:{\ht:special{t4ht@[}}
+      \lst at Init\relax \let\lst at gobble\z@%
       \lst at SkipToFirst%
       \lst at ifprint \def\lst at next{\input{#1}}%
              \else \let\lst at next\@empty \fi%

Added: trunk/Master/texmf-dist/tex/generic/tex4ht/mathtools-hooks.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/mathtools-hooks.4ht	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/mathtools-hooks.4ht	2023-07-25 19:51:24 UTC (rev 67731)
@@ -0,0 +1,41 @@
+% mathtools-hooks.4ht, generated from tex4ht-4ht.tex
+% Copyright 2023 TeX Users Group
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3c of this license or (at your option) any
+% later version. The latest version of this license is in
+%   http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions
+% of LaTeX version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainer of this work
+% is the TeX4ht Project <http://tug.org/tex4ht>.
+%
+% If you modify this program, changing the
+% version identification would be appreciated.
+\immediate\write-1{version 2023-07-25-12:42}
+
+\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
+
+


Property changes on: trunk/Master/texmf-dist/tex/generic/tex4ht/mathtools-hooks.4ht
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht
===================================================================
--- trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht	2023-07-25 19:34:11 UTC (rev 67730)
+++ trunk/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht	2023-07-25 19:51:24 UTC (rev 67731)
@@ -1,4 +1,4 @@
-% usepackage.4ht (2023-01-12-14:08), generated from tex4ht-4ht.tex
+% usepackage.4ht (2023-07-25-12:42), generated from tex4ht-4ht.tex
 % Copyright 2003-2009 Eitan M. Gurari
 % Copyright 2009-2023 TeX Users Group
 %
@@ -17,7 +17,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2023-01-12-14:08}
+\immediate\write-1{version 2023-07-25-12:42}
 
    \def\:temp{tex4ht}\ifx \:temp\@currname
    \:warning{\string\usepackage{tex4ht} again?}
@@ -78,6 +78,7 @@
 \AddToHook{package/doc/after}{\SUPOn}
 \AddToHook{package/hypdoc/before}{\SUPOff}
 \AddToHook{package/hypdoc/after}{\SUPOn}
+\Configure{PackageHooks}{mathtools.sty}{mathtools-hooks.4ht}
 \Configure{PackageHooks}{babel.sty}{babel-sty-hooks.4ht}
 \Configure{PackageHooks}{minted.sty}{minted-sty-hooks.4ht}
 \Configure{PackageHooks}{graphics.sty}{graphics-hooks.4ht}



More information about the tex-live-commits mailing list.