2

I combined acronyms and the glossary into one list with the following code.

Unfortunately, some entries in the glossary don't have a long form. I tried to handle this with an \,.

But this leads to an unsorted list. Has anyone an idea, how to solve this?

Thank you very much!

\documentclass{scrbook}
\usepackage[ngerman]{babel}
\usepackage{blindtext}

%\usepackage[printonlyused]{acronym}

\usepackage[acronym,
nomain,
nopostdot,
nonumberlist,
toc]{glossaries}
\makeglossaries

\setacronymstyle{long-short-desc}
\renewcommand*{\acronymentry}[1]{\acronymfont{\glsentryshort{#1}} \textnormal{--\glsentrylong{#1}--}} % Print it the way I want

\newacronym[description={some description}]{ABC}{ABC}{ABC-long}
\newacronym[description={some description}]{BCD}{BCD}{\,}
\newacronym[description={some description}]{Test}{Test}{Test-long}

\begin{document}

\glsaddall % auch wenn nicht Referenziert alle Anzeigen
\printglossaries

\chapter{Abstract}
\blinddocument
\end{document}

image of glossary

2

The default sort for the long-short-desc is the long value. Since this has been set to \,, makeindex puts it in the "Symbols" group at the start. You can simply override it using the sort key like this:

\newacronym[description={some description},sort={BCD}]{BCD}{BCD}{\,}

This instructs makeindex to sort it according to BCD.

Complete MWE (thank you for providing one!):

\documentclass{scrbook}
\usepackage[ngerman]{babel}
\usepackage{blindtext}

\usepackage[acronym,
nomain,
nopostdot,
nonumberlist,
toc]{glossaries}

\makeglossaries

\setacronymstyle{long-short-desc}
\renewcommand*{\acronymentry}[1]{\acronymfont{\glsentryshort{#1}} \textnormal{--\glsentrylong{#1}--}} % Print it the way I want

\newacronym[description={some description}]{ABC}{ABC}{ABC-long}
\newacronym[description={some description},sort={BCD}]{BCD}{BCD}{\,}
\newacronym[description={some description}]{Test}{Test}{Test-long}

\begin{document}

\glsaddall
\printglossaries

\chapter{Abstract}
\blinddocument
\end{document}

image of glossary

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.