Discussion:
custom equation numbering
Ivan Werning
2008-12-14 16:04:30 UTC
Permalink
How do I change an equation number that was chosen automatically from
forcing a particular number or symbol?

That is, I want the analog of \tag in Latex

For example, I have an equation that is numbered "(5)" which is chosen
by default because it comes after "(4)". That's the correct normal
behavior of course. However, I want to break briefly out of the
default and number this one equation "(3')" because it is a variant of
a previous equation numbered "(3)".

Thanks!

-Ivan
Paul A. Rubin
2008-12-14 16:24:07 UTC
Permalink
Post by Ivan Werning
How do I change an equation number that was chosen automatically from
forcing a particular number or symbol?
That is, I want the analog of \tag in Latex
For example, I have an equation that is numbered "(5)" which is chosen
by default because it comes after "(4)". That's the correct normal
behavior of course. However, I want to break briefly out of the default
and number this one equation "(3')" because it is a variant of a
previous equation numbered "(3)".
Well, \tag will work. Stick the cursor in the equation. If it's
already being numbered, M-m n will remove the automatic number. Then
enter '\tag' followed by space, which will create a widget. In the
widget, type '\ensuremath' followed by a space to get a nested widget.
Type "3'" (or "3^\prime" if you're a purist) in the inner widget (no
parentheses). The display in the GUI is, ah, less than esthetically
pleasing, but it comes out right in the DVI. The inner widget is needed
to get you into math mode if you're going to use a superscript.

I'm not sure if there's a more LyXish way to do it.

HTH,
Paul
Neil Hepburn
2008-12-14 17:20:04 UTC
Permalink
Hi Ivan,
Just to follow up on Paul's solution, you can go one step further and
make the equation number automatic. Suppose that you have equation (3)
and you also have a rewritten form of that equation, call it (3'). Do
all of the steps that Paul has indicated, except rather than putting
in the number 3, click on the cross-reference tool in the LyX toolbar.
Then select the equation of interest and then apply. To refer to
equation 3' elsewhere in the paper is a little in-elegant -- insert
the cross reference to point to the original form of the equation,
then go into math mode (inline equation) right after the cross
reference and insert the prime symbol. Now, if you add or delete
equations before the original equation, all of the numbers
automatically update.

-Neil

=============================================
Neil Hepburn, Economics Instructor
Department of Social Sciences, Augustana Faculty
University of Alberta
4901-46 Avenue
Camrose, Alberta T4V 2R3

Phone (780) 679-1588
Post by Paul A. Rubin
Post by Ivan Werning
How do I change an equation number that was chosen automatically
from forcing a particular number or symbol?
That is, I want the analog of \tag in Latex
For example, I have an equation that is numbered "(5)" which is
chosen by default because it comes after "(4)". That's the correct
normal behavior of course. However, I want to break briefly out of
the default and number this one equation "(3')" because it is a
variant of a previous equation numbered "(3)".
Well, \tag will work. Stick the cursor in the equation. If it's
already being numbered, M-m n will remove the automatic number.
Then enter '\tag' followed by space, which will create a widget. In
the widget, type '\ensuremath' followed by a space to get a nested
widget. Type "3'" (or "3^\prime" if you're a purist) in the inner
widget (no parentheses). The display in the GUI is, ah, less than
esthetically pleasing, but it comes out right in the DVI. The inner
widget is needed to get you into math mode if you're going to use a
superscript.
I'm not sure if there's a more LyXish way to do it.
HTH,
Paul
Ivan Werning
2008-12-14 22:20:43 UTC
Permalink
Thanks Neil and Paul. Indeed, using the LaTeX command \tag seems like
the best thing I could find---thanks for the specific tips regarding
math modes and cross referencing, which I guess are good ideas, I had
never thought of, in LaTeX editing as well. One of the greatest things
of LyX is that it still allows entering LaTeX quite easily. I really
value that. Although it would be nice for LyX to allow custom equation
numbering natively, given how standard it is.

-Ivan
Post by Neil Hepburn
Hi Ivan,
Just to follow up on Paul's solution, you can go one step further
and make the equation number automatic. Suppose that you have
equation (3) and you also have a rewritten form of that equation,
call it (3'). Do all of the steps that Paul has indicated, except
rather than putting in the number 3, click on the cross-reference
tool in the LyX toolbar. Then select the equation of interest and
then apply. To refer to equation 3' elsewhere in the paper is a
little in-elegant -- insert the cross reference to point to the
original form of the equation, then go into math mode (inline
equation) right after the cross reference and insert the prime
symbol. Now, if you add or delete equations before the original
equation, all of the numbers automatically update.
-Neil
=============================================
Neil Hepburn, Economics Instructor
Department of Social Sciences, Augustana Faculty
University of Alberta
4901-46 Avenue
Camrose, Alberta T4V 2R3
Phone (780) 679-1588
Post by Paul A. Rubin
Post by Ivan Werning
How do I change an equation number that was chosen automatically
from forcing a particular number or symbol?
That is, I want the analog of \tag in Latex
For example, I have an equation that is numbered "(5)" which is
chosen by default because it comes after "(4)". That's the correct
normal behavior of course. However, I want to break briefly out of
the default and number this one equation "(3')" because it is a
variant of a previous equation numbered "(3)".
Well, \tag will work. Stick the cursor in the equation. If it's
already being numbered, M-m n will remove the automatic number.
Then enter '\tag' followed by space, which will create a widget.
In the widget, type '\ensuremath' followed by a space to get a
nested widget. Type "3'" (or "3^\prime" if you're a purist) in the
inner widget (no parentheses). The display in the GUI is, ah, less
than esthetically pleasing, but it comes out right in the DVI. The
inner widget is needed to get you into math mode if you're going to
use a superscript.
I'm not sure if there's a more LyXish way to do it.
HTH,
Paul
Continue reading on narkive:
Loading...