...insert a hyperlink?

Hyperlinks

Inserting a hyperlink is accomplished through the addition of the hyperref package, the documentation can be downloaded here.  This will require the addition of a line like this

\usepackage[<options>]{hyperref}

in the preamble of your tex document. You should make sure the hyperref package is the last package loaded in order to prevent another package from changing the way it behaves. There is an extensive list of options that give you control over your hyperlinks. Some of the critical options are:

  • colorlinks (true or false) sets the colors the links depending on what the hyperlink links to (e.g. files, websites, other parts of the document)
  • linkcolor  to specify the color of normal internal links
  • anchorcolor color for anchor text. Use this if you want a colored box around your hyperlink.
  • citecolor color for links to citations in bibliography
  • filecolor color for links to files
  • breaklinks (true or false) allows a link to be break onto another line.
  • hidelinks to remove colors and borders. Hyperlinks aren't seen.
  • urlcolor color for links to URLs

The focus of this page is on 2 types of links: internal links, which send you from one place in your document to another and links to URLs which send you from the document to a website on the internet.  A typical use will be:

\usepackage[colorlinks=true, linkcolor=blue, urlcolor=orange]{hyperref}

This tells LaTeX that colors will be used for links: blue for internal links and orange for links to websites.

Here is a simple template to illustrate hyperlinks: Hyperlinks (tex) Hyperlinks (PDF)

Leave a Reply

Your email address will not be published. Required fields are marked *

AlphaOmega Captcha Classica  –  Enter Security Code