summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic/tex4ht
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-06-27 21:10:01 +0000
committerKarl Berry <karl@freefriends.org>2022-06-27 21:10:01 +0000
commitd9c30dba5e926831d7fa333d624e12208e850bc6 (patch)
treecec2f88f67c9f377502862dfffdd7dac8ef9bd7e /Master/texmf-dist/source/generic/tex4ht
parentf53463f85287ae39aca758fb293f1de82dcb0580 (diff)
disable index and label inside caption with nameref, tex4ht r1161
git-svn-id: svn://tug.org/texlive/trunk@63740 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic/tex4ht')
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/ChangeLog5
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex10
2 files changed, 13 insertions, 2 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog
index 6322e06c8eb..8960d204526 100644
--- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog
+++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog
@@ -1,3 +1,8 @@
+2022-06-27 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-4ht.tex (nameref.4ht): disable \index and \label inside
+ \caption, to prevent fatal errors.
+
2022-06-24 Michal Hoftich <michal.h21@gmail.com>
* tex4ht-jats.4ht (jats.4ht): added support for pictures.
diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
index 0c2bd009132..f99c6fbd42b 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 1158 2022-06-21 15:56:07Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1161 2022-06-27 10:03:53Z michal_h21 $
% tex tex4ht-4ht or ht tex tex4ht-4ht
%
% Copyright 2009-2022 TeX Users Group
@@ -3475,9 +3475,15 @@ definitions.
% \NR:Type threw an undefined control sequence error. I think
% \@currenvir is safe, there is nothing special about \@captype.
%
+% use of \index and \label inside caption results in a fatal error
+% we need to disable them in \NR:Title
\long\def\@caption#1[#2]{%
\gdef\NR:Type{\@currenvir}%
- \gdef\NR:Title{\a:newlabel{#2}}%
+ \begingroup%
+ \let\index\:gobble%
+ \let\label\:gobble%
+ \xdef\NR:Title{\a:newlabel{#2}}%
+ \endgroup%
\o:NR@@caption{#1}[{#2}]%
}