I am using glossaries package in my document and I have some long term names. This breaks my layout. I tried to apply:
\setlength{\glspagelistwidth}{0.3\linewidth}
And it did not work at all. If I use:
\setlength{\glsdescwidth}{0.3\linewidth}
it will work on the description side, but I need the term side to have its width reduced not the description one. If I use:
\setlength{\glsdescwidth}{0.7\linewidth}
it will not give me the expected result either.
How can I fix this?
The minimum working example I could get (I tried to be the closest possible to my situation):
\documentclass{book}
\usepackage{lipsum}
\usepackage[utf8]{inputenc}
\usepackage[acronym]{glossaries}
\renewcommand*{\glossaryentrynumbers}[1]{}
\newcommand{\dictentry}[2]{%
\newglossaryentry{#1}{name={#1},description={#2}}%
\glsadd{#1}%
}
\newcommand{\dictentryspec}[3]{%
\newglossaryentry{#1}{name={#2},description={#3},sort={#1}}%
\glsadd{#1}%
}
\newcommand{\acronentry}[2]{%
\newglossaryentry{acro#1}{type=\acronymtype, name={#1},description={#2}, first={#2 (#1)}}%
\glsadd{acro#1}%
}
\makeglossaries
\setlength{\glsdescwidth}{\dimexpr\linewidth-10\tabcolsep}
\renewcommand{\glsnamefont}[1]{\textbf{#1}}
\glstoctrue
\newglossarystyle{clong}{%
\glossarystyle{long}
\renewcommand{\glsgroupskip}{}
}
\begin{document}
My document.
\acronentry{AD}{Sample 1}
\dictentry{really long or long long long long term 1}{\lipsum[1]}
\dictentryspec{really long or long long long long term 2 in place}{used when I have é or â in glossaries}{\lipsum[1]}
\cleardoublepage
\renewcommand*{\arraystretch}{1.5}
\setlength{\glspagelistwidth}{0.3\linewidth}
\printglossary[type=\acronymtype,style=clong]
\cleardoublepage
\printglossary[type=main,style=clong]
\cleardoublepage
\end{document}
