TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In LaTeX's article documentclass, how do I (using hyperref, if I understood right) get email links to show in color (say, red) when I type them in the middle of a paragraph?

share|improve this question
up vote 3 down vote accepted

Depending on your preference, you could do any one of the following:

  1. If you just want to typeset it in colour, without any linking capabilities, you could use

    \usepackage{xcolor}% http://ctan.org/pkg/xcolor
    My email address is {\color{red} who@cares.com}.

    Regular email in red

    Note the scoping of the \color{...} by putting it within { }, otherwise all the text following the command will be typeset in red. Compiling this may cause some unwanted linking of @cares.com, while leaving who unlinked.

  2. The hyperref package does allow linking through a number of commands. You're probably interested in using the \url{...} command, since it takes care of the tricky @ that has to be escaped in order to be typeset. It will also take care of breaking the email address (or url) across lines, if needed.

    ]{hyperref}% http://ctan.org/pkg/hyperref
    My email address is \url{who@cares.com}.

    Email address typeset using hyperref's url command

    This is also not entire accurate if you want to hyperlink to an email (via a mailto protocol).

  3. Using hyperref's \href{<url>}{<text>} provides the correct action:

    ]{hyperref}% http://ctan.org/pkg/hyperref
    My email address is \href{mailto:who@cares.com}{who@cares.com}.

    Email address using hyperref and mailto: protocol

    You can also typeset the email address in a different shape using, say, \texttt{who@cares.com}. Then it will be typeset similarly to that of option 2.

share|improve this answer

You can use the options colorlinks=true and urlcolor=<color>:





share|improve this answer
Ah, there's my mistake. I just typed the email in text (PDF reader recognized it as a link nevertheless). I didn't put in \url or \href{...} – Rook Aug 28 '11 at 2:28

Your Answer


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.