summaryrefslogtreecommitdiff
path: root/support/TeX4ht
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-06-28 03:01:06 +0000
committerNorbert Preining <norbert@preining.info>2022-06-28 03:01:06 +0000
commit2ef43af0215fc52966c9bbd8d5df6db6d6af224b (patch)
treef4575d7d44d673aef7008af7e6f14037472d4587 /support/TeX4ht
parent2f80535c778eacefb7c73b39d2cb4f877f3d3341 (diff)
CTAN sync 202206280301
Diffstat (limited to 'support/TeX4ht')
-rw-r--r--support/TeX4ht/source/ChangeLog5
-rw-r--r--support/TeX4ht/source/tex4ht-4ht.tex10
2 files changed, 13 insertions, 2 deletions
diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog
index 6322e06c8e..8960d20452 100644
--- a/support/TeX4ht/source/ChangeLog
+++ b/support/TeX4ht/source/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/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}]%
}