3

How can I get rid of links for \glsdesc, while keeping them for \gls? Is it possible?

(It makes no sense to link the description, since there is no extra information by going to the glossary.)

% arara: pdflatex
% arara: makeglossaries
% arara: pdflatex

\documentclass{article}

\usepackage{hyperref}
\usepackage[acronym,toc,style=listgroup]{glossaries}
\makeglossaries

\newglossaryentry{apc} {
    name = {antigen presenting cell},
    description = {cells that present MHC proteins on their surface},
}


\begin{document}

\Glspl{apc} are \glsdesc{apc}.

\printglossary

\end{document}
3

glossaries provides \glsdesc* which removes the hyperlink:

enter image description here

\documentclass{article}

\usepackage{hyperref}
\usepackage[acronym,toc,style=listgroup]{glossaries}
\makeglossaries

\newglossaryentry{apc} {
    name = {antigen presenting cell},
    description = {cells that present MHC proteins on their surface},
}


\begin{document}

\Glspl{apc} are \glsdesc*{apc}.

\printglossary

\end{document}

If you never want to hyperlink the \glsdesc macro, then add the following to your preamble after loading glossaries:

\let\oldglsdesc\glsdesc
\renewcommand{\glsdesc}{\oldglsdesc*}

and use \glsdesc as usual.

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.