I am experimenting with the pre-defined glossary style in the glossaries package. The tree style looks great and seems flexible, but I would like the left edge of all the glossary entries to line up vertically down the page. As far as I can tell, that is what the alttree style is for.
But when I use alttree, the glossary entry name and description overlap. Is that expected behavior? I suspect that \glstreeindent is not indenting properly. If it is expected behavior, what am I doing wrong?
MWE:
\documentclass[11pt]{article}%
\usepackage[style=alttree]{glossaries}
\makeglossaries
\newglossaryentry{gls1}{name={gls1},description={description for gls1}}
\newglossaryentry{gls2}{name={gls2},description={description for gls2}}
\newglossaryentry{gls3}{name={gls3longname},description={description for gls3}}
\glsaddall
\begin{document}
\printglossaries
\end{document}
I have tried modifying the alttree style to add \hangindent\glstreeindent after the line \ifnum\@gls@prevlevel=0 (as per mfap's answer to this Two column glossary question) but there is no change in output.
(Tried to tag with [alttree] and [tree] but I don't have permissions yet.)
\forglsentriesin order to determine the widest entry (see theglossariesdocumentation about\forglsentries– Apr 12 '17 at 16:03\forglsentriesin this fashion, but it looks like\glsfindwidesttoplevelnamebasically does this anyway. Just what I needed.Do you want to make your suggestion and/or
– Natalie Weber Apr 17 '17 at 18:17\glsfindwidesttoplovelnamean answer? It is exactly what I was looking for with my question.