I receive annoying warnings about multiply defined labels when I use \ifthispageodd and addmargin in the same document. I've made the following minimal test case to demonstrate this:



Starting with the second latex run, I get the following warning:

LaTeX Warning: Label `1' multiply defined.

Looking at the aux file, this warning comes as no surprise:


Since it is only a warning, I could choose to ignore it but I'm wondering what's at fault here. It seems that the addmargin environment is the perpetrator, because when I remove it, the warning vanishes and if I add another one, I get two warnings (and three \new@tpo@label lines in the aux file).

But then again, when I remove the \ifthispageodd line, the addmargin environment stops emitting any \new@tpo@label lines into the aux file.

Am I using these commands wrong or is this a bug in KOMA/scrextend?


1 Answer 1


After reporting this, the KOMA-Script author fixed the bug. Since KOMA-Script prerelease 3.23.2605 the aux file of your example has only one \new@tpo@label{1}{1}. The warning about multiply defined labels does not longer occur.

  • Awesome! The commit you mentioned in your comment fixed it not only for this toy example but also for my actual document.
    – hc_
    Feb 23, 2017 at 19:46
  • 1
    @hc_ Yes, reporting bugs can be a very useful thing. ;-) Feb 23, 2017 at 20:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .