0

I have a acronym for GPU, and start my text with GPU-computing. For now this is the first appearance, and this results in graphic processing unit (GPU)-computing, however I would rather like it to read GPU-computing. Since my next use of GPU does not appear before the next page I would like to explain GPU in a footnote if it is its first appearance and followed by a hyphen.

I am not looking for an automated solution (I appreciate one, but ease of implementation is key to me). I would like to use the standard acronym first use definition in general, and just switch to footnotes for the \gls{gpu}-computing part. I.E. \acronymsAsFootnotes{\gls{gpu}-computing}.

\documentclass{article}    
\usepackage[acronym]{glossaries}    
 \makeglossaries
 \newacronym{gpu}{GPU}{graphics processing unit}    
\begin{document}
  First use \gls{gpu}-computing\\
  subsequent \gls{gpu}-computing and \gls{gpu}

  GPU\footnote{graphics processing unit}-computing
\end{document}
ShreevatsaR
  • 45,428
  • 10
  • 117
  • 149
ted
  • 3,377
  • You could use \acrshort{gpu}. This won't count as first use, though. – cgnieder Aug 10 '13 at 15:22
  • @cgnieder: the reason why I don't want to do this is that the next use of the word is about two pages later. I find the gap between first use and explanation to long. On the other hand I would like this to be automated so I do not have to do anything if I decide to insert another paragraph in front that actually usese the word. The whole point of this question is that the acronym is explained once, and as soon as possible, therefore I do not see the issue with it not counting as first use. (if I wanted I could add \glsunset just to mark it used, but that suppresses all explanation). – ted Aug 10 '13 at 16:52

1 Answers1

1

The following snippet does the trick. I overlooked \ifglsused which can be used to extract weather or not an acronym has been used before. Ths snippet ensures that a footnote explanation is added rather than an inline explanation, which looks rather distrubing for composite terms.

\newcommand{\glsAcroFoot}[1]{%
    \acrshort{#1}%
    \ifglsused{#1}{}{%
        \footnote{\Acrlong{#1}}%
        \glsunset{#1}%
    }%
}

mwe

\documentclass{article}    
\usepackage[acronym]{glossaries}    
 \makeglossaries
 \newacronym{gpu}{GPU}{graphics processing unit}    
 \newcommand{\glsAcroFoot}[1]{%
    \acrshort{#1}%
    \ifglsused{#1}{}{%
        \footnote{\Acrlong{#1}}%
        \glsunset{#1}%
    }%
 }
\begin{document}
  %\gls{gpu}
  First use \glsAcroFoot{gpu}-computing\\
  subsequent \gls{gpu}-computing and \gls{gpu}

  GPU\footnote{graphics processing unit}-computing
\end{document}
ShreevatsaR
  • 45,428
  • 10
  • 117
  • 149
ted
  • 3,377