12

I use the acronym package for managing acronyms. I would like to show the acronym hyperlink without special colors or borders, just as plain text.

Is there a way to do this?

1

1 Answer 1

15

Package acronym uses \AC@hyperlink for its links. This can be redefined to locally set option hidelinks:

\documentclass{article}
\usepackage{acronym}
\usepackage{hyperref}[2011/02/05]

\makeatletter
\AtBeginDocument{%
  \renewcommand*{\AC@hyperlink}[2]{%
    \begingroup
      \hypersetup{hidelinks}%
      \hyperlink{#1}{#2}%
    \endgroup
  }%
}
\makeatother

\begin{document}

\ac{foo} and \ac{foo}

\begin{acronym}
\acro{foo}[FB]{FooBar}
\end{acronym}

\end{document}

If you want to get rid of the link entirely:

\documentclass{article}
\usepackage{acronym}
\usepackage{hyperref}[2011/02/05]

\makeatletter
\AtBeginDocument{%
  \renewcommand*{\AC@hyperlink}[2]{#2}%
}
\makeatother

\begin{document}

\ac{foo} and \ac{foo}

\begin{acronym}
\acro{foo}[FB]{FooBar}
\end{acronym}

\end{document}

You must log in to answer this question.

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