TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using biblatex with refsection=chapter. That results in aux files named according to this pattern, assuming a source file called book.tex for a book of n chapters:


Is there a hook to change that name? I need to associate the aux file to its corresponding chapter (these files are used in other processes) For example:


I think I can add a hook inside the include command so I can grab the chapter file name, but I don't know where to hook it up to the generated aux file name.

EDITING for clarity:

It may be that trying to substitute the chaptername in for the integer isn't the right way to solve the problem. The main thing is that I need a way to associate the aux file with the chapter it came from. I must post-process the bbl files and aux files for each chapter. The post-processed files are used in a different workflow (epub/docbook generation).

share|improve this question
Just in case you would rather get around this whole problem, if you use biber as the backend instead of bibtex, it requires only one run and this multiple file issue doesn't exist. – PLK Sep 5 '12 at 18:34
up vote 5 down vote accepted

The numeric part of the auxiliary filename corresponds to the reference section counter (the same value returned by \therefsection). The filename suffix (-blx) corresponds to \blxauxsuffix. This can be redefined with \renewcommand in the preamble. The filename prefix is hardcoded as \jobname.

You could patch biblatex internals to add chapter filenames, but these need to be defined in the preamble. So hooking into \include is too late. One workaround is to specify an ordered list of chapter filenames in the preamble.

Here's an example that replaces the reference section number with chapter filenames. The chapter filenames are passed to a new command \blxauxprefix as a comma-separated list.






        'aux' file prefix does not match \MessageBreak
        '\@backslashchar include' filename #1}}}{}{}



\chapter{First chapter}

\chapter{Second chapter}


    {References for Chapter \ref{refsection:\therefsection}}
    {References before chapters}}}

share|improve this answer
awesome, @Audrey! I never would have figured that one out. In fact I was going to close the question as too esoteric to ask here. Thanks very much. – Tim A Sep 6 '12 at 13:14

Your Answer


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.