I want my glossary created via glossaries
(bottom) to have the same width as my table of contents (top). I would like the numbers in the glossary to have a large space away from the dots and description text equal to that in the table of contents.
I feel that this is partly possible by modifying the description width via \glsdescwidth
.
Here is a minimal working example:
\documentclass{report}
\usepackage{tocloft}
\renewcommand{\cftchapleader}{\cftdotfill{\cftsecdotsep}}
\usepackage[toc]{glossaries}
\makeglossaries
\renewcommand*\glspostdescription{\cftdotfill{\cftsecdotsep}}
\begin{document}
\tableofcontents
\newglossaryentry{K}{name={kind of long name},description={King of long description}}
\newglossaryentry{S}{name={some long name},description={Super super super super super super super super super super super super super super super super super long description}}
\printglossary[style=long]
\chapter{Chap 1}
\gls{K}
\gls{S}
\end{document}
To compile the example, you must use makeglossaries
in between calls to latex
.
Best Answer
Maybe something along these lines is a start? This works at least as long as there aren't too many page numbers for an entry in the glossary: