0
\newenvironment{pfof10}[1]{\vspace{1ex}\noindent{\bf Proof of
Theorem $\ref{n}$}\hspace{0.5em}}{\hfill\qed\vspace{1ex}}
\begin{pfof10}
\\
soooooooo
\begin{align}\label{part3}
x&=y \\ 
\end{align}

 We know there exists a unique solution of $(\ref{part3})$
\end{pfof10}
\end{document}

Here I am getting an error:

! Package amsmath Error: Multiple \label's: label 'dif' will be lost.

See the amsmath package documentation for explanation. Type H for immediate help. ...

l.887 ...x&=y\end{align}

  • 1
    Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Martin Schröder Nov 23 '13 at 21:41
  • 1
    i've looked at the edits. the original input code for the example has been changed. it looks like the example as now shown is not actually the equation for which the error was reported. please check and update the question with a fully (non-)working example as requested by martin. – barbara beeton Nov 23 '13 at 22:27
1

Your definition of pfof10 says it has an argument, but you use it without any argument. This will cause LaTeX to go looking for one and take the first thing it finds. In your example, that is \\. This alone should not cause any error, but it could give unexpected results.

You also include a \ref{n} in the code. This is fine if you are proving a theorem that has a \label{n}. But this makes your environment good for only a single use, which hardly makes it worth the trouble to define it.

The error you have shown us indicates that you have labeled more than one equation with \label{dif}. No such thing occurs in your example, so you will have to search for those in whatever file actually resulted in that error.

In an environment like you are defining, which is expected to start a new paragraph, you should begin it with \par to end any current paragraph. That way it still works even if you forget to put a blank line before it.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.