bieniasz | 8 Aug 15:34 2013
Picon

formula numbering


Hi,

I am writing a book using LyX, and I have a question regarding
the formula numbering. An exclusive way to add and reference the formula 
numbers seems to be via "equation labels". This works, but appears 
rather irritating when one has to invent unique names for hundreds of
equations. Is there no simpler way? I do not quite understand why these
labels must be used, in the situation when LyX seems to keep track
of every new equation all the time, and updates the equation numbers 
automatically. It would be much easier just to refer to the various 
equations by these formula numbers, without having
to use additional labels. Are there no plans to introduce such an
improvement into LyX?

Leslaw

Richard Heck | 8 Aug 17:04 2013

Re: formula numbering

On 08/08/2013 09:34 AM, bieniasz wrote:
>
> Hi,
>
> I am writing a book using LyX, and I have a question regarding
> the formula numbering. An exclusive way to add and reference the formula
> numbers seems to be via "equation labels". This works, but appears
> rather irritating when one has to invent unique names for hundreds of
> equations. Is there no simpler way? I do not quite understand why these
> labels must be used, in the situation when LyX seems to keep track
> of every new equation all the time, and updates the equation numbers
> automatically. It would be much easier just to refer to the various
> equations by these formula numbers, without having
> to use additional labels.

What happens, then, when you add a new equation somewhere in
the middle of the document?

> Are there no plans to introduce such an improvement into LyX?

There has often been talk about automatic labelling, so that the
equation would have its own "magic" label, so to speak, and you
could reference it without needing to make up a label. But no one
has found the need pressing enough to do it.

Still, making up a label isn't that hard, and it can make it easier
to remeber which equation you want to reference later. You can
of course just use numbers if you wish.

Richard
(Continue reading)

bieniasz | 8 Aug 18:06 2013
Picon

Re: formula numbering

Richard Heck <rgheck <at> lyx.org> writes:

> What happens, then, when you add a new equation somewhere in
> the middle of the document?

This is what LyX already does - it updates automatically the equation
numbers. My point is why one cannot use these numbers for referencing
the equations in the text, since they are already there, up-to-date.

> There has often been talk about automatic labelling, so that the
> equation would have its own "magic" label, so to speak, and you
> could reference it without needing to make up a label. But no one
> has found the need pressing enough to do it.

This is difficult to understand for me. LaTeX users are primarily
scientists who write scientific texts. In such text one ALWAYS
refers to equations by numbers, and not by any peculiar labels.

> Still, making up a label isn't that hard, and it can make it easier
> to remeber which equation you want to reference later. You can
> of course just use numbers if you wish.

Well, yes and no. If I use my own labels, like
E1, E2, E3 etc., then I am in trouble when I need to add something
between E1 and E2, let's say. The problem is that user-defined labels
are not automatically updated, whereas the real equation numbers are.
Hence, I have a mess in which labels are in no clear relation to
the numbers.

So, in conclusion, I daresay the LaTeX/LyX system for equation numbering
(Continue reading)

curtis osterhoudt | 8 Aug 19:19 2013
Picon

Re: formula numbering

I *like* the way LyX handles it. I give my equations labels which _make_sense_ to me as a physicist---like "Poisson-Eqn"---not having to coddle to the structure of the paper. If I want to refer to the equation 20 pages later, I don't have to go back and find the number and adapt the label or the references, nor do I have to worry about renumbering if anything changes. The cross-reference system built into Lyx/LaTeX takes care of that. 

   My only objection is the (perhaps apocryphal, but lodged in my brain since I've used LyX for about a decade now) requirement/suggestion to put dashes in place of spaces in one's labels.



From: bieniasz <nbbienia <at> cyf-kr.edu.pl>
To: lyx-users <at> lists.lyx.org
Sent: Thursday, August 8, 2013 8:06 AM
Subject: Re: formula numbering

Richard Heck <rgheck <at> lyx.org> writes:

> What happens, then, when you add a new equation somewhere in
> the middle of the document?

This is what LyX already does - it updates automatically the equation
numbers. My point is why one cannot use these numbers for referencing
the equations in the text, since they are already there, up-to-date.

> There has often been talk about automatic labelling, so that the
> equation would have its own "magic" label, so to speak, and you
> could reference it without needing to make up a label. But no one
> has found the need pressing enough to do it.

This is difficult to understand for me. LaTeX users are primarily
scientists who write scientific texts. In such text one ALWAYS
refers to equations by numbers, and not by any peculiar labels.

> Still, making up a label isn't that hard, and it can make it easier
> to remeber which equation you want to reference later. You can
> of course just use numbers if you wish.

Well, yes and no. If I use my own labels, like
E1, E2, E3 etc., then I am in trouble when I need to add something
between E1 and E2, let's say. The problem is that user-defined labels
are not automatically updated, whereas the real equation numbers are.
Hence, I have a mess in which labels are in no clear relation to
the numbers.

So, in conclusion, I daresay the LaTeX/LyX system for equation numbering
needs a reasonable revision. If there are any LyX programmers out there,
please do something about this!!!

Leslaw




Richard Heck | 8 Aug 19:24 2013

Re: formula numbering

On 08/08/2013 01:19 PM, curtis osterhoudt wrote:
I *like* the way LyX handles it. I give my equations labels which _make_sense_ to me as a physicist---like "Poisson-Eqn"---not having to coddle to the structure of the paper. If I want to refer to the equation 20 pages later, I don't have to go back and find the number and adapt the label or the references, nor do I have to worry about renumbering if anything changes. The cross-reference system built into Lyx/LaTeX takes care of that. 

   My only objection is the (perhaps apocryphal, but lodged in my brain since I've used LyX for about a decade now) requirement/suggestion to put dashes in place of spaces in one's labels.

Yes, LaTeX regards the space as separating tokens, and as things now are labels get entered as raw LaTeX, not as something that gets processed by LyX. So no spaces. That, however, would be easy to fix.

Richard

Alex Vergara Gil | 9 Aug 15:42 2013
Picon

Re: formula numbering

El Jueves, 08 de Agosto de 2013 12:24 p.m., Richard Heck escribió:

 
On 08/08/2013 01:19 PM, curtis osterhoudt wrote:
I *like* the way LyX handles it. I give my equations labels which _make_sense_ to me as a physicist---like "Poisson-Eqn"---not having to coddle to the structure of the paper. If I want to refer to the equation 20 pages later, I don't have to go back and find the number and adapt the label or the references, nor do I have to worry about renumbering if anything changes. The cross-reference system built into Lyx/LaTeX takes care of that. 

   My only objection is the (perhaps apocryphal, but lodged in my brain since I've used LyX for about a decade now) requirement/suggestion to put dashes in place of spaces in one's labels.

Yes, LaTeX regards the space as separating tokens, and as things now are labels get entered as raw LaTeX, not as something that gets processed by LyX. So no spaces. That, however, would be easy to fix.

Richard
I have written my MSc thesis in LyX and the way references are handled helps me a lot, but I got only one suggestion: when I set my own labels LyX also asigns a number to the equation which is automatically changed but doesn´t correspond to the "real" equation number that appears in the final text, so when I finally got about 120 pages written I detect one wrong equation and I have to spend a few time to detect which equation is in the LyX document because I didn´t find the equation 2.4 instead it was equation 17. So I think this behaviour is wrong and must be fixed.
 
Best Regards
Alex
Richard Heck | 9 Aug 15:59 2013

Re: formula numbering

On 08/09/2013 09:42 AM, Alex Vergara Gil wrote:
El Jueves, 08 de Agosto de 2013 12:24 p.m., Richard Heck escribió:

 
On 08/08/2013 01:19 PM, curtis osterhoudt wrote:
I *like* the way LyX handles it. I give my equations labels which _make_sense_ to me as a physicist---like "Poisson-Eqn"---not having to coddle to the structure of the paper. If I want to refer to the equation 20 pages later, I don't have to go back and find the number and adapt the label or the references, nor do I have to worry about renumbering if anything changes. The cross-reference system built into Lyx/LaTeX takes care of that. 

   My only objection is the (perhaps apocryphal, but lodged in my brain since I've used LyX for about a decade now) requirement/suggestion to put dashes in place of spaces in one's labels.

Yes, LaTeX regards the space as separating tokens, and as things now are labels get entered as raw LaTeX, not as something that gets processed by LyX. So no spaces. That, however, would be easy to fix.

Richard
I have written my MSc thesis in LyX and the way references are handled helps me a lot, but I got only one suggestion: when I set my own labels LyX also asigns a number to the equation which is automatically changed but doesn´t correspond to the "real" equation number that appears in the final text, so when I finally got about 120 pages written I detect one wrong equation and I have to spend a few time to detect which equation is in the LyX document because I didn´t find the equation 2.4 instead it was equation 17. So I think this behaviour is wrong and must be fixed.

Do you remember what document class, etc, you were using? It sounds like it set "number equations by section", and the layout file did not know about that.

Richard

Richard Heck | 8 Aug 19:32 2013

Re: formula numbering

On 08/08/2013 12:06 PM, bieniasz wrote:
> Richard Heck <rgheck <at> lyx.org> writes:
>
>> What happens, then, when you add a new equation somewhere in
>> the middle of the document?
> This is what LyX already does - it updates automatically the equation
> numbers. My point is why one cannot use these numbers for referencing
> the equations in the text, since they are already there, up-to-date.

What you really want is the auto-labelling that I described, it seems to 
me: Equations act as if they have labels associated with them, but the 
user does not actually see the label.

Thinking about it for a bit, I think this might not be that hard to do 
just for equations. When we've thought about it in the past, we've 
included sections, chapters, and so forth, and then it is harder.

>> There has often been talk about automatic labelling, so that the
>> equation would have its own "magic" label, so to speak, and you
>> could reference it without needing to make up a label. But no one
>> has found the need pressing enough to do it.
> This is difficult to understand for me. LaTeX users are primarily
> scientists who write scientific texts. In such text one ALWAYS
> refers to equations by numbers, and not by any peculiar labels.

Of course. But when actually writing LaTeX (as opposed to LyX), one uses 
labels, since one wouldn't want to have to change the reference just 
because an equation gets moved.

As Curtis said, too, giving equations, sections, etc, meaningful labels 
makes it easier to figure out which one to reference later. So that is 
what most of us do. Indeed, it isn't really true that one always refers 
to equations by number. In my own papers, particular important equations 
(or formulae) often have labels and not just numbers. E.g., (Sat).

> So, in conclusion, I daresay the LaTeX/LyX system for equation 
> numbering needs a reasonable revision. If there are any LyX 
> programmers out there, please do something about this!!!

As always with open source, it's a question of time and bodies. Those of 
us who work on this just haven't found the need pressing.

Richard

Guenter Milde | 19 Aug 14:56 2013
Picon

Re: formula numbering

On 2013-08-08, bieniasz wrote:
> Richard Heck <rgheck <at> lyx.org> writes:

>> What happens, then, when you add a new equation somewhere in
>> the middle of the document?

> This is what LyX already does - it updates automatically the equation
> numbers. My point is why one cannot use these numbers for referencing
> the equations in the text, since they are already there, up-to-date.

But how do you find out the up-to-date number of the equation in chapter
3 you want to reference in chapter 14?

...

> LaTeX users are primarily
> scientists who write scientific texts. In such text one ALWAYS
> refers to equations by numbers, and not by any peculiar labels.

Reference by numbers is used in the printout, but reference by label is used
in all LaTeX source documents.

In the printed text, I usually use a description of the formula + the
reference number so that the reader can look it up if required but generally
does not need to: 

  The incident radiation is absorbed and distributes in the sensor layer
  by means of heat conduction (Equations [15] and [16]) resulting in a
  time-dependent temperature field T(\xyz,t).

>> Still, making up a label isn't that hard, and it can make it easier
>> to remeber which equation you want to reference later. You can
>> of course just use numbers if you wish.

> Well, yes and no. If I use my own labels, like
> E1, E2, E3 etc., then I am in trouble when I need to add something
> between E1 and E2, let's say. The problem is that user-defined labels
> are not automatically updated, whereas the real equation numbers are.
> Hence, I have a mess in which labels are in no clear relation to
> the numbers.

But IMO, the even bigger problem is, if you insert a new formula between
E1 and E2 but continue to use E15 for new references to the "heat
equation" (or whatever) which is now E16!!!

> So, in conclusion, I daresay the LaTeX/LyX system for equation numbering
> needs a reasonable revision. If there are any LyX programmers out there,
> please do something about this!!!

I dare to say that the label/reference system is one of the main
advantages of LaTeX (and LyX) for scientific writing. It may be more
complicated to begin with but that effort pays as soon as you write more
than 10 equations in one paper, say.

Günter

Jerry | 21 Aug 05:27 2013
Picon

Re: formula numbering


On Aug 19, 2013, at 5:56 AM, Guenter Milde <milde <at> users.sf.net> wrote:

> On 2013-08-08, bieniasz wrote:
>> Richard Heck <rgheck <at> lyx.org> writes:
> 
>>> What happens, then, when you add a new equation somewhere in
>>> the middle of the document?
> 
>> This is what LyX already does - it updates automatically the equation
>> numbers. My point is why one cannot use these numbers for referencing
>> the equations in the text, since they are already there, up-to-date.
> 
> But how do you find out the up-to-date number of the equation in chapter
> 3 you want to reference in chapter 14?
> 
> ...
> 
>> LaTeX users are primarily
>> scientists who write scientific texts. In such text one ALWAYS
>> refers to equations by numbers, and not by any peculiar labels.
> 
> Reference by numbers is used in the printout, but reference by label is used
> in all LaTeX source documents.
> 
> In the printed text, I usually use a description of the formula + the
> reference number so that the reader can look it up if required but generally
> does not need to: 
> 
>  The incident radiation is absorbed and distributes in the sensor layer
>  by means of heat conduction (Equations [15] and [16]) resulting in a
>  time-dependent temperature field T(\xyz,t).
> 
>>> Still, making up a label isn't that hard, and it can make it easier
>>> to remeber which equation you want to reference later. You can
>>> of course just use numbers if you wish.
> 
>> Well, yes and no. If I use my own labels, like
>> E1, E2, E3 etc., then I am in trouble when I need to add something
>> between E1 and E2, let's say. The problem is that user-defined labels
>> are not automatically updated, whereas the real equation numbers are.
>> Hence, I have a mess in which labels are in no clear relation to
>> the numbers.
> 
> But IMO, the even bigger problem is, if you insert a new formula between
> E1 and E2 but continue to use E15 for new references to the "heat
> equation" (or whatever) which is now E16!!!
> 
> 
>> So, in conclusion, I daresay the LaTeX/LyX system for equation numbering
>> needs a reasonable revision. If there are any LyX programmers out there,
>> please do something about this!!!

I daresay that all of this would be much easier if LyX had a _graphical_ equation browser, built in to the
Outline tool. By default, equations would be organized by section, subsection, etc., so that you could in
most cases find the equation that you want to reference by the most natural way--clicking on the section
that you recall it being in, seeing a rendering of the equations in a scrollable list, then clicking once to
insert the reference at the cursor location. The rendered equation (in the list) would still be
immediately recognizable in most cases even if only a part of it were visible (without expanding the
Outline window a lot). Of course, the graphical equation browser would also be available in the existing
equation list in the Outline.

And somewhat separately, it would sometimes be nice to have multiple instances of the Outline so that one
would not have to switch between list types as often.

Jerry
> 
> I dare to say that the label/reference system is one of the main
> advantages of LaTeX (and LyX) for scientific writing. It may be more
> complicated to begin with but that effort pays as soon as you write more
> than 10 equations in one paper, say.
> 
> Günter
> 


Gmane