[tex4ht-commits] [SCM] tex4ht updated: r1161 - trunk/lit

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Mon Jun 27 12:03:53 CEST 2022


Author: michal_h21
Date: 2022-06-27 10:03:53 +0000 (Mon, 27 Jun 2022)
New Revision: 1161

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-4ht.tex
Log:
disable index and label inside caption with nameref

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2022-06-24 14:13:18 UTC (rev 1160)
+++ trunk/lit/ChangeLog	2022-06-27 10:03:53 UTC (rev 1161)
@@ -1,3 +1,8 @@
+2022-06-27  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-4ht.tex (nameref.4ht): disable \index and \label inside
+	\caption, to prevent fatal errors.
+
 2022-06-24  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-jats.4ht (jats.4ht): added support for pictures.

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2022-06-24 14:13:18 UTC (rev 1160)
+++ trunk/lit/tex4ht-4ht.tex	2022-06-27 10:03:53 UTC (rev 1161)
@@ -3475,9 +3475,15 @@
 % \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}]%
 }      
 



More information about the tex4ht-commits mailing list.