1

I want links to the acronym directory only for "PC" and not for the rest. How can I do this?

\documentclass{article}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}

\usepackage[acronym]{glossaries}
\makeglossaries
\newacronym{PC}{PC}{Personal Computer}

\begin{document}

\begin{enumerate}
    \item \gls{PC}
    \item \gls{PC}
    \item \acrshort{PC}
    \item \acrlong{PC}
\end{enumerate}

\printglossary[type=acronym]
\end{document}

1 Answer 1

2

If you use the package option hyperfirst=false this will suppress hyperlinks on first use but not on subsequent use, so the first instance of \gls{PC} won't have a link to the list of acronyms. If you want to explicitly use \acrlong without a link, then use \acrlong* instead.

\documentclass{article}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[colorlinks]{hyperref}

\usepackage[acronym,hyperfirst=false]{glossaries}
\makeglossaries
\newacronym{PC}{PC}{Personal Computer}

\begin{document}

\begin{enumerate}
    \item \gls{PC}
    \item \gls{PC}
    \item \acrshort{PC}
    \item \acrlong*{PC}
\end{enumerate}

\printglossary[type=acronym]
\end{document}

This produces:

Image of resulting document

where the coloured text indicates a hyperlink.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .