# Incorrect formatting when cross-referencing equations

I am having trouble correctly formatting cross-referenced equations.

When I reference an equation I would like the equation number to appear on the far right-hand side of the page, just as the regular equation numbers are formatted. Unfortunately, I am not sure how to achieve this.

Here is an example of what I have tried.

\section{Introduction}

$$(x+y)^2 = x^2 + 2xy + y^2 \label{I.1}$$

\section{Results}

\begin{equation*}

(x+y)^2 = x^2 + 2xy + y^2 \eqref{I.1}

\end{equation*}


This gives a reference number that comes directly after the equation. I know there are functions such as \quad and \qquad to manually space things, but these don't put it over far enough. Plus I feel like there is a much better way to achieve this that I am not aware of.

So how do I get my reference number to the far right side?

• Use \tag as in \tag{I.1}, but why are you trying to number manually your questions? Let LaTeX do the job. Feb 3 '15 at 2:36
• the usual default is for the equation numbers to be flush against the right margin, so something unusual is going on here. please extend your example to be compilable, beginning with the \documentclass and ending with \end{document}. also, there shouldn't be any blank lines between $$...$$. Feb 3 '15 at 2:38

Don't leave blank lines inside math mode (equation environment etc). You can use \tag{\ref{I.1}} to get the equation number.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\section{Introduction}

$$\label{I.1} (x+y)^2 = x^2 + 2xy + y^2$$

\section{Results}

$$(x+y)^2 = x^2 + 2xy + y^2 \tag{\ref{I.1}}$$
\end{document}


Aside, it is not a good practice to use numbers in labels, use some thing you remember and meaningful.

• Why equation* and not just equation for the second equation? Logically it males more sense to have a numbered environment for something that is going to receive a number. Feb 3 '15 at 2:39
• @GonzaloMedina I don't know!. I assumed that the OP wants to reproduce the number of first equation in the second equation, may be he wants to reproduce it again.
– user11232
Feb 3 '15 at 2:41
• I understand that. What I mean is that it would be better (from a logical point of view, at least) to use equation` (without star) for the second equation. Feb 3 '15 at 2:54
• @GonzaloMedina Oh! Now I got it. Yes I agree. Will change.
– user11232
Feb 3 '15 at 2:55
• Maybe I've got this all wrong, I would like to list the same equation in two different parts of my paper. If I use \equation in both instances it will give the equation two different numbers when I would like to use the equation number LaTeX gave it in the first instance. This is why I thought I had to use \equation* and manually insert a reference for the second instance. Am I wrong?
– FofX
Feb 3 '15 at 2:56