Consider the following minimal example:
\documentclass{article}
\usepackage[acronym, shortcuts]{glossaries}
\makeglossaries
\newcommand{\abbr}[1]{\underline{#1}}
\newacronym{snr}{SNR}{\abbr{s}ignal-to-\abbr{n}oise \abbr{r}atio}
\begin{document}
This: \gls{snr} looks as desired, but \acl{snr} doesn't.
\end{document}
I want the underlining to appear on the first use of an acronym (i.e. for the "full" version) and when I print the glossary (i.e. in the "description") but no underlining for the "long" version when I use \acl
. My main problem is that I don't know how to toggle the \abbr
command such that it does essentially nothing. I tried using something like
\newcommand{\myacl}[1]{
\renewcommand{\abbr}[1]{##1}
\acl{#1}
}
but that doesn't work. Any suggestions?