9

I have a LaTeX document that works fine, but it does give a warning message every time I compile it. Here is the text of the warning message:

LaTeX Warning: Label `' multiply defined.

The name of the label that is multiply defined appears to be an empty string. I am confused about this, but I have had trouble searching for it online because the key element is the empty string, which does not make for a good search term. Does anyone know what this warning message could mean?

I can post details of the document in question as needed, but at this point I have no idea what parts could be important.

Got it. I guess I didn't realize that bibliography items counted as labels - since I never had any intention of referring to them anywhere, I left all of their labels blank initially.

  • 1
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format – texenthusiast Aug 9 '13 at 1:50
  • 1
    A minimal example (or here) is how to determine what parts are important. It might take some work if the original document is long/complicated, but constructing it can sometimes even make the problem obvious to non-experts. – jon Aug 9 '13 at 1:52
  • A label is something that you create in a document. So a web search for the culprit label will not be useful to you. From your description, short of a MWE, you might want to search your document for occurrences of the \label command. In particular, you might have a few \label{} scattered throughout your document. – A.Ellett Aug 9 '13 at 2:15
5

A label is something that you create in a document. So, you'll want to look through your document for something like \label and see how the label has been defined.

The syntax is

 \label{<label-name>}

where <label-name> is something that you create.

If you have multiple empty labels created, such as

\label{}

or something equivalent, then you'll get the error you've reported.

One way to bug-chase this and a generally good practice is to give useful and meaningful names to your labels. For example, if you have an equation, then you can write

\label{eqn:<short description of equation>}

If, for example, the label is for a section introducing the definition of a martingale, then you can write

\label{sec:defn_of_martingale}

By doing this, your labels will be meaningful and easier to understand in your source document. But also, it'll much easier to find duplicate labels.

4

To complete A.Ellett's excellent answer with another possible culprit which I encountered in a report that I'm reviewing. Multiple

\bibitem{}

produce the same warning.

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.