I'm using biblatex with a biber backend to create a cumulative bibliography, subdivided by chapter. My (simplified) main file (main.tex) is:


\usepackage[refsection=chapter, backend=biber]{biblatex}







foo.tex is:


and bar.tex is:


According to this answer the benefit of using \include is that

"There will be a filename.aux file which contains all counter values, like page and chapter numbers etc., at the begin of the filename. This way the file can be compiled alone but still has the correct page and chapter etc. numbers. Such part aux files are read by the main aux file".

I expect the refsection counter to behave the same way. However when using \includeonly{some chapter} I get the following warning:

LaTeX Warning: Label `refsection:01' multiply defined.
LaTeX Warning: There were multiply-defined labels.

If I remove the includeonly command then the warning disappears but is there a way to avoid that warning when using the includeonly command? Apparently the only way to eliminate the warning is by deleting the aux files of the chapters (not the main file) after each compilation. However in that way counter values are lost.

I know this is just a warning, not an error, and will not be an issue in the final (full) document. However I would like to understand why the warning appears and if possible to eliminate it.

EDIT: Before the bounty ends I want to make clear that I can tell my text editor (vim) not to show the warning. As I said before, what I really want to know why the warning appears when one of the advantages of using include is that it stores counter values.

  • 2
    Remember, too, that this is a warning, not an error, and indeed one that will certainly not be an issue in the final (full) document.
    – jon
    Commented Oct 1, 2013 at 4:36
  • @jon Thanks. I've changed the title of the question.
    – petobens
    Commented Oct 1, 2013 at 4:42
  • Just out of interest, do you notice any adverse effect apart from the warning (wrong links, [in any way] messed up bibliography, wrong numbering)? I think jon is right, when he points out that this behaviour is very likely not relevant for the final (important) stage of your document preparation.
    – moewe
    Commented Oct 1, 2013 at 19:41
  • @moewe everything works fine. However I thought that since I'm using include then the refsement counters should be stored in the aux files and no warning should appear.
    – petobens
    Commented Oct 1, 2013 at 23:40
  • 1
    @cfr you seem to be right. The warning indeed disappears however now not only the included chapter is printed but also every chapter title in the document. I now i can comment the unwanted chapter titles but I hope there is a more general solution. The other problem with your solution is that the chapter title is in a page by itself and the contents of the chapter start in another one. I thought that maybe some of the biblatex maintainers could explain in detail why this happens and how to avoid it.
    – petobens
    Commented Dec 18, 2013 at 19:53

1 Answer 1


From my testing, starting with a clean directory (no .aux files) it works fine with \includeonly. It's only a problem if you have a foo.aux hanging around from a previous run which created it (presumably without the \includeonly) and then you try to run with \includeonly - this seems to pick up and read the foo.aux which contains counters the same as in bar.aux. This makes sense as when you are effectively only including bar.aux by using \includeonly, this would get counter "01" but if you included both, foo.aux would have this. If you don't delete your .aux files between runs with different \includeonly settings, it's natural you will get conflicts because you have old .aux files around.

  • 2
    If I delete the aux files then (i) bar.tex chapter instead of being chapter 2 becomes chapter 1 (counter values are lost) and (ii) if from that bar.tex I have a reference to foo.tex (such as \ref{cha:foo}) then by deleting foo.aux the reference is lost (so basically I'm losing every advantage of using \include).
    – petobens
    Commented Jul 10, 2014 at 19:30
  • 1
    The reason for the warnings seems that the refsection are numerically labeled and not with respect to the content. Therefore the references are anonymously labeled 1,2,3... If a chapter gets missing using \includeonly the numbers are misleading. It may be better if the refsections are labeled according to content. Commented Jan 17, 2017 at 21:21
  • @BernhardKleine do you have a workaround for this? it is very annoying to me. Commented Mar 15, 2017 at 6:04
  • 1
    To avoid this, I put the \newrefsection commands in the master, so the full set of refsections are created in the same numeric sequence regardless of what is actually put in the includeonly{...} macro, although frankly i feel that the newrefsection macro should have an optional agrument to allow the user to specify a name, rather relying on a counter increment. Commented Mar 16, 2017 at 3:00
  • @Nicholas hamilton, I donot have a workaround. I see the warning with each latexmk run, but it is only a warning. Commented Mar 16, 2017 at 10:26

You must log in to answer this question.

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