我读过不同论坛上的许多帖子,但无法在 Texmaker 中显示我的参考书目
\documentclass{l4proj}
\usepackage{pdfpages}
\begin{document}
\title{Level 4 Project Report Template} % change this to your title
\author{John H. Williamson}
\date{September 14, 2018}
\maketitle
\begin{abstract}
....
\end{abstract}
\educationalconsent
\bibliography{bib}
\bibliographystyle{agsm}
% Force the bibliography not to be numbered
\renewcommand{\thechapter}{0}
\nocite{*} % all not cited bib entries are shown in bibliography ...
\bibliography{l4proj} %l4proj.bib is in the same folder
\end{document}
以下是我的一些参考书目:
@inproceedings{Pey17,
author = {Simon {Peyton Jones}},
title = {How to Write a Great Research Paper},
booktitle = {2017 Imperial College Computing Student Workshop, {ICCSW} 2017, September
26-27, 2017, London, {UK}},
pages = {1:1--1:1},
year = {2017},
}
@book{Wil09,
title={Style: the basics of clarity and grace},
author={Williams, Joseph M and Bizup, Joseph},
year={2009},
publisher={Pearson Longman}
}
谢谢你!
答案1
我认为存在一个误会...
请参阅以下代码片段:
\bibliography{bib}
\bibliographystyle{agsm}
% Force the bibliography not to be numbered
\renewcommand{\thechapter}{0}
\nocite{*} % all not cited bib entries are shown in bibliography ...
\bibliography{l4proj} %l4proj.bib is in the same folder
这里你调用了\bibliography
两次。一次调用就足以将参考书目放置在\bibliography
调用命令的位置。顺便说一句,你使用 BibTeX\bibliography
而不是biblatex
像你标记问题时那样...
然后你调用,\bibliographystyle{agsm}
结果出现了几个错误,例如“\harvarditem
未定义”。请尝试以下命令:
\bibliographystyle{plain}
在以下 mwe 中,我使用包filecontents
将 bib 文件和 tex 代码合并到一个可编译的 mwe 中。您仍然可以使用您的文件l4proj.bib
!
\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@inproceedings{Pey17,
author = {Simon {Peyton Jones}},
title = {How to Write a Great Research Paper},
booktitle = {2017 Imperial College Computing Student Workshop, {ICCSW} 2017, September
26-27, 2017, London, {UK}},
pages = {1:1--1:1},
year = {2017},
}
@book{Wil09,
title = {Style: the basics of clarity and grace},
author = {Williams, Joseph M and Bizup, Joseph},
year = {2009},
publisher = {Pearson Longman},
}
\end{filecontents}
\documentclass{l4proj}
\usepackage{pdfpages}
\begin{document}
\title{Level 4 Project Report Template} % change this to your title
\author{John H. Williamson}
\date{September 14, 2018}
\maketitle
\begin{abstract}
....
\end{abstract}
\educationalconsent
\bibliographystyle{plain}% agsm
% Force the bibliography not to be numbered
%\renewcommand{\thechapter}{0}
\nocite{*} % all not cited bib entries are shown in bibliography ...
\bibliography{\jobname} % <======= to use bib file created with filecontents
\end{document}
及其产生的参考书目(编译时出现一个缺少图像 [okay] 的错误和一次使用filecontents
[okay] 的警告):
请查看该样式agsm
需要加载另一个类或其他包,但您未在代码中使用它们,因此出现错误消息。您真的需要该样式吗?您从哪里获得它?您读过它的文档吗?