1

How can I set in glossaries-extra the short-nolong style for my common abbreviations that are ignored when printing the list of abbreviations? \setabbreviationstyle[common]{short-nolong} or only short does not seem to work here. My idea is that I can decide later on, if I want to include them in the list by deleting the type=common option. Further, the definition of the short plural is ignored here in the MWE and a "s" is appended instead. Thanks!

enter image description here

enter image description here

MWE (xelatex):

\documentclass{scrbook}

\usepackage[abbreviations,symbols,nonumberlist,nogroupskip,automake]{glossaries-extra}

\newignoredglossary{common}
\setabbreviationstyle[common]{short-nolong}

% Abbreviations
\newabbreviation{abb:dft}{DFT}{discrete Fourier transfom}

\newabbreviation[
    type=common,
    description={Piece(s)},
    plural={pc.},
    \glslongpluralkey={pieces},
]{abb:piece}{pc.}{piece}

\makeglossaries[abbreviations]

\begin{document}

\printglossary[type=abbreviations]

\chapter{Test}

\Gls{abb:dft} and second use \gls{abb:dft}

1 \gls{abb:piece}, second use 1 \gls{abb:piece}\\
10 \glspl{abb:piece}, second use 10 \glspl{abb:piece}

\end{document}

1 Answer 1

1

As the documentation states

\setabbreviationstyle[〈category〉]{〈style-name〉}

the optional argument of \setabbreviationstyle takes a category, not a type. Saying category=common in addition to type=common in the \newabbreviation options does what you want.

4
  • I've tried \setabbreviationstyle[category=common,type=common]{short-nolong} but I still get the same output and the plural key is also ignores. Apr 22, 2022 at 8:15
  • Ok, shortplural key fixed this plural issue. But as mentioned, setting the style wasn't crowned by success. Apr 22, 2022 at 16:54
  • 1
    @DanielStich You misunderstand. You need to add the glossary entry to the category, i.e. add category=common to the options of \newabbreviation (next to type=common).
    – schtandard
    Apr 23, 2022 at 6:58
  • Ah sorry, I don't know why I didn't got that first go. Thanks! Apr 23, 2022 at 8:19

You must log in to answer this question.

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