Overfull \hbox warnings for the glossary option "style=long" when using KOMA-Script?
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}%
}
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}
Nicola Talbot implemented this fix in the package glossaries-extra
\usepackage[nomain,acronym,xindy,style=long]{glossaries}
\usepackage{glossaries-extra}