I am using glossaries-extra
.
How can the hyperlink be suppressed after the first use of an acronym or glossary entry in every chapter (or section) without changing the first use flag? I have found this solution, which does not work with acronyms and this one, which provides a kind of hacky and ugly hotfix and another solution that doesn't work with sections or chapters. I don't want to reset the first use flag in every section/chapter to avoid repeating acronym explanations.
Is there a solution that is not a hack?
MWE:
\documentclass{article}
\usepackage{hyperref}
\usepackage[acronym]{glossaries-extra}
\RestoreAcronyms
\newacronym{ex}{EX}{example}
\newglossaryentry{foobar}
{
name={foobar},
description={The FOOBAR blaa},
}
\makeglossaries
\begin{document}
\section{First section}
I explain \gls{ex} completely. But the second one here is short and has no more hyperlink: \gls{ex}.
Moreover, this is hyperlinked: \gls{foobar}, but this one is not: \gls{foobar}.
\section{Second section}
This \gls{ex} is short and with a hyperlink and this one is short and without a link: \gls{ex}.
\Gls{foobar} is linked, but \gls{foobar} is not.
\newpage
\printglossaries
\end{document}
\RestoreAcronyms
and\setabbreviationstyle
. Either use\RestoreAcronyms
and use the baseglossaries
\setacronymstyle
or use\setabbreviationstyle
and don't use\RestoreAcronyms
. (\RestoreAcronyms
changes\newacronym
back to the way it works with the baseglossaries
package rather than usingglossaries-extra
's new abbreviation mechanism.) – Nicola Talbot Dec 1 '17 at 16:39