1

I used the glossaries package for acronyms using footnote-desc as the acronym style. With this setting, I get a footnote the first time an acronym is introduced, giving the long acronym. I would like to get is the footnote displaying “Short acronym: Long acronym”, if possible without changing the options. Here, in the example, it would give: “1D: One-Dimensional“ in the footnote.

Here is the MWE

\documentclass{report}

\usepackage[acronym,
            nomain,
            indexonlyfirst,
            hyperfirst,
            ]{glossaries}


\newacronym{1D}{1D}{\textit{One-Dimensional}}
\newacronym{2D}{2D}{\textit{Two-Dimensional}}

\setacronymstyle{footnote-desc}

\makenoidxglossaries

\begin{document}

\gls{1D}, \gls{2D}.


\printnoidxglossary[
            style=listgroup,
            type=acronym]

\end{document}

1 Answer 1

2

You can define your own style to do this. For example:

\newacronymstyle{myfootnote}%
{%
  \GlsUseAcrEntryDispStyle{footnote}%
}%
{%
  \GlsUseAcrStyleDefs{footnote}%
  \renewcommand*{\genacrfullformat}[2]{%
   \protect\firstacronymfont{\glsentryshort{##1}}##2%
   \protect\footnote{\glsentryshort{##1}: \glsentrylong{##1}}%
  }%
  \renewcommand*{\Genacrfullformat}[2]{%
   \firstacronymfont{\Glsentryshort{##1}}##2%
   \protect\footnote{\Glsentryshort{##1}: \glsentrylong{##1}}%
  }%
  \renewcommand*{\genplacrfullformat}[2]{%
   \protect\firstacronymfont{\glsentryshortpl{##1}}##2%
   \protect\footnote{\glsentryshortpl{##1}: \glsentrylongpl{##1}}%
  }%
  \renewcommand*{\Genplacrfullformat}[2]{%
   \protect\firstacronymfont{\Glsentryshortpl{##1}}##2%
   \protect\footnote{\Glsentryshortpl{##1}: \glsentrylongpl{##1}}%
  }%
}%


\setacronymstyle{myfootnote}

\newacronym{1D}{1D}{\textit{One-Dimensional}}
\newacronym{2D}{2D}{\textit{Two-Dimensional}}

If all your abbreviations use \textit, it makes better sense semantically to move the \textit out of the \newacronym bit and into the style. For example:

\newacronymstyle{myfootnote}%
{%
  \GlsUseAcrEntryDispStyle{footnote}%
}%
{%
  \GlsUseAcrStyleDefs{footnote}%
  \renewcommand*{\GenericAcronymFields}%
   {description={\textit{\the\glslongtok}}}%
  \renewcommand*{\genacrfullformat}[2]{%
   \protect\firstacronymfont{\glsentryshort{##1}}##2%
   \protect\footnote{\glsentryshort{##1}:
     \textit{\glsentrylong{##1}}}%
  }%
  \renewcommand*{\Genacrfullformat}[2]{%
   \firstacronymfont{\Glsentryshort{##1}}##2%
   \protect\footnote{\Glsentryshort{##1}: 
     \textit{\glsentrylong{##1}}}%
  }%
  \renewcommand*{\genplacrfullformat}[2]{%
   \protect\firstacronymfont{\glsentryshortpl{##1}}##2%
   \protect\footnote{\glsentryshortpl{##1}: 
     \textit{\glsentrylongpl{##1}}}%
  }%
  \renewcommand*{\Genplacrfullformat}[2]{%
   \protect\firstacronymfont{\Glsentryshortpl{##1}}##2%
   \protect\footnote{\Glsentryshortpl{##1}: 
     \textit{\glsentrylongpl{##1}}}%
  }%
}%

\setacronymstyle{myfootnote}

\newacronym{1D}{1D}{One-Dimensional}
\newacronym{2D}{2D}{Two-Dimensional}

You must log in to answer this question.

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