# Group glossaries by first letter

I am using glossaries with xindy. It groups entries by first letter and puts a vertical space between groups. How can I change the style of output to show the starting letter for each group at the beginning of them?

\documentclass[10pt,a4paper]{report}
\usepackage[xindy]{glossaries}
\makeglossaries

\newglossaryentry{A}{name={A}, description={A is A}}
\newglossaryentry{AA}{name={AA}, description={AA is AA}}

\newglossaryentry{B}{name={B}, description={B is B}}

\newglossaryentry{C}{name={C}, description={C is C}}
\newglossaryentry{CC}{name={CC}, description={CC is CC}}

\begin{document}

Here I cite either \gls{A}, \gls{AA}, \gls{B}, \gls{C} or \gls{CC}.
I want three groups in the glossary output, indicated by \textbf{A},
\textbf{B} and \textbf{C} with entries in them according to their initial letter.

\printglossaries

\end{document}

-

In the German community MrUnix I posted such thing.

First you can try the style indexgroup.

The command \printglossaries doesn't allow any optional argument. To work with your example I use instead \printglossary width the optional argument style=indexgroup.

\documentclass[10pt,a4paper]{report}
\usepackage[xindy]{glossaries}
\makeglossaries

\newglossaryentry{A}{name={A}, description={A is A}}
\newglossaryentry{AA}{name={AA}, description={AA is AA}}

\newglossaryentry{B}{name={B}, description={B is B}}

\newglossaryentry{C}{name={C}, description={C is C}}
\newglossaryentry{CC}{name={CC}, description={CC is CC}}

\begin{document}

Here I cite either \gls{A}, \gls{AA}, \gls{B}, \gls{C} or \gls{CC}.
I want three groups in the glossary output, indicated by \textbf{A},
\textbf{B} and \textbf{C} with entries in them according to their initial letter.

\printglossary[style=indexgroup]

\end{document}


-
I know it's been a very long time since this has been written, but I have been looking for exactly what you've done here. I tried using the indexgroup style but I seem to get a different output everytime I try, I also copied your MWE but it results in the same output. What I get is simply a default in front of the glossary, like this: i.stack.imgur.com/N3LO8.jpg Can you maybe tell me what happened? Has something in the package changed? –  David Wright May 11 '13 at 12:20
@DavidWright: I tried the mwe above and get the same result. –  Marco Daniel May 11 '13 at 13:00
I'm sorry do you mean the same result as me or the same result that you posted above? –  David Wright May 11 '13 at 13:02
i tried some other styles and somehow the only ones that do not work are the group styles, which is exactly what I'm looking for. –  David Wright May 11 '13 at 13:15
@DavidWright: Do you get any errors/warnings? You picture doesn't show the glossar –  Marco Daniel May 11 '13 at 13:24