6

I always get an overfull \hbox warning when I compile a glossary with the glossaries package and the option style=long. Also the warning occurs only with KOMA-Script classes and not with the standard classes. Normally I'm using lualatex, but pdflatex produces the same warnings. When I have more than 10 acronyms I get a similar second overfull \hbox warning.

Does anyone have an idea what the problem is? Or do I just have to live with it?

Here a MWE which produces the warnings:

 \documentclass{scrartcl}
%\documentclass{article}

 \usepackage[nomain,acronym,xindy,style=long]{glossaries}

 \makeglossaries

\newacronym{a}{a}{a}
\newacronym{b}{b}{b}
\newacronym{c}{c}{c}
\newacronym{d}{d}{d}
\newacronym{e}{e}{e}
\newacronym{f}{f}{f}
\newacronym{g}{g}{g}
\newacronym{h}{h}{h}
\newacronym{i}{i}{i}
\newacronym{j}{j}{j}
\newacronym{k}{k}{k}
%\newacronym{l}{l}{l}
%\newacronym{m}{m}{m}
%\newacronym{n}{n}{n}
%\newacronym{o}{o}{o}
%\newacronym{p}{p}{p}

\begin{document}
\glsaddallunused[\acronymtype]
\printglossary[type=\acronymtype,]
\end{document} 
3

See this bug report for package glossaries. The package glossaries uses \hsize before \begin{document} while the official setup is done after calculation of \columnwidth in \begin{document}. Note that the MWE in the bug report is using the standard class article.

Workaround for style=long:

\usepackage[nomain,acronym,xindy,style=long]{glossaries}
\AtBeginDocument{%
  \setlength{\glsdescwidth}{.6\columnwidth}%
  \setlength{\glspagelistwidth}{.1\columnwidth}%
}

enter image description here

Code:

\documentclass{scrartcl}
%\documentclass{article}

\usepackage[nomain,acronym,xindy,style=long]{glossaries}
\AtBeginDocument{%
  \setlength{\glsdescwidth}{.6\columnwidth}%
  \setlength{\glspagelistwidth}{.1\columnwidth}%
}

\makeglossaries

\newacronym{a}{a}{a}
\newacronym{b}{b}{b}
\newacronym{c}{c}{c}
\newacronym{d}{d}{d}
\newacronym{e}{e}{e}
\newacronym{f}{f}{f}
\newacronym{g}{g}{g}
\newacronym{h}{h}{h}
\newacronym{i}{i}{i}
\newacronym{j}{j}{j}
\newacronym{k}{k}{k}
\newacronym{l}{l}{l}
\newacronym{m}{m}{m}
\newacronym{n}{n}{n}
\newacronym{o}{o}{o}
\newacronym{p}{p}{p}

\begin{document}
\glsaddallunused[\acronymtype]
\printglossary[type=\acronymtype,]
\end{document}

Update The bug is fixed in glossaries-extra. This new package is an extension of glossaries. So you can use

\usepackage[nomain,acronym,xindy,style=long]{glossaries-extra}
| improve this answer | |
2

Nicola Talbot implemented this fix in the package glossaries-extra

\usepackage[nomain,acronym,xindy,style=long]{glossaries}
\usepackage{glossaries-extra}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.