diff options
author | Norbert Preining <norbert@preining.info> | 2023-01-01 03:01:33 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-01-01 03:01:33 +0000 |
commit | 57f42e641f5238555a3dea5284318dbbc679d053 (patch) | |
tree | 8746cf101f6e10ac025636eea44ce757845f7d2f /support | |
parent | 276038a22b002640c158178010b146bf9287b31b (diff) |
CTAN sync 202301010301
Diffstat (limited to 'support')
-rw-r--r-- | support/TeX4ht/source/ChangeLog | 5 | ||||
-rw-r--r-- | support/TeX4ht/source/tex4ht-4ht.tex | 21 |
2 files changed, 21 insertions, 5 deletions
diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog index 7dd31c7566..d998456db1 100644 --- a/support/TeX4ht/source/ChangeLog +++ b/support/TeX4ht/source/ChangeLog @@ -1,3 +1,8 @@ +2022-12-30 Michal Hoftich <michal.h21@gmail.com> + + * tex4ht-4ht.tex (nameref.4ht): fixed support for \\ in \caption. + https://tex.stackexchange.com/a/670159/2891 + 2022-12-27 Michal Hoftich <michal.h21@gmail.com> * tex4ht-mathjax.tex (mathjax-latex-4ht.4ht): fixed use of \left and diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex index d57d1e294c..8a63480c63 100644 --- a/support/TeX4ht/source/tex4ht-4ht.tex +++ b/support/TeX4ht/source/tex4ht-4ht.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-4ht.tex 1278 2022-12-26 19:24:35Z michal_h21 $ +% $Id: tex4ht-4ht.tex 1280 2022-12-30 23:31:42Z michal_h21 $ % tex tex4ht-4ht or ht tex tex4ht-4ht % % Copyright 2009-2022 TeX Users Group @@ -3499,11 +3499,23 @@ definitions. % % use of \index and \label inside caption results in a fatal error % we need to disable them in \NR:Title + +% there can be more problematic commands, so we provide a configuration +% that can be used multiple times - the default value fixes known commands +% but a user can add more of them + +\def\a:captioncommandsfix{} +\NewConfigure{CaptionCommandsFix}[1]{\concat:config\a:captioncommandsfix{#1}} +\Configure{CaptionCommandsFix}{ + \let\index\:gobble% + \let\label\:gobble% + \let\\\relax% causes issues when \centering is active +} + \long\def\@caption#1[#2]{% \gdef\NR:Type{\@currenvir}% \begingroup% - \let\index\:gobble% - \let\label\:gobble% + \a:captioncommandsfix \protected@xdef\NR:Title{\a:newlabel{#2}}% \endgroup% \o:NR@@caption{#1}[{#2}]% @@ -3552,8 +3564,7 @@ definitions. % handle \label and \index in Caption's package % version of \caption \begingroup% - \let\index\:gobble% - \let\label\:gobble% + \a:captioncommandsfix \protected@xdef\NR:Title{\a:newlabel{##2}}% \endgroup% } |