because LaTeX matters

Add (Hyper-)Links to PDFs

Adding links to PDFs , both internal and external, certainly only makes sense for digital copies of the file. Nevertheless, they still come in handy, for example for actual WWW-addresses or as direct reference inside a document.

Local references

As usual, you first need the package which handles the links:

\usepackage{hyperref}

This does the job for the moment. The package “hyperref” will automatically insert links wherever you place a citation or reference (\cite{}, \ref{}).

Global references

Referencing to URLs or local files can be done as follows:

\href{url}{text}

Try this:

\href{http://texblog.wordpress.com}{\bf{Blog on Latex Matters}}

Colour references

So far, the references were marked by a colour rectangle around them, which is not very appealing (unless you are using Apple Preview). Here is how you remove the border and if you wish define your own colours for references.

Either add this optional argument to the previous package:

\usepackage[colorlinks]{hyperref}

or use a new line and set the colour:

\usepackage{hyperref}
\hypersetup{colorlinks}

If you want to define your own colours, you will have to use the latter, as the colours are part of the argument of “hypersetup”. But in order to do so, you first need to define colours, which is why you will need the colour-package:

\usepackage{color}

Then you can define different colours you may want to use for your references, e.g.:

Thanks for your e-mail. I moved your comment to this blog post, since the answer may also help others with the same problem. Hope that’s ok with you.
Try loading the url package with the hyphens option. Here is an example:

\documentclass{article}
\usepackage[hyphens]{url}
\usepackage{hyperref}
\begin{document}
Some random text to fill some more space before the url. \url{http://www.very-long-url.com/long/longer/longest}
\end{document}

Did you try the flashmovie package? See the example included in the package for some sample code. In case you are using Mac OSX, it doesn’t seem to work in Preview, you’d need to switch to Adobe Reader.

Hi,
I’m able to insert links using \cite{} and \ref{} and generate a pdf with these links working. However I need to insert signatures into my pdf using Adobe Reader (it’s a PhD thesis).
As soon as I “save as” the pdflatex-generated pdf with the signatures inserted, the next time I open the pdf all of the links do not work.
Any help would be appreciated.

First of all thank for your time and effort. I am have trouble in figuring out start page in pdf reader (Adobe or others). I would like to have my pdf start page from the chapter, after pagenumbering{arabic} i.e. pdf page shall start at page number 1.

Right after:

\pagenumbering{arabic}
\setcounter{page}{1}

I did tried \usepackage[pdfstartpage = some number x]{hyperref}. Since the TOC, list of figures and other contents page number can grow, every time I need to change number ‘x’.

So, I am really looking forward for some auto-mechanism such that provided that line/piece of code and complied, after opened the pdf page (in Adobe reader/Acrobat), it should right away starts from that page.