15 May
2023
15 May
'23
4:18 p.m.
On Mon, 15 May 2023 09:40:22 +0200
Hans Hagen via ntg-context
\starttexdefinition tolerant protected IndexB[#1]#:#*#2 \index{#2} \doloopoverlist {#1} { \index{##1+#2} } \stoptexdefinition
Awesome! However, I think that Joel was looking for a solution closer to what Hraban suggested, creating automatic subcategories. I would do that through a additional macros: \starttexdefinition protected Animals#1 \index{#1} \index{animals+#1} #1 ) \starttexdefinition protected Plants#1 \index{#1} \index{plants+#1} #1 ) \Animals{dogs} \Plants{trees} I use as a general indexing macro: \starttexdefinition tolerant protected Index[#1]#:#*#2 \index[#1]{#2} #2 \stoptexdefinition Alan