# How to change style of hyperlinks within PDF published from org-mode document?

I'm exporting (publishing) an org-mode document to PDF, and the results look great except for the hyperlinks. They look terrible.

Hyperlinks to the Web look the same, only with a pale blue outline. How can I control the style of links in the exported PDF document? (I don't know LaTeX, but can make simple configuration changes in LaTeX if necessary).

Hyperlinks in pdfs exported from org documents are generated by the LaTeX hyperref package. This package is included by default, and options can be set in the customize interface for `org-latex-default-packages-alist`.

For example, adding the option `colorlinks=true` to the entry for hyperref will switch from boxed links to coloured links. There are quite a few options you can set, listed in the hyperref manual.

• This is great! Thank you, that helped immensely. – Sue D. Nymme Jun 3 '15 at 17:14

While the previous answers are helpful, I'll add a bit more of an explicit recipe for Org mode.

By default, Org mode adds a rather unhelpful `hypersetup` section. You can prevent this addition by adding the following line to your `.emacs` file:

``````(customize-set-value 'org-latex-with-hyperref nil)
``````

In addition, if you want to pass any options to `hyperref` or `url` (which is loaded automically by `hyperref`), then you can use a command of the form (notice the escaped backslash):

``````(add-to-list 'org-latex-default-packages-alist "\\PassOptionsToPackage{hyphens}{url}")
``````

This particular command directs the `url` package to break long URLs at the end of the page over hyphens.

Then, in the Org document itself, we can add the following lines:

``````#+LaTeX_HEADER: \usepackage[x11names]{xcolor}
``````

The first line adds the `xcolor` package with X11 color names, and the second line specifies several options for the `hyperref` package, with the relevant option for this question being `colorlinks = true`.

See the Package Options section of the hyperref documentation, and the Colors By Name section of the xcolor documentation for more information on the available `hyperref` settings and X11 color names, respectively.

Here's what worked for me.

``````\usepackage{xcolor}
\PassOptionsToPackage{hyperref,x11names}{xcolor}
\usepackage{tocloft}
``````

I know this is old and the existing answers are already great. But in case anyone is searching for this and needed a bit more control, here's how to change the `hyperref` template.

``````(customize-set-value 'org-latex-hyperref-template "
\\hypersetup{\n pdfauthor={%a},\n pdftitle={%t},\n pdfkeywords={%k},
``````

The format elements, as found in `ox-latex.el`:

``````  %a for AUTHOR keyword
%t for TITLE keyword
%s for SUBTITLE keyword
%k for KEYWORDS line
%d for DESCRIPTION line
%c for CREATOR line
%l for Language keyword
%L for capitalized language keyword
%D for DATE keyword
``````