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 have a document of this form








I need LaTeX to read supp.aux for cross-referencing, but do not want BibTex to read supp.aux. In other words, I do not want to list .bib entries used in supp.tex to be included in the current document. Is there a way to direct BibTex to only look at main.aux and not supp.aux?

share|improve this question

If you compile your full document (no \includeonly) and ensure that all the cross references are OK, then you can reistate the \includeonly and LaTeX will load also the .aux files corresponding to the not included files.

share|improve this answer
I once had it working, but it is not working anymore. The issue is that when I run bibtex on the file with \includeonly, it apparently also looks at supp.aux and adds the corresponding bib entries to the references. – passerby51 Jul 22 '12 at 19:44
@passerby51 Why would you want that? – egreg Jul 22 '12 at 19:45
the issue is that I don't want bibliography of supp.tex to appear in the final version. Your suggestion does not seem to work. – passerby51 Jul 22 '12 at 20:19
@passerby51 Remove the supp.aux file (or rename it) and rerun BibTeX. If I had to do this I would simply write two papers or use \input and comment the unwanted one. – egreg Jul 22 '12 at 20:23
Thanks, writing two papers is not an option. I will try your suggestion which I think will work. What has worked for now is to remove all .aux, .bbl, .etc files, comment out \include{supp} and run latex a couple of times, run bibtex, uncomment \include{supp} and comment out \includeonly{main}, run latex a couple and then uncomment \includeonly{main}, and run latex. I guess yours might be a better approach of doing this same thing – passerby51 Jul 22 '12 at 20:39

I suggest doing like egreg recomends, but before second compilation try deleting generated bibliography file that has the same name as the main file of your project, but has an extension .bbl. This will force bibtex to regenerate it but will exclude supp file.

As I remember, this worked for me when I was writing my master thesis.

share|improve this answer
Thanks. Please see my response to his comments. – passerby51 Jul 22 '12 at 20:40

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.