2

I try to create a good looking list of abbreviations. When I compile this MWE:

\documentclass[fontsize=12pt,paper=a4,headings=normal]{scrbook}
\usepackage[right=30mm,left=30mm,top=15mm,bottom=20mm,includeheadfoot]{geometry}
\usepackage{caption}
\usepackage[onehalfspacing]{setspace}
\usepackage[nonumberlist,acronym,toc,automake]{glossaries-extra}

% Format list of abbreviations
\newglossarystyle{mylong}{
\setglossarystyle{long}
\renewenvironment{theglossary}{\begin{longtable*}[l]{@{}p{\dimexpr 2cm-\tabcolsep}p{0.8\hsize}}}{\end{longtable*}}}

% List of abbreviations
\newacronym[plural=CH\textsubscript{4},firstplural=CH\textsubscript{4},description={Methan}]{CH4}{CH\textsubscript{4}}{Methan}

\newacronym[plural=CO,firstplural=CO,description={Kohlenstoffmonoxid}]{CO}{CO}{Kohlenstoffmonoxid}

\newacronym[plural=CO\textsubscript{2},firstplural=CO\textsubscript{2},description={Kohlenstoffdioxid}]{CO2}{CO\textsubscript{2}}{Kohlenstoffdioxid}

\newacronym[plural=e\textsuperscript{$-$},firstplural=e\textsuperscript{$-$},description={Negativ geladenes Elektron}]{e-}{e\textsuperscript{$-$}}{Elektronen}

\newacronym[plural=H\textsubscript{2}O,firstplural=H\textsubscript{2}O,description={Wasser}]{H2O}{H\textsubscript{2}O}{Wasser}

\newacronym[plural=H\textsubscript{2}S,firstplural=H\textsubscript{2}S,description={Schwefelwasserstoff}]{H2S}{H\textsubscript{2}S}{Schwefelwasserstoff}

\newacronym[plural=H\textsuperscript{$+$},firstplural=H\textsuperscript{$+$},description={Positiv geladenes Wasserstoffion}]{H+}{H\textsuperscript{$+$}}{Wasserstoffionen}

\newacronym[plural=HCL,firstplural=HCL,description={Chlorwasserstoff}]{HCL}{HCL}{Chlorwasserstoff}

\newacronym[plural=JFET,firstplural=JFET,description={Sperrschicht-Feldeffekttransistor}]{JFET}{JFET}{Sperrschicht-Feldeffekttransistor}

\newacronym[plural=NH\textsubscript{3},firstplural=NH\textsubscript{3},description={Ammoniak}]{NH3}{NH\textsubscript{3}}{Ammoniak}

\newacronym[plural=C\textsubscript{3}H\textsubscript{8},firstplural=C\textsubscript{3}H\textsubscript{8},description={Propan}]{C3H8}{C\textsubscript{3}H\textsubscript{8}}{Propan}

\newacronym[plural=NO,firstplural=NO,description={Stickstoffmonoxid}]{NO}{NO}{Stickstoffmonoxid}

\newacronym[plural=NTC,firstplural=NTC,description={Negative Temperature Coefficient}]{NTC}{NTC}{negative temperature coefficient}

\newacronym[plural=Pb,firstplural=Pb,description={Blei}]{Pb}{Pb}{Blei}

\newacronym[plural=NO\textsubscript{2},firstplural=NO\textsubscript{2},description={Stickstoffdioxid}]{NO2}{NO\textsubscript{2}}{Stickstoffdioxid}

\newacronym[plural=O\textsubscript{2},firstplural=O\textsubscript{2},description={Sauerstoff}]{O2}{O\textsubscript{2}}{Sauerstoff}

\newacronym[plural=H\textsubscript{2},firstplural=H\textsubscript{2},description={Molekularer Wasserstoff}]{H2}{H\textsubscript{2}}{molekularer Wasserstoff}

\newacronym[plural=OPs,firstplural=OP,description={Operationsverstärker}]{OP}{OP}{Operationsverstärkern}

\newacronym[plural=SO\textsubscript{2},firstplural=SO\textsubscript{2},description={Schwefeldioxid}]{SO2}{SO\textsubscript{2}}{Schwefeldioxid}

\newacronym[plural=``R'',firstplural=``R'',description={Referenzelektrode}]{R}{``R''}{Referenzelektrode}

\newacronym[plural=``S'',firstplural=``S'',description={Messelektrode}]{S}{``S''}{Messelektrode}

\newacronym[plural=``C'',firstplural=``C'',description={Gegenelektrode}]{C}{``C''}{Gegenelektrode}

\makeglossaries

\begin{document}

\printglossary[style=mylong,type=\acronymtype,title=Abkurzungsverzeichnis]
\chapter{Test}
\gls{e-}
\gls{H2S}
\gls{H+} 
\gls{H2O}
\gls{CO}
\gls{CO2}
\gls{CH4}
\gls{HCL}
\gls{JFET}
\gls{NH3}
\gls{C3H8}
\gls{NO}
\gls{NTC}
\gls{Pb}
\gls{NO2}
\gls{O2}
\gls{H2}
\gls{SO2}
\gls{OP}
\gls{R}
\gls{S}
\gls{C}
\end{document}

TexMaker gives me an overfull warning:

Overfull \vbox (1.63599pt too high) has occurred while \output is active []

How can I avoid this warning? Is there a mistake in my renewenvironement{thegossary}?

EDIT: If I add or remove just one item it works without any warning!

1
  • I'd simply ignore these 1.6pt. Jul 1, 2018 at 21:58

1 Answer 1

1

In general I suggest to add heightrounded in the options to geometry, so you'll have less problems with pagination, as this options ensures a whole number of lines will fit in a page.

However this worsen the present case, because the\vbox becomes overfull by 6.4733pt. :-(.

You're being unlucky, because the table “almost” fits a page, but not quite.

When you're sure the text is in final form, fix this with the following dirty trick:

\printglossary[
  style=mylong,
  type=\acronymtype,
  title=Abkurzungsverzeichnis\vspace{-6.4733pt},
]

where the amount is exactly what you get as overfull.

1
  • +1 for a workaround, but I'm searching for a more general solution...
    – PascalS
    Jul 2, 2018 at 6:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .