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?

  • 2
    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 '14 at 13:14

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 – tommy.carstensen Dec 8 '17 at 0:51

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.