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 sure that this has been asked before, but I don't seem to be able to find the answer.

I need to make a reference to a page. That is, I would like to use \pageref{}. I specifically need to make a reference to an equation that is in \begin{align*} \end{\align}.

When I insert a \label in the align* I get an error. How can I do this?

So I want to do something like this

\documentclass[12pt]{report}
...

Texts

\begin{align*}
e = mc^2\label{eqn}
\end{align*}
...
Text the equation on page \pageref{eqn} is ...

I need to make a page reference to the page that contains E=mc^2.

share|improve this question
1  
align* is intended to not have equation numbers. That is exactly the difference between align* and align. So, use align instead, and use \nonumber for those equations that you don't want an equation number. –  Peter Grill Jun 18 at 4:22
    
@PeterGrill: Ok, I am not good at articulating myself. I need to make a reference to a page (not an equation) that contains only align* enviroments. How do I do that? –  Thomas Jun 18 at 4:23
    
If you are trying to reference a page, why are you trying to \label an equation? I suggest that instead of describing the problem, you compose a fully compilable MWE including \documentclass and the appropriate packages that sets up the problem. That way those trying to help can focus on the solution as opposed to setting up the problem test case, and also makes it clear exactly what the problem is. –  Peter Grill Jun 18 at 4:27
    
@PeterGrill: My question is: How do I refer to a page that contains only text? –  Thomas Jun 18 at 4:27
1  
two glitches in the example: the \end{align} should have align*, and instead of \ref you (said you) want \pageref. –  barbara beeton Jun 18 at 12:51

2 Answers 2

up vote 11 down vote accepted

It suffices to place the \label "anchor" somewhere on the page you need to cross-reference. Just don't place the label inside an environment which, by design, won't take a numbering anchor.

To minimize the chances that an unfortunate page break will happen between the equation and the label (and therefore not getting the page reference right), be sure to place the \label instruction immediately before the equation whose page number you want to cross-reference. As @egreg has pointed out in a comment, that's a safe placement option, because inserting a page break immediately before a display equation isn't a legitimate move for LaTeX.

The following MWE

\documentclass{article}
\begin{document}
\label{page:emc2}  % place the \label instruction immediately before the unnumbered equation
\[  % an unnumbered display-style equation
E=mc^2
\]
\clearpage
A famous equation is shown on page \pageref{page:emc2}.
\end{document}

produces this output on page 2:

A famous equation is shown on page 1.

share|improve this answer
    
Great. Thanks. Simple answer for a simple question. –  Thomas Jun 18 at 4:50
    
The \label should go immediately before the display, since that is not a legitimate page break point. –  egreg Jun 18 at 7:49
    
@egreg - Thanks for this, I'll modify the answer accordingly. –  Mico Jun 18 at 8:14

You can use the standard \label command in disguise:

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\let\pagelabel\ltx@label
\makeatother

\begin{document}
\begin{align*}
E&=mc^2\pagelabel{page:emc2}\\
F&=nd^2
\end{align*}
\clearpage
A famous equation is shown on page \pageref{page:emc2}. 
Which one, you will ask? Indeed, it is a puzzle for the readers
to solve.

\end{document}

However, it's better either to \tag the equation or to number it, for the reason I add in the code above.

share|improve this answer

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.