Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 8 down vote accepted

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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.