Is it possible the set up a xindy rule in a way that an entry does not show up in the index at all?

Here is a MWE

\def\xindyopt{-M texindy -L german-din}
Lala \index{Test}

What rule do I need to remove Test from the index?


Here it is. I sort "Test" into a separate letter group "DontIndex", and then surround that group with code that just eats it. You can add other keys to the same group, as shown in the code below, and they will be eaten together.

(require "texindy.xdy") 

(define-letter-group "DontIndex" :prefixes ("~b") :before "default")
(merge-rule "^Test$" "~b") ;$
(merge-rule "^XYZ$" "~b") ;$
 (markup-letter-group  :group "DontIndex" :open "\def\DontShowMe#1{}\DontShowMe{" :close "}")

\def\xindyopt{-M DontIndex -L german-din}
Disappear \index{Test} \index{XYZ} 
More \index{abc}\\
Still more \index{xyz}
And now testing \index{Testing}

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.