I can't tell definitely about MikTeX, but on my TeXLive on a Debian GNU/Linux system xindy
uses so called prefixes to put accented letters into lettergroups and to sort them. For example, the following is taken from /usr/share/xindy/lang/english/utf8.xdy
:
;; Rules for xindy; generated by make-rules.pl
;; language: English
(define-letter-group "A" :prefixes ("�"))
(define-letter-group "B" :after "A" :prefixes ("�"))
(define-letter-group "C" :after "B" :prefixes ("�"))
(Here "�"
replaces one-byte strings which are used then to sort index entries, they are different for all lettergroups, for "A"
it's the 0x80
byte, for "B"
it's 0x84
, for "C"
it's 0x86
etc.) After that the "en-alphabetize"
rule replaces all letters by these prefixes and xindy
does the sorting and putting words to letergroups based on them. Here is an excerpt from the rule:
(define-rule-set "en-alphabetize"
:rules (("À" "�" :string)
("à" "�" :string)
("Æ" "��" :string)
("æ" "��" :string)
Again, I can't reproduce the 8-bit strings, though the first "�"
in all four rules is 0x80
which means that these letters will go to the "A"
lettergroup.
So, If you want your "AB"
lettergroup to blend in the existing groups, you'll have to assign suitable prefix for it. What works with my TeXLive is the following mystyle.xdy
:
(define-letter-group "ab" :after "A" :prefixes ("��"))
where the first �
has the 0x80
hex code, and the second one has the 0x84
hex code. I don't know if the codes should be the same for MikTeX, as they are generated by a script. Here is the base64
encoded mystyle.xdy
if it helps (as simple copying and pasting wouldn't work because of 8-bit strings):
KGRlZmluZS1sZXR0ZXItZ3JvdXAgImFiIiA6YWZ0ZXIgIkEiIDpwcmVmaXhlcyAoIoCEIikpDQoNCg==
When I run
xindy -C utf8 -L english -M texindy -M mystyle myfile.idx
I get the following myfile.ind
:
\begin{theindex}
\providecommand*\lettergroupDefault[1]{}
\providecommand*\lettergroup[1]{%
\par\textbf{#1}\par
\nopagebreak
}
\lettergroup{A}
\item aa, 1
\item ac, 1
\indexspace
\lettergroup{ab}
\item ab, 1
\end{theindex}