0

My list of abbreviation is sorted and grouped like expected, whereas my list of symbols is only sorted correctly but not grouped. Where is my fault?

MWE

\documentclass[]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[binary-units=true,locale = DE]{siunitx}
\usepackage{caption}
\usepackage[nonumberlist,acronym,toc,symbols,nomain]{glossaries-extra}

% Setup list of abbreviations
\newglossarystyle{myAbbreviation}{
  \setglossarystyle{long}
  \renewenvironment{theglossary}{%
    \vspace{-3mm}%
    \begin{longtable*}{
      @{}
      p{\dimexpr 2cm-\tabcolsep}
      p{\dimexpr\textwidth-\tabcolsep-2cm}
      @{}
    }%
  }{\end{longtable*}}
}
\setabbreviationstyle[acronym]{long-short}

% Setup list of symbols
\newglossary{symbolslist}{syi}{syg}{}
\glsaddstoragekey{unit}{}{\glsentryunit}
\newglossarystyle{mySymbol}{
  \setglossarystyle{long3col}%
  \renewenvironment{theglossary}{%
    \vspace{-3mm}%
    \setlength{\LTleft}{0pt}%
    \begin{longtable*}{%
      @{}
      p{\dimexpr 2cm-\tabcolsep}
      p{\glsdescwidth}
      r
      @{}
    }%
  }{\end{longtable*}}
  \renewcommand*{\glossentry}[2]{%
    \glstarget{##1}{\glossentryname{##1}} & \glossentrydesc{##1} & \glsentryunit{##1}\\
  }%
}

\newacronym[
plural={A},
firstplural={A (A)},
description={A}]
{A}{A}{A}

\newacronym[
plural={AA},
firstplural={AA (AA)},
description={AA}]
{AA}{AA}{AA}

\newacronym[
plural={B},
firstplural={B (B)},
description={B}]
{B}{B}{B}

\newacronym[
plural={BB},
firstplural={BB (BB)},
description={BB}]
{BB}{BB}{BB}

\newglossaryentry{C}{
name=\ensuremath{C},
description={C},
unit={C},
type={symbolslist}}

\newglossaryentry{CC}{
name=\ensuremath{CC},
description={CC},
unit={CC},
type={symbolslist}}

\newglossaryentry{D}{
name=\ensuremath{D},
description={D},
unit={D},
type={symbolslist}}

\newglossaryentry{DD}{
name=\ensuremath{DD},
description={DD},
unit={DD},
type={symbolslist}}

\makeglossaries
\glsaddall

\begin{document}
\printglossary[type=\acronymtype,style=myAbbreviation,title=Abkürzungsverzeichnis]
\printunsrtglossary[type=symbolslist,style=mySymbol,title=Symbolverzeichnis]
\end{document}

Result Abbreviation Symbol

Your Answer

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

Browse other questions tagged or ask your own question.