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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Mon Mar 3 21:50:00 CET 2025


Author: michal_h21
Date: 2025-03-03 20:50:00 +0000 (Mon, 03 Mar 2025)
New Revision: 1656

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-4ht.tex
Log:
fixed koma script \chapter support in \nameref

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2025-02-28 17:09:49 UTC (rev 1655)
+++ trunk/lit/ChangeLog	2025-03-03 20:50:00 UTC (rev 1656)
@@ -1,3 +1,9 @@
+2025-03-03  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-4ht.tex (nameref.4ht): fixed KOMA-Script \chapter support
+	in \nameref.
+	https://github.com/michal-h21/make4ht/issues/166
+
 2025-02-28  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-oofice.tex (ooffice.4ht): added support for row colors with

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2025-02-28 17:09:49 UTC (rev 1655)
+++ trunk/lit/tex4ht-4ht.tex	2025-03-03 20:50:00 UTC (rev 1656)
@@ -3566,6 +3566,27 @@
 }
 \HLet\NR at schapter\:tempc
 
+\ifdefined\scr at makechapterhead
+% fixes for Koma-Script classes
+% declarations for \NR at chapter don'w work in Koma-Script classes, 
+% so we need to redefine \@chapter and \@schapter
+\def\:tempa[#1]#2{%
+  \gdef\NR:Title{\a:newlabel{#1}}%
+  \gdef\NR:Type{chapter}%
+  \o:@chapter:[#1]{#2}%
+}
+\HLet\@chapter\:tempa
+
+\def\:tempa#1{%
+  \gdef\NR:Title{\a:newlabel{#1}}%
+  \gdef\NR:Type{chapter}%
+  \o:@schapter:{#1}%
+}
+\HLet\@schapter\:tempa
+% end of fixes for Koma-Script classes
+\fi
+
+
 \let\o:NR@@caption\@caption
 %
 %



More information about the tex4ht-commits mailing list.