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 am writing my Ph.D. thesis in XeLaTeX with Biblatex, and there are times when I need to compile individual chapters, and times when I need to compile the entire document, so I use subfiles, which works wonderfully. However, in each of these chapters I have a \printbibliography command, which I would like to turn off when compiling the final document, so that only the \printbibliography command is run in the mainfile.

The file structure is something like:

\usepackage{subfiles, biblatex}



share|improve this question

1 Answer 1

up vote 7 down vote accepted

From subfiles.sty the \subfile command is defined as:


So it is straightforward to hook in some code to locally redefine \printbibliography to do nothing. For an example add the following to the preamble of the main file:






Note that biblatex makes bibliographic data available via citation commands. So unless you want to view the bibliography entries outside the main file, the subfiles need not invoke \printbibliography.

share|improve this answer
I have tested this and it works perfectly. –  Skander Apr 5 '13 at 23:39
This stuff goes in the main file or in the subfile? Does it works with standard LaTeX or has something XeLaTeX specific? –  Lucas Soares Jun 22 at 2:29

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.