I'm trying to work on individual sections of a paper separately. In order to do this, I need to wrap the text in
\begin{document}
...
\bibliography{bib}
\end{document}
The main file looks similar:
\begin{document}
\include{A}
\include{B}
...
\bibliography{bib}
\end{document}
However, with the bibliography included in the sub-file and the main file, I end up with these errors: Illegal, another \bibstyle command, Illegal, another \bibdata command. I think, had the builds worked, I would also have a duplicate bibliography.
So, the question: How can I keep the individual sub-documents compileable (with bibliography), but also have the "main" document compile with a working bibliography?
\includeonly{B}and then process the main file. – David Carlisle Feb 10 '13 at 17:06Bas to addincludeonlyto the main file). – keflavich Feb 10 '13 at 17:54\documentclassand minimal required packages would be create. I for example can't see at the moment if you are really using thestandalonebundle as your title and tags suggest or not. If so, you can use the\ifstandaloneswitch around the\bibliography{bib}command. – Martin Scharrer Feb 12 '13 at 10:55\usepackage{standalone}in apreface.texincluded in the main & sub documents. The\ifstandaloneswitch sounds very much like what I want; this post helps: http://tex.stackexchange.com/questions/29995/get-standalone-to-ignore-blocks-of-text-from-input-files-e-g-beginspacin – keflavich Feb 12 '13 at 16:14