# What does 'Label multiply defined' mean?

I'm trying to compile this book https://forja.rediris.es/projects/guia-wxmaxima/ I'm using MiKTeX, TeXstudio, and in the build options I have the default compiler pdfLaTeX. So my question is, why there are a lot of errors that say Label '...' multiply defined?

• That are warnings and no errors and refer to the environments in which the labels are defined. Some environments read their contents twice, the reason why you get a multiplied defined warning. However, have a look into the log file it prints the names of such labels. You can have a look if the are really multiply defined or not.
– user2478
May 31, 2014 at 13:14
• In this context, “Label multiply defined” means “The same label has been given multiple definitions.” Rhymes with “Cult, ah see!” not “stultify.” Nov 15, 2021 at 2:16

Because the author hasn't been paying attention to the labels he has used, or to the compile warnings.

The warning means that the same label has been used several times in the same document. For example, he has \label{chap:aritmetica} in three separate chapters, algebra.tex, aritmetica.tex and calculo.tex. This can potentially lead to wrong cross references.

There are two things to do to fix the problem:

1. Find out which labels are used several times (read the log), and modify all but one of them, so all labels are unique.

2. Find where those labels are used, and make sure the cross references point to the correct chapter (or whatever it is). To avoid reading the whole thing, use the fact that TeXstudio lets you search in all open documents. Open all the chapter-files in TeXstudio at the same time, go to Edit --> Searching --> Find dialog, and choose Open documents instead of Current document. Then search for the label in questions, for example chap:aritmetica, and see where it has been used in a \ref (or similar command).

(I got a lot of other errors, and the document wouldn't compile at all, but you asked only about the labels.)

• To anyone reading this. It can also be caused by \input being used more than once on a tex file, which contains a \label. I spent time looking for a duplicate \label, when in fact I should have been looking for a duplicate \input Dec 8, 2017 at 0:51
• Is there any automatic way to rename labels?
– skan
Aug 23, 2019 at 12:32
• @skan Don't know, you could always ask a new question about it. Could of course be that someone has written a script to do that. Aug 23, 2019 at 12:36

An additional note to @Torbjørn T.'s answer is it may be the case of multiple \includes of a .tex file which contains the label in question, not multiple \labels per se.

I was getting the same error even when using a very eccentric label for the sake of debugging the issue, which was really strange. Even searching for the label across the .tex files in my project didn't find any other re-usages of the same label.

At the end, the problem turned out to be multiple \input statements of the same .tex file that has the label defined therein. In my case, it could be solved easily by omitting the other inclusion of the same file, but if one wants to reuse the same .tex file in many places for some reason, it would be trickier to solve.

I hope this helps someone out there.

Following the multiple input theme, mine was caused by using 2 \bibliography{...} commands and 2 \bibliographystyle{...} commands when merging two papers together. Removing the old pair solved it.