summaryrefslogtreecommitdiff
path: root/support/TeX4ht/source/tex4ht-4ht.tex
diff options
context:
space:
mode:
Diffstat (limited to 'support/TeX4ht/source/tex4ht-4ht.tex')
-rw-r--r--support/TeX4ht/source/tex4ht-4ht.tex10
1 files changed, 8 insertions, 2 deletions
diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex
index 0c2bd00913..f99c6fbd42 100644
--- a/support/TeX4ht/source/tex4ht-4ht.tex
+++ b/support/TeX4ht/source/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}]%
}