# xindy: formatting the first letter of the first entry of a letter group

How do I format the first letter of the first entry of a letter group in an index generated with xindy? The result should look something like this:

...
\indexspace

...

-

There probably is a better solution than the present hack; however, the standard setting of xindy writes in front of each group something like

\lettergroup{A}


it's sufficient to say

\long\def\lettergroup#1\item{\item\textbf}
\let\lettergroupDefault\lettergroup


in the preamble. A letter group will be something like

\lettergroup{A}
\item abc


and the macro ignores everything up to the first item changing it into \item\textbf, so LaTeX will see

\item\textbf abc


and all will be right, as \textbf is a macro with one argument. For more complicated cases such as accented letters, this might be insufficient, though.

-
Thanks a lot! Unfortunately (and as you suspected yourself) the solution does not work for more complicated cases like \index{ASCC@\textsc{ascc}} and also does not allow more complex formatting. Maybe I should ask the program authors. –  Till A. Heilmann Jan 3 '12 at 7:53
If index entries have "semantic formatting", then setting their first letter in boldface seems not to be correct. At any rate, designing a general macro for this is quite difficult; it would be easier if one knew what sort of different entries can be expected. –  egreg Jan 3 '12 at 9:23
It is strictly a matter of visual guidance for the reader signalling the beginning of a new letter group. I do not want to waste space with separate lines saying "A", "B", "C" and so on. It is probably easiest to do the formatting in the automatically generated *.ind file by hand. –  Till A. Heilmann Jan 3 '12 at 10:09