diff options
author | Karl Berry <karl@freefriends.org> | 2022-12-30 23:46:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-12-30 23:46:36 +0000 |
commit | 67b7f1ecb6dce63c006dfca50de45245364f1e8c (patch) | |
tree | dafacfe9b7e2cf4c46a9876eab3e3aeab3b5a694 /Master/texmf-dist/tex/generic | |
parent | 25fb543f397c304fd4259f4cce8956629561e822 (diff) |
\\ in \caption, tex4ht r1280
git-svn-id: svn://tug.org/texlive/trunk@65410 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic')
-rw-r--r-- | Master/texmf-dist/tex/generic/tex4ht/nameref.4ht | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht b/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht index b99de6ca5e1..f849d7c7bfc 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/nameref.4ht @@ -1,4 +1,4 @@ -% nameref.4ht (2022-11-21-13:02), generated from tex4ht-4ht.tex +% nameref.4ht (2022-12-30-15:46), generated from tex4ht-4ht.tex % Copyright 2005-2009 Eitan M. Gurari % Copyright 2009-2022 TeX Users Group % @@ -17,7 +17,7 @@ % % If you modify this program, changing the % version identification would be appreciated. -\immediate\write-1{version 2022-11-21-13:02} +\immediate\write-1{version 2022-12-30-15:46} \let\NR:Type\relax \let\ltx@label\label @@ -88,11 +88,23 @@ % % 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}]% @@ -141,8 +153,7 @@ % 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% } |