几个月前,我在PC上的Latex中编译了我的作品,没有任何错误。但是,它可以在我的新PC上正常工作。我的book.tex文件如下所示:
\documentclass[graybox,envcountchap,sectrefs]{svmono}
\usepackage[sort,numbers]{natbib}
\usepackage{chapterbib}
%some packages are added
\begin{document}
\author{XYZ}
\title{abc}
\maketitle
\include{chapter1}
\include{chapter2}
\end{document}
我的Chapter1.tex和Chapter2.tex如下所示:
\chapter{Chapter one}
\cite[ref1]
\bibliographystyle{spbasic}
\bibliography{refCH1}
和
\chapter{Chapter two}
\cite[ref2]
\bibliographystyle{spbasic}
\bibliography{refCH2}
refCH1.bib和refCH2.bib如下所示:
@article{ref1,title={ABC1},author={AAA}
}
和
@article{ref2,title={ABC2},author={BBB}
}
生产pdf文件book.pdf的结果在每章末尾均未包含参考。此外,出现[?]而不是正确的引文(例如[1],[2],...)。控制台中将显示以下消息:
Command Line: makeindex.exe "book.idx"
Startup Folder: C:\...\SpringerBook\Springer_book_latex\templates
This is makeindex,version 2.15 [MiKTeX 2.9 64-bit] (kpathsea + Thai support).
Scanning input file book.idx...done (0 entries accepted,0 rejected).
Nothing written in book.ind.
Transcript written in book.ilg.
Command Line: pdflatex.exe --interaction=errorstopmode --synctex=-1 "book.tex"
Startup Folder: C:\...\SpringerBook\Springer_book_latex\templates
This is pdfTeX,Version 3.14159265-2.6-1.40.15 (MiKTeX 2.9 64-bit)
entering extended mode
(book.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 68 languages loaded.
(svmono.cls
Document Class: svmono 2009/12/17 v5.5
Springer Verlag global LaTeX document class for monographs
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
LaTeX Warning: Citation `ref1' in file `chapter1' on page 1 undefined on input line 20.
LaTeX Warning: Citation `ref2' in file `chapter2' on page 1 undefined on input line 20.
No file chapter1.bbl.
Command Line: bibtex.exe "book"
Startup Folder: C:\...\SpringerBook\Springer_book_latex\templates
This is BibTeX,Version 0.99d (MiKTeX 2.9 64-bit)
The top-level auxiliary file: book.aux
A level-1 auxiliary file: chapter1.aux
A level-1 auxiliary file: chapter2.aux
Illegal,another \bibstyle command---line 74 of file chapter1.aux
: \bibstyle
: {spbasic}
I'm skipping whatever remains of this command
Illegal,another \bibdata command---line 75 of file chapter2.aux
: \bibdata
: {refCH1}
I'm skipping whatever remains of this command
Database file #1: refCH1.bib
(There were # error messages)