In scientifical writing, I find that the label system such as \label{eq:eqnum}, \label{eq:eqmeaning}, \label{thm:thmnum}, \label{thm:thmmeaning}, \label{thm:thm_name} is not satisfactory.

  1. For the number version label system, e.g., \label{eq:eqnum}, when I insert/delete some equation, then the equation/Theorem number changes, and it is a mess to track the number.
  2. For the "meaning-name" label system, there might be too many equations with similar meaning, thus is hard to distinguish with each other at an acceptable length.

So is there any principle or suggestion for label system?

  • Imho \label{eq:eqmeaning} is the correct system. And if it doesn't work for you you should perhaps reconsider the equations. If they are all so similar you can probably remove some without loosing content .... – Ulrike Fischer May 10 '16 at 13:43
  • @UlrikeFischer: for shorter (<100 pages) documents I agree, and it's all about finding short catchy eqmeaning labels. But at some point, an additional grouping becomes necessary. – ojdo May 10 '16 at 14:37
  • 2
    Using the equation number in label is just wrong. the whole point of \label is that you don't have to worry about the numbers at all, the system sorts them out – David Carlisle May 10 '16 at 20:01
  • 2
    do you really need to reference all these? you only need to label the equations you reference, it really doesn't matter what the label string is you can use \label{x}, \label{foo}, ... it really makes no difference. – David Carlisle May 10 '16 at 20:07

If your labelled objects exhibit any kind of topical grouping, you can introduce name spaces by using multiple : in the label string: \label{eq:category:meaning}. If those categories are chosen carefully, they tend to scale gracefully even to large (book-sized) documents.

However, I would advise against simply using the chapter or section name as the category, but rather a common topic shared by the labelled objects. That way, even if the document structure changes dramatically, the labels keep their proper meaning.

| improve this answer | |

Using the printed number in the \label string is always wrong, it undermines the whole reason for the \label/\ref system that numbering should be automatic.

Using a scheme like eq:meaning is useful if you find it useful, but less so if you find thinking of short "meanings" difficult.

Personally I'd use \usepackage{showkeys} while drafting so the label names are visible, and not use \label at all until I needed to reference a particular equation or theorem or whatever. At that point if the equation hasn't got a label already just add one: anything will do \label{eq:some-meaning} if you want, or just \label{x}: the worst that can happen is that you accidentally use a label that's already used but latex will warn you of that as soon as you process the document.

| improve this answer | |
  • +1 especially for the recommendation not to add \labels on bulk, unless it is clear that all of them will have to be \refed later. – ojdo May 11 '16 at 11:18

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.