我认为我遇到了编译器问题。如果我尝试这样做:
\documentclass[11]{article}
\usepackage{cite}
\begin{document}
\bibliographystyle{plain}
\bibliography{mybib}
\end{document}
已创建 mybib.bib 文件如下:
%%%%%%%%%%% mybib.bib %%%%%%%%%%%%%%%%%%%
@BOOK{HK,
AUTHOR={H. Kopka and P. W. Daly},
TITLE={A Guide to LaTeX},
PUBLISHER={Addison-Wesley},
ADDRESS={Reading, MA},
YEAR=1999.
}
@BOOK{MG,
AUTHOR={M. Goossens and F. Mittelbach and A. Samarin},
TITLE={A LaTeX Companion},
PUBLISHER={Addison-Wesley},
ADDRESS={Reading, MA},
YEAR=1994.
}
@ARTICLE{Pan,
AUTHOR={D. Pan},
TITLE={A Tutorial on MPEG/Audio Compression},
JOURNAL={IEEE Multimedia},
YEAR={1995},
VOLUME= {2} ,
PAGES={60-74},
MONTH={Summer}.
}
@INPROCEEDINGS{Boney96,
AUTHOR={L. Boney and A. H. Tewfik and K. N. Hamdy},
TITLE={Digital Watermarks for Audio Signals},
booktitle={Proceedings of the Third IEEE International Conference on
Multimedia},
PAGES={473-480},
MONTH={June},
YEAR={1996}.
}
%%%%%%%%%%%%% end %%%%%%%%%%%%%%%%%%%%%%
当我编译时,我甚至没有生成 .pdf 文件。为什么会这样?
答案1
我修正了你给出的代码。
请参阅现在正在编译的 MWE:
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@misc{Silent.Spring,
author = {Wikipedia},
title = {Silent Spring},
month = {September},
year = {2015},
url = {https://en.wikipedia.org/wiki/Silent_Spring},
}
\end{filecontents*}
\documentclass[12]{article}
\usepackage{fullpage}
\usepackage{enumerate}
\usepackage{cite}
\begin{document}
\begin{enumerate}
\item The main finding of the book ``Silent Spring'' was that the
use of the use of DDT pesticides was killing birds and harming the
environment. Also, she described how DDT entered the food chain
and accumulated in the fatty tissues of the birds , animals and
humans and how that caused cancer and genetic
damage\cite{Silent.Spring}.
\end{enumerate}
\bibliographystyle{plain}
\bibliography{\jobname}
\end{document}
包filecontents
用于有一个代码,包括 bib 文件(texdoc filecontents
在您的终端/控制台上获取更多信息)。
键不允许包含空格:所以我将您的更改Silent Spring
为Silent.Spring
(不要忘记\cite
命令!)
你打开了一个enumerate
环境,但你没有关闭它。我删除了这些行。
所有这些错误都导致无法包含您的 bib 文件。现在它应该可以工作了。使用 MiKTeX,我从控制台/终端运行pdflatex mwe.tex
,然后bibtex mwe
,然后 两次,pdflatex mwe.tex
结果如下: