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

While working on a long LateX document I would like the citations to be displayed correctly, but the bibliography itself not being added to the document.

Is it possible to make the bibliography being compiled, but not producing output? (Maybe it's not even difficult, and I am just being stupid...)

share|improve this question
up vote 3 down vote accepted

The simplest way is to use \include and \includeonly:

% \includeonly{}
...<the document>...


The file biblio.tex will contain the commands to produce the bibliography: the thebibliography environment or the \bibliography command if you use the traditional method with BibTeX.

When you are sure about the correctness of the references, uncomment the \includeonly line.

As lockstep says, with biblatex it's sufficient not to use \printbibliography.

share|improve this answer
So what I have to do is to list all included tex files in the includeonly command (which is not commented out...). Then the references are displayed correctly, but the bibliography is not appended to the document. – fuenfundachtzig Aug 18 '11 at 7:35

One option would be to use the comment package and to enclose the \bibliography command (in the body of your document) inside a comment environment initially deactivated; i.e., schematically to write something like






then, process your document in the usual way: pdflatex+bibtex+pdflatex+pdflatex to get the citations and the bibliography, and then to activate the comment environment (by uncommenting the \excludecomment{comment} line and commenting out \includecomment{comment} ) and then run pdflatex one more time.

share|improve this answer
That's certainly a possibility, but I recompile after every other sentence and wouldn't want to change this every time. – fuenfundachtzig Aug 17 '11 at 18:12

You can use


were "xxx" is a keyword you don't use. This way the correct files are compiled but no bibliography is added to the document.

share|improve this answer
This command must be from a particular package? LaTeX does not recognize it. – fuenfundachtzig Aug 17 '11 at 17:11
@Rainer: but your solution applies to biblatex bibliographies, and fuenfundachtzig needs a bibtex approach. – Gonzalo Medina Aug 17 '11 at 17:16
Assuming the use of biblatex is permitted, there's a much more simple solution: Don't include \printbibliography in your document. – lockstep Aug 17 '11 at 17:56

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.