diff options
Diffstat (limited to 'Master/texmf-dist')
6 files changed, 106 insertions, 9 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog index 4dcd7145892..10b01a415d4 100644 --- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog +++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog @@ -1,3 +1,12 @@ +2023-07-25 Michal Hoftich <michal.h21@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@gmail.com> * tex4ht-mathml.tex (mathml.4ht): fixed \tilde accent in MathML. diff --git a/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex b/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex index baaa8114339..14e936ccd0b 100644 --- a/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex +++ b/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex @@ -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} diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex index bccb26c5a2c..5e2194d73c0 100644 --- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex +++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex @@ -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 @@ $\m@th\displaystyle{{}#}$% \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 @@ Configure list of listings \expandafter\lstset\expandafter{\lst@set}% \lsthk@DisplayStyle% \catcode\active=\active% - \a:lstinputlisting\ht:special{t4ht@[}\lst@Init\relax \let\lst@gobble\z@% + \a:lstinputlisting\ht:special{t4ht@[} + \pend:def\cptA:{\ht:special{t4ht@]}} + \append:def\cptD:{\ht:special{t4ht@[}} + \lst@Init\relax \let\lst@gobble\z@% \lst@SkipToFirst% \lst@ifprint \def\lst@next{\input{#1}}% \else \let\lst@next\@empty \fi% diff --git a/Master/texmf-dist/tex/generic/tex4ht/listings.4ht b/Master/texmf-dist/tex/generic/tex4ht/listings.4ht index 3a165766406..20638b08253 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/listings.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/listings.4ht @@ -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@set}% \lsthk@DisplayStyle% \catcode\active=\active% - \a:lstinputlisting\ht:special{t4ht@[}\lst@Init\relax \let\lst@gobble\z@% + \a:lstinputlisting\ht:special{t4ht@[} + \pend:def\cptA:{\ht:special{t4ht@]}} + \append:def\cptD:{\ht:special{t4ht@[}} + \lst@Init\relax \let\lst@gobble\z@% \lst@SkipToFirst% \lst@ifprint \def\lst@next{\input{#1}}% \else \let\lst@next\@empty \fi% diff --git a/Master/texmf-dist/tex/generic/tex4ht/mathtools-hooks.4ht b/Master/texmf-dist/tex/generic/tex4ht/mathtools-hooks.4ht new file mode 100644 index 00000000000..bdbd6ef7d91 --- /dev/null +++ b/Master/texmf-dist/tex/generic/tex4ht/mathtools-hooks.4ht @@ -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 + + diff --git a/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht b/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht index e7a37aaccff..13b548a03e5 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/usepackage.4ht @@ -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} |