.bib 文件是使用 Zotero 中的 Better BibTeX 生成的。我尝试使用 JabRef 清理它,没有发现任何问题。这是 .tex 文件:
\documentclass[a4paper]{article}
%replace "preprint submitted to elsevier" with page number
\usepackage[]{natbib}
\begin{document}
\title{Atmospheric aerosols in the human respiratory system}
\author{Shimon Chen}
\date{\today}
\maketitle
\section{Introduction}
\section{The upper respiratory tract: how aerosols enter the body}
\subsection{The nose}
test1 \citep{scott_theoretical_1978}.
\section{Pre-alveoli lower respiratory tract}
test2 \cite{breysse_inhalability_1990}.
\section{Particulates and the blood-air barrier}
\section{Summary}
\end{document}
\section{Bibliography}
\bibliographystyle{plainnat}
\bibliography{Test}
这是 .bib 文件:
http://tx.technion.ac.il/~shimi/Latex/Test.bib
这是终端输出:
> latex Test
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Arch Linux) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
(./Test.tex
LaTeX2e <2015/10/01> patch level 2
Babel <3.9m> and hyphenation patterns for 79 languages loaded.
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texmf-dist/tex/latex/natbib/natbib.sty) (./Test.aux)
Package natbib Warning: Citation `scott_theoretical_1978' on page 1 undefined o
n input line 14.
Package natbib Warning: Citation `breysse_inhalability_1990' on page 1 undefine
d on input line 16.
Package natbib Warning: There were undefined citations.
[1] (./Test.aux) )
Output written on Test.dvi (1 page, 936 bytes).
Transcript written on Test.log.
无论我运行 latex 和 bibtex 多少次都没用。尝试复制到一个干净的文件夹。尝试删除所有临时文件并运行 latex->bibtex->latex->latex。尝试 pdflatex。总是出现相同的错误,文档中有问号而不是参考文献。我做错了什么?
答案1
你有
\end{document}
\section{Bibliography}
\bibliographystyle{plainnat}
\bibliography{Test}
因此,您提前结束了文档,并且从未输入过参考书目(从您发布的日志中可以看出)
\end{document}
应该在最后...