4

Out of this, I managed to have footnotes (glossaries at first use) within the description of glossary and acronyms using the glossaries package.

Now, I referred in an acronym to another abbreviation. If the acronym was not used within the text, footnotes appear correctly in the list of abbreviations. But when using the acronym within the text, a footnote to the referred abbreviation is missing.

How can I solve the problem of the missing footnote?

Here is a MWE:

\documentclass{scrreprt}

\usepackage{xstring}
\usepackage[backref=page,plainpages=false,pdfpagelabels,colorlinks]{hyperref}
\usepackage[footnote,acronym,hyperfirst,style=long,nomain]{glossaries}


% acronym style
\newacronymstyle{ex-footnote}%
{%
  \GlsUseAcrEntryDispStyle{footnote}%
}%
{%
   \GlsUseAcrStyleDefs{hyperfirst, footnote}%
   \renewcommand*{\genacrfullformat}[2]{%
    \firstacronymfont{\glsentryshort{##1}}##2%
    \expandafter\footnote\expandafter{\expandafter\glsentrylong\expandafter{##1}}%
   }%
   \renewcommand*{\Genacrfullformat}[2]{%
    \firstacronymfont{\Glsentryshort{##1}}##2%
    \expandafter\footnote\expandafter{\expandafter\glsentrylong\expandafter{##1}}%
   }%
   \renewcommand*{\genplacrfullformat}[2]{%
    \firstacronymfont{\glsentryshortpl{##1}}##2%
    \expandafter\footnote\expandafter{\expandafter\glsentrylongpl\expandafter{##1}}%
   }%
   \renewcommand*{\Genplacrfullformat}[2]{%
    \firstacronymfont{\Glsentryshortpl{##1}}##2%
    \expandafter\footnote\expandafter{\expandafter\glsentrylongpl\expandafter{##1}}%
   }%
}
\setacronymstyle{ex-footnote}

\makeglossaries


% arconyms
\newacronym{RAM}{RAM}{Random Access Memory}
\newacronym{SRAM}{SRAM}{Static \gls{RAM}}
\newacronym{VHSIC}{VHSIC}{Very High Speed Integrated Circuit}
\newacronym{VHDL}{VHDL}{\gls{VHSIC} Hardware Description Language}
\newacronym{PLD}{PLD}{Programmable Logic Device}
\newacronym{SPLD}{SPLD}{Simple \gls{PLD}}


\begin{document}

\gls{SRAM}\\
foo\footnote{bar}

\printglossary[type=\acronymtype, title=Abbreviations]

\glsaddallunused
\end{document}

page 1 page 2

3

This is a problem with nested footnotes. The same thing can be seen with the trivial example:

\documentclass{article}

\begin{document}

SRAM\footnote{Static RAM\footnote{Random Access Memory}}

foo\footnote{bar}

\end{document}

As with your example, the second footnote marker appears but the corresponding footnote text doesn't. The typical workaround is to do:

\documentclass{article}

\begin{document}

SRAM\footnote{Static RAM\footnotemark}\footnotetext{Random Access Memory}

foo\footnote{bar}

\end{document}

However this isn't easy to do with glossary entries. Instead I recommend something like:

\documentclass{scrreprt}

\usepackage{xstring}
\usepackage[backref=page,plainpages=false,pdfpagelabels,colorlinks]{hyperref}
\usepackage[footnote,acronym,hyperfirst,style=long,nomain]{glossaries}


% acronym style
\newacronymstyle{ex-footnote}%
{%
  \GlsUseAcrEntryDispStyle{footnote}%
}%
{%
   \GlsUseAcrStyleDefs{hyperfirst, footnote}%
   \renewcommand*{\genacrfullformat}[2]{%
    \firstacronymfont{\glsentryshort{##1}}##2%
    \expandafter\footnote\expandafter{\expandafter\glsentrylong\expandafter{##1}}%
   }%
   \renewcommand*{\Genacrfullformat}[2]{%
    \firstacronymfont{\Glsentryshort{##1}}##2%
    \expandafter\footnote\expandafter{\expandafter\glsentrylong\expandafter{##1}}%
   }%
   \renewcommand*{\genplacrfullformat}[2]{%
    \firstacronymfont{\glsentryshortpl{##1}}##2%
    \expandafter\footnote\expandafter{\expandafter\glsentrylongpl\expandafter{##1}}%
   }%
   \renewcommand*{\Genplacrfullformat}[2]{%
    \firstacronymfont{\Glsentryshortpl{##1}}##2%
    \expandafter\footnote\expandafter{\expandafter\glsentrylongpl\expandafter{##1}}%
   }%
}
\setacronymstyle{ex-footnote}

\makeglossaries


% arconyms
\newacronym{RAM}{RAM}{Random Access Memory}
\newacronym[description={Static \acrshort{RAM}}]{SRAM}{SRAM}{Static \glsentrylong{RAM}}
\newacronym{VHSIC}{VHSIC}{Very High Speed Integrated Circuit}
\newacronym[description={\acrshort{VHSIC} Hardware Description
Language}]{VHDL}{VHDL}{\glsentrylong{VHSIC} Hardware Description Language}
\newacronym{PLD}{PLD}{Programmable Logic Device}
\newacronym[description={Simple \acrshort{PLD}}]{SPLD}{SPLD}{Simple
\glsentrylong{PLD}}


\begin{document}

\gls{SRAM}\\
foo\footnote{bar}

\printglossary[type=\acronymtype, title=Abbreviations]

\glsaddallunused
\end{document}

Other possible alternatives are:

\newacronym{RAM}{RAM}{Random Access Memory}
\newacronym{SRAM}{SRAM}{Static \glsentrylong{RAM}}
\newacronym{VHSIC}{VHSIC}{Very High Speed Integrated Circuit}
\newacronym{VHDL}{VHDL}{\glsentrylong{VHSIC} Hardware Description Language}
\newacronym{PLD}{PLD}{Programmable Logic Device}
\newacronym{SPLD}{SPLD}{Simple \glsentrylong{PLD}}

or:

\newacronym{RAM}{RAM}{Random Access Memory}
\newacronym[description={Static \gls{RAM}}]{SRAM}{SRAM}{Static \glsentrylong{RAM}}
\newacronym{VHSIC}{VHSIC}{Very High Speed Integrated Circuit}
\newacronym[description={\gls{VHSIC} Hardware Description
Language}]{VHDL}{VHDL}{\glsentrylong{VHSIC} Hardware Description Language}
\newacronym{PLD}{PLD}{Programmable Logic Device}
\newacronym[description={Simple \gls{PLD}}]{SPLD}{SPLD}{Simple
\glsentrylong{PLD}}
  • Sorry for the late reply and thank you for your answer. You said it's not easy with glossaries, but that doesn't mean it is impossible, right? ;) Do you have any suggestions on how to do this? – Pauli Mar 3 '16 at 14:54

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.