Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am wondering how I can link an equation in LaTeX, I mean when I click on the link then I'll be directed to that specific equation.

share|improve this question
    
I recommend you to take a look at the book LaTeX on WikiBooks which covers many of these basic questions. The following part fits your needs: en.wikibooks.org/wiki/LaTeX/Labels_and_Cross-referencing –  Harold Cavendish Mar 30 '11 at 17:22
add comment

2 Answers 2

up vote 15 down vote accepted

You can use the standard \label{key}, \ref{key} (or, if amsmath has been loaded, \eqref{key} to automatically include the parenthesis in the reference) mechanism; \label assigns a "key" (a string of characters and/or digits and/or punctuation) to the element (a sectioning command, one of the environments equation, figure, table, the theorem-like structures, etc.); \ref typesets the "number" associated to the key. There's also \pageref{key} to typeset the number of the page where the \label command was used.

The hyperref package will automatically generate customizable hyperlinks in your document.

A little example:

\documentclass{article}
\usepackage{amsmath}
\usepackage{hyperref}

\begin{document}

\begin{equation}\label{eq:test}
  a=b
\end{equation}
\eqref{eq:test}

\end{document}

You'll have to compile twice to generate the cross-references.

share|improve this answer
    
The OP wants a clickable link. So the hyperref package is required in addition. –  Martin Scharrer Mar 30 '11 at 17:19
    
@Martin Scharrer: you are right, I'll add the hyperref package to my answer. –  Gonzalo Medina Mar 30 '11 at 17:26
    
@Gonzalo Medina thanks so much. how i can change the color of hyper-linked equation from red to green? –  MON Mar 30 '11 at 17:57
    
@MON: you can use \usepackage{xcolor}\hypersetup{linkbordercolor=green}. The hyperref documentation (follow the link in my answer) explains many other options; here is a summary of the available options: mirrors.ctan.org/macros/latex/contrib/hyperref/doc/options.pdf –  Gonzalo Medina Mar 30 '11 at 18:02
    
There's a small typo in your answer : you type \eqre{key} instead of \eqref{key} –  Frédéric Grosshans Mar 30 '11 at 18:18
show 2 more comments

you need to use an environment -- like equation or many of the environments in amsmath -- that can be numbered and take a \label. then using the hyperref package and \ref{label-value} (or, better, amsmath's \eqref) there will be hyperlinks in your pdf output.

share|improve this answer
add comment

Your Answer

 
discard

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.