# Chapterbib is working but keeps giving me errors. Any way to silence it?

I'm using Chapterbib to write my bibliography separately after each chapter. It does work but bibtex is still giving me plenty of errors and warnings:

Illegal, another \bibstyle command
I'm skipping whatever remains of this command.

Illegal, another \bibdata command
I'm skipping whatever remains of this command.

Warning--I didn't find a database entry for "druhy".


etc. Basically I'm getting 2 error messages per file and 1 warning message per citation. Since the final publication will be quite large, I'd rather not have tens of errors and hundreds of warnings when I compile it all together. Is there any way around it? I'd be happy with just silencing these particular error and warning messages. I did follow the instructions for the build order (latex, bibtex on individual files, latex, latex).

Minimal working example:

Test.tex

\documentclass{article}
\usepackage{chapterbib}
\begin{document}
\include{chapter1}
\include{chapter2}
\end{document}


Chapter1.tex

blabla \cite{prvni}
\bibliographystyle{plain}
\bibliography{jedna}


Chapter2.tex

bleble \cite{druhy}
\bibliographystyle{plain}
\bibliography{dva}


jedna.bib

@article{prvni,
author = "A. Aa",
title = "blahblah",
year = "2000",
journal = "tojefuk"
}


dva.bib

@article{druhy,
author = "B. Bb",
title = "blehbleh",
year = "2001",
journal = "tojejedno"
}

-
I can’t reproduce the error, but this question looks like it might be helpful. – alexwlchan Feb 6 '14 at 10:40
Try removing all auxiliary files first. – Crissov Feb 6 '14 at 10:47
Did you really run bibtex separatly on the aux-files of the included files (correct) or also on the aux-file of the main file (wrong)? – Ulrike Fischer Feb 6 '14 at 11:56
@Crissov: Tried that but sadly it didn't work. – Michal Feb 6 '14 at 13:03
Do you use some build profile from TeXnicCenter which includes a bibtex run? – Ulrike Fischer Feb 6 '14 at 16:55

The problem is due to a build profie in TeXnicCenter, which included a run of bibtex on the main file. Turning off this profile removes the error messages.