In a recent latex template I have been working I saw two file names in the bibliography command
\bibliography{biblio, chapter1}
What does this mean?
In a recent latex template I have been working I saw two file names in the bibliography command
\bibliography{biblio, chapter1}
What does this mean?
The instruction
\bibliography{<list of one or more files with extension "bib">}
serves two rather distinct -- but not unrelated -- purposes:
For BibTeX, it provides the listing of all bib files that may (should, actually!) contain bibliographic entries referred to via various \cite commands. BibTeX searches the listed .bib file(s) and -- assuming it can find the \cited entries -- formats them according to the instructions contained in the file pointed to by the \bibliographystyle directive. BibTeX places its output in a file called \jobname.bbl, where "\jobname" is the name of your main tex file -- the file that contains the \documentclass instruction.
For LaTeX, the instruction \bibliography means, "go open the file \jobname.bbl and include its contents in the input stream you're processing, and print out the contents of the bbl file right here". LaTeX also writes the names of any bib files specified in the argument of \bibliography to the file \jobname.aux.
The very first time LaTeX is run on \jobname.tex, i.e., before BibTeX is ever run, the file \jobname.bbl is, by definition, still empty. LaTeX thus prints an empty bibliography and issues a warning that no bibliographic items were found. As mentioned above, it also writes the list of bib files to the aux file. Futhermore, until a BibTeX run is performed, all \cite commands are printed as ? since no bibliographic items have yet been processed and formatted. LaTeX also writes the keys of all bibliographic entries referred to via \cite instructions to the aux file.
When BibTeX is run, it reads the file \jobname.aux and finds out (a) which bibliography style is to be used, which files (with extension .bib) may contain the bib entries, and which entries are to be looked up in the bib file; recall that each \cite instruction produces a line item in the file \jobname.aux. BibTeX uses these pieces of information to create the file \jobname.bbl.
The next time LaTeX is run, the file \jobname.bbl is no longer empty; LaTeX therefore includes its contents in the input stream and generates the printed bibliography. By consulting the file \jobname.aux, LaTeX also performs a match between the \cite commands and their corresponding entries; at the end of the run, LaTeX writes to the .aux file what the output of each \cite command is supposed to be. (As I'm sure you know, some bibliography styles call for numeric citation call-outs, while others call for authoryear-style call-outs.)
The second time LaTeX is run after a BibTeX pass, it re-reads the aux file and can now match up the citation commands with what they're supposed to produce (variously formatted call-outs). Assuming no typos or other errors have occurred, all citation call-outs should now be properly resolved.
This is why you'll often see the admonition to run LaTeX, then BibTeX, and then BibTeX twice more to fully propagate all changes that may have been generated while the tex files were edited.
bibilio.bibandchapter1.bib, right? – Mico Nov 09 '15 at 19:08.bibfiles. – Mico Nov 09 '15 at 19:13bibtexwill complains and ignores all files after an empty space (http://tex.stackexchange.com/a/91655/16895) – Guido Nov 09 '15 at 21:13