2

I'm working on a report that requires an acronym list with some customization. My intent is to generate an acronym list with an extra column for a customized parameter associated with the acronym. In the end I' thinking that I want to be able to do something like the following:

\usepackage[acronym, section]{glossaries}

\glsaddkey{detail}{} ...

\newacronym[detail=(info)]{AD}{AD}{Acronym Definition}

I want to follow this up so that in the acronym list it had an output at the end of the document that looks something like the following:

(info)    AD     Acronym Definition

I don't want to change anything about how the acronyms are displayed in report text.

In investigating how to do this on my own I came across this question: Custom glossary style, \makenoidxglossaries and \glsgroupskip. This question seems to be very similar to what I'm trying to accomplish however I can't get the MWE in their answer to work, making adapting it to my own application rather difficult. Specifically, I get the following error on compile:

! Undefined control sequence.
l.42 \glsaddkey
               {math}{}{\acem}{\Acem}{\acm}{\Acm}{\ACm}

I have to be missing something simple here as I can't seem to find any hints as to what I'm doing wrong here. If I could get that MWE to work I should be able to reverse engineer and hack my way to applying it my specific application on my own. Here is the MWE from the example I cited above, for convenience.

\documentclass{article}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage[shortcuts]{glossaries}
\makeglossaries

\glsaddkey{math}{}{\acem}{\Acem}{\acm}{\Acm}{\ACm}

\newacronym[math=\mathfrak{foo}]{foo}{foo}{Foo}
\newacronym[math=\mathfrak{bar}]{bar}{bar}{Bar}
\newacronym[math=\mathfrak{baz}]{baz}{baz}{Baz}
\newacronym[math=\mathfrak{qux}]{qux}{qux}{Qux}

\newglossarystyle{my}{%
  \setglossarystyle{long3colheader}%
  \renewcommand*{\glossaryheader}{%
    \toprule
    Abbreviation & Symbol in Mathematical Expressions & Description \tabularnewline\midrule\endhead
    \bottomrule\endfoot
  }%
  \renewcommand*{\glsgroupskip}{%
     & &\tabularnewline}%
  \setlength\glsdescwidth{.275\textwidth}%
  \setlength\glspagelistwidth{.45\textwidth}%
  \renewcommand{\glossentry}[2]{%
    \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & $\acem{##1}$ & \glossentrydesc{##1}\tabularnewline
  }%
}

\setglossarystyle{my}

\begin{document}
  \glsaddallunused
  \printglossaries
\end{document}
Patrick
  • 21

0 Answers0