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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Fri Nov 18 23:04:51 CET 2022


Author: michal_h21
Date: 2022-11-18 22:04:51 +0000 (Fri, 18 Nov 2022)
New Revision: 1242

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-4ht.tex
Log:
disable label and index in Caption package version of \caption

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2022-11-17 18:48:36 UTC (rev 1241)
+++ trunk/lit/ChangeLog	2022-11-18 22:04:51 UTC (rev 1242)
@@ -1,3 +1,8 @@
+2022-11-18  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-4ht.tex (nameref.4ht): disable \index and \label commands
+	in Caption's package version of \caption.
+	
 2022-11-17  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-4ht.tex (

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2022-11-17 18:48:36 UTC (rev 1241)
+++ trunk/lit/tex4ht-4ht.tex	2022-11-18 22:04:51 UTC (rev 1242)
@@ -3549,7 +3549,13 @@
 \@ifpackageloaded{caption}{
   \pend:defIII\caption at beginex{%
     \gdef\NR:Type{\@currenvir}%
-    \gdef\NR:Title{\a:newlabel{##2}}%
+    % handle \label and \index in Caption's package
+    % version of \caption
+    \begingroup%
+    \let\index\:gobble%
+    \let\label\:gobble%
+    \protected at xdef\NR:Title{\a:newlabel{##2}}%
+    \endgroup%
   }
 }{}
 



More information about the tex4ht-commits mailing list.