Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using winedt 6.0 and a SIAM template in my document. When I compile, I get an error message stating:

! SIAM Label Error: There were multipy-defined labels

Correct multiply-defined labels.
Type H <return> for immediate help.
...
l.14 \newlabel{L2norm}{{2.2}{3}}

Based upon the last line, I presume the duplicate label is L2norm. Am I correct to assume this? I followed the advice on this post to find this multiply defined label. As it turns out, I used to have a label 'L2norm', but have since changed it to 'L2normerr'. No other labels are have this string and I haven't found any other duplicate labels (just using a <ctrl-f> search). I'm sure I'm misunderstanding something, but I'm not sure what... Please help! :)

share|improve this question
1  
the job is probably using an old .aux file, created before you changed the label. delete the offending .aux file, or rerun the job (twice) and the error message should go away. if it doesn't, the advice in your cited post is useful to help you find the straggler. –  barbara beeton Dec 13 '12 at 18:18
    
@barbarabeeton: That worked! Magically, everything is fine now. I'm curious why the old .aux file didn't just get overwritten? Is there a way to make sure it creates a new .aux file each time? –  Paul Dec 13 '12 at 20:14
add comment

1 Answer

up vote 4 down vote accepted

the job is probably using an old .aux file, created before you changed the label. delete the offending .aux file, or rerun the job (twice) and the error message should go away. if it doesn't, the advice in the post you cited is useful to help you find the straggler.

why is this happening? when a label is changed between runs, the next latex run begins by reading in the existing .aux file (with the old label). only then does it create a new .aux file (with the new label), to be read in on the next run. so the values of labels (and other "saved" material, like the table of contents) are always one run behind.

perhaps you've noticed that there's no table of contents, and cross-references are shown as ?? after your first run. that's because there's no .aux file available until that run is completed. if you really want to be sure your labels are correct, you can restart the cycle by deleting all .aux (and .toc, .lof and .lot) files when you make changes that will affect their values. when you see ?? in your output, that's a strong reminder that another run is needed.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.