19

Is there any way to have hyperlinks to the glossaries/acronyms (using glossaries package) in only one direction? What I want is a link to the page where an acronym is used, in the list of acronyms. But I would like to disable the links to the page of the list acronyms, which are currently everywhere an acronym is used.

I was not able to find an answer after trying a lot of things. Is there any other way than to add an asterisk at every reference? Any help is appreciated!

EDIT: MWE as suggested (reference: How to combine Acronym and Glossary)

\documentclass{article}
\usepackage{hyperref}
\usepackage[acronym]{glossaries}
\makeglossaries

\newacronym{cd}{CD}{compact disk}

\begin{document}
\noindent
First use \gls{cd}\\
subsequent \gls{cd}

\printglossaries

\end{document}

enter image description here

What I want would look like this:

enter image description here

A similar question is unanswered here: Disable hyperlinks in some entries for glossaries

  • 2
    Use \gls[hyper=false]{cd} or \gls*{cd}. – clemens Sep 23 '12 at 14:52
  • Thanks cgnieder! Is there any other way than to edit every reference with an asterisk? – RLOA Sep 23 '12 at 14:58
  • 6
    There is \glsdisablehyper. Just add that to your preabmle after \usepackage{glossaries} – clemens Sep 23 '12 at 15:14
  • is there a way to to create the hyperlink only for the first occurrence? I know, I can do it manually by using \gls{} first, and then only use the starred version. however, I want to avoid scanning my whole document manually and replace everything... – beta Feb 22 '16 at 21:33
18

Putting my comments into an answer: the answer can be found in the user manual of glossaries. One can either turn off the hyperlinks of individual occurences by using \gls[hyper=false]{} or the shortcut \gls*{}. This is described in detail in section 6 “Links to Glossary Entries”.

If one wants to disable the links in general one can use the command \glsdisablehyper. (There is also \glsenablehyper which can be used to turn the links on again. Both commands act locally.) They are explaind in section 6.2 “Enabling and disabling hyperlinks to glossary entries”.

% arara: pdflatex
% arara: makeglossaries
% arara: pdflatex
\documentclass{article}
\usepackage{hyperref}
\usepackage[acronym]{glossaries}
\glsdisablehyper
\makeglossaries

\newacronym{cd}{CD}{compact disk}

\begin{document}
\noindent
First use \gls{cd} \\
subsequent \gls{cd} \\
linked {\glsenablehyper\gls{cd}} \\
not linked \gls{cd}

\printglossaries

\end{document}

enter image description here

  • Thanks again cgnieder. I did go through the manual but misunderstood this command for disabling links in both ways. Hence never tried it. – RLOA Sep 23 '12 at 15:38

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.