I am using the book style and each chapter is put in a separate file and included in the main file by \include
. At the end of the main file, I put the following lines:
\bibliographystyle{plain}
\bibliography{D:/paper/Bibtex/refguo}
But when I cite a reference in Chapter 1, for instance, which is in a separate file, a question mark [?] appears instead of the right reference number. But at the end of the PDF file produced, the references are correctly listed.
I don't know how to fix this.
Best Answer
Probably you just need another LaTeX run.
LaTeX writes a citation into the
.aux
files. In case of included files via\include
it is the.aux
file for the included file. If a citation\cite{xyz}
is added, then you should see\citation{xyz}
in the right.aux
file after the next LaTeX run.Then bibtex should be run. It collects all
\citation
statements from the.aux
files and writes the bibliography.In the next LaTeX run after bibtex the bibliography is present with the new reference. But LaTeX does not know yet, which references the bibliography will contain. It records this in the
.aux
file with\bibcite{xyz}{1}
(the second argument is the citation form). Thus you get still[?]
for the new citation.Another LaTeX run is needed, at the beginning it reads the
.aux
files with\bibcite
and knows, how to citexyz
and you get[1]
for\cite{xyz}
, for example.In summary, the following runs are needed after a citation is added: