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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Wed Aug 16 16:04:39 CEST 2023


Author: michal_h21
Date: 2023-08-16 14:04:38 +0000 (Wed, 16 Aug 2023)
New Revision: 1358

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-4ht.tex
Log:
added indexing support for memoir

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2023-08-16 11:03:43 UTC (rev 1357)
+++ trunk/lit/ChangeLog	2023-08-16 14:04:38 UTC (rev 1358)
@@ -1,4 +1,7 @@
 2023-08-16  Michal Hoftich  <michal.h21 at gmail.com>
+	
+	* tex4ht-4ht.tex (memoir.4ht): added indexing support for Memoir.
+	https://tex.stackexchange.com/a/693652/2891
 
 	* tex4ht-4ht.tex (tikz-hooks.4ht): fixed infinite loop with
 	externalization when TikZ was used multiple times in the document.

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2023-08-16 11:03:43 UTC (rev 1357)
+++ trunk/lit/tex4ht-4ht.tex	2023-08-16 14:04:38 UTC (rev 1358)
@@ -16421,6 +16421,28 @@
 }{}
 >>>
 
+Indexing support for Memoir. It supports split index like functionality,
+but quite complicatedly using aux files. This version produces idx file
+in the format expected by make4ht for the splitindex support.
+
+PS: I had to double the \''|' characters in the macro definition, otherwise
+they were stripped by the literate programming system. 
+
+\<memoir cfg\><<<
+\def\:tempa#1||#2||#3\\{%
+  \html:addr\hbox{\Link-{}{dx\last:haddr}\EndLink}%
+  \expandafter\protected at write\csname \jobname @idxfile\endcsname{}{\string\beforeentry{\RefFileNumber\FileNumber}{dx\last:haddr}{}}%
+  \expandafter\protected at write\csname \jobname @idxfile\endcsname{}{\string\indexentry[\@idxfile]{#1}{\thepage}}%
+  \endgroup%
+  \@esphack%
+}
+\HLet\@@wrindexhyp\:tempa
+\HLet\@@wrspindexhyp\:tempa
+
+% we use make4ht's splitindex functionality, which produces .ind files in the form of \jobname-idxname.ind
+\renewcommand{\printindex}[1][\jobname]{\@input@{\jobname-#1.ind}}
+>>>
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \Section{mempatch}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



More information about the tex4ht-commits mailing list.