[Tex/LaTex] Dotted line between glossary description and page number

formattingglossaries

Is it possible to have the standard glossary entry, but with page numbers aligned to the right and a dotted line between the end of the description and the first page number?

Best Answer

You can achieve that by redefining \glspostdescription:

\documentclass{article}
\usepackage{glossaries}
\newglossaryentry{test}{name=Test,description=Blah blah}
\makeglossaries
\renewcommand*\glspostdescription{\dotfill}
\begin{document}

\glsaddall
\printglossary

\end{document}

enter image description here