2017-03-01

I try to generate an index which entries are not group by normal letters A, B, C, … but by books of the bible eg. Num, Dtn, Ps etc. So my question is how can I define a custom list of letter groups based on the books of the bible. As far as I understand the xindy manual all I have to do is to add some new letter groups with define-letter-groups in a custom style file, but my attempt failed.

This is my M(not)WE:

The xindy manual unfornutalty isn’t really details about letter groups and as far is I can tell I did nothing wrong in my style file, but I fear im missing something important.

What I found here on TeX.SX:

xindy : how to add new letters and lettergroups to the alphabet? has an two answers but only for the special problem of adding groups for the Pali language. I’m not able to understand the first answer and transfer it to my problem. The second answer is a little less complicated but it doesn’t even work if I try to reproduce the results from there if I follow the steps one by one. I.e. the code – which is from 2011 – seems not to work.

The answer for Xindy doesn't sort keywords properly suggest that I have to define a new language first. Is this true? Then why isn’t that mentioned in the xindy manual …?

Index of bible verses with xindy has answers but no real solution …

The answer on xindy: rule to remove index entry also uses a custom letter group but additionally with a strange (what kind of special sequence is ~b?) merge rule. However it seems to be a workaround if I use prefixes that aren’t normal letters:

But this can’t be the intended solution …

The answer on Strange sorting of Greek letters using glossaries with xindy uses new letter groups for greek letters and in that case no merge rule are used.

The last two questions led me to the theory that the problem with my letter groups is that they consist only of normal letters and are ignored because there are already groups for normal letters. However the xindy manual says

More problems arise when using languages with different letter schemes. Hungarian is an example. In Hungarian indexes the words beginning with the letters Cs, Ly, Ny and more are printed in a separate block. The words beginning with Ly, for example, appear behind the words beginning with an L. xindy allows to define this kind of letter groups as well. Add the following lines to the style file.

Which is obviously an example with only letters …

Another workaround is to only use merge rules and map each book to a letter of the alphabet and then add some TeX code to transform \lettergroup{A} to output Num.

Edit: Please consider the bible books only as one example for the usage of new letter groups. I’m not looking for further workarounds to typeset/index the bible books, but a general solution on how to define letter groups with xindy.

Show more