[Tex/LaTex] Using the same number for repeated use of the same equation

equationslyxnumbering

I'm a LyX beginner so please don't worry about stating the obvious.

I'm numbering equations by section in my document. That's working fine. However, when I refer to the same equation later on in the text I can't see how I can give it its original reference number.

So if y=x+2 is numbered as 4.2.2, I want to be able to give y=x+2 the same number next time I use it. Is there a straightforward way of doing this? I'm assuming I have to sandwich the equations in code of some sort.

I'm using the scrbook (Koma-script) document class. I'm using the modules: Theorems (AMS), Theorems Numbered by Chapter, Number Equations by Section.

The LaTeX preamble is:

\usepackage{microtype}
\usepackage {hyperref}
\usepackage{amsmath} 
\numberwithin{equation}{section}
\setkomafont{captionlabel}{\bfseries}

To date I've been changing the code in my LyX documents using Windows Notepad. Is that the best way of editing code?

Best Answer

Werner provided the real method, here's translated to LyX GUI (I tested this only with the simplest example):

  1. For the first instance of the equation, add a label by right clicking the equation and selecting "Equation label".

  2. The second time, write the equation, and while still in math mode add a TeX code box, by pressing Ctrl + L.

  3. In this code box, write tag{ (the backslash should already be there, at least it was when I tested). This should give you a set of braces with a small box in it.

  4. Choose Insert --> Cross-reference, and select the reference to the first instance of the equation.

A video showing the process, the TeX code menu option was outside the frame: http://www.youtube.com/watch?v=NTqLMO8WS6w