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
.
long
style uses alongtable
to set the style. You need to take care that the table has an overall with of\textwidth
and possibly have to set the length\LTleft
to zero. The first thing should be doable by adapting thelong
style for a custom style, I guesslong
to get the desired result.