Possible Duplicate:
Remove ugly borders around clickable crossreferences and hyperlinks

When I generate PDF, a red border surround all links (internal and external).

• Which package draws this borders around links automatically ?
• How I can change this behavior, so link text become blue, instead of putting in box?
-

marked as duplicate by Loop Space, Count Zero, lockstep, egreg, topskipJun 5 '12 at 6:30

-1: Please do your research more thoroughly before posting a question here. It is trivial to go through the packages you're using and single out the one responsible for the borders, hyperref. Once you've figured that out, you find all the options you need in the hyperref manual. –  doncherry May 31 '12 at 7:16
@doncherry Red boxes are generated automatically without using a special package. And that was the question, I never used \hyperref. –  PHPst May 31 '12 at 7:23
@Reza: I Disagree, this generates no boxes: \documentclass{article} \begin{document} \section{Foo}\label{Foo}\ref{Foo} \end{document}. Hence, your document class (≠ article) might be loading hyperref. As for external links, which macro do you use? It must be provided by some package as well. –  doncherry May 31 '12 at 7:38
@doncherry You are right. I found source of that issue, thanks –  PHPst May 31 '12 at 7:47

The hyperref package provides all of the functionality you seek. Here's a minimal example:

\documentclass{article}
\usepackage{xcolor}% http://ctan.org/pkg/xcolor
\usepackage{hyperref}% http://ctan.org/pkg/hyperref
\hypersetup{
urlcolor=green!70!black
}
\begin{document}
\section{First section}\label{firstsec} Visit \href{http://tex.stackexchange.com}{TeX.SX}.
\section{Second section}See Section~\ref{firstsec}.
\end{document}


colorlinks=true provides coloured links (rather than bordered links), after which you can specify a variety of colours, depending on the link type. From the hyperref documentation:

• linkcolor: default is red; Colour for normal internal links.
• anchorcolor: default is black; Colour for anchor text.
• citecolor: default is green; Colour for bibliographical citations in text.
• filecolor: default is cyan; Colour for URLs which open local files.
• menucolor: default is red; Colour for Acrobat menu items.
• runcolor: default is filecolor; Colour for run links (launch annotations).
• urlcolor: default is magenta; Colour for linked URLs.
• allcolors: set all colour options (without border and field options).
-