我在尝试为我的项目做参考书目时遇到了一个小问题。我在打印参考书目时看到以下内容:
如上所示,标题和年份实际上什么都没有出现 :(。我使用以下内容来创建参考书目:
%Loading in the packages
\documentclass[12pt]{report}
\usepackage[a4paper, width=150mm, top=25mm, bottom=25mm ,bindingoffset=6mm]{geometry}
\usepackage[backend=bibtex, style=alphabetic]{biblatex}
\addbibresource{citations.bib}
\begin{document}
\tableofcontents
\chapter{superintro}
\input{chapters/superintro}
\printbibliography
\end{document}
然后我在 superintro .tex 文件中执行 \cite{},这会产生奇怪的参考书目输出。
一些示例 citations.bib 文件如下所示:
@report{ RFC3550,
author = {H. Schulzrinne, S. Casgner, R. Frederick, V. Jacobson}
title = {RFC 3550, RTP: A Transport Protocol for Real-Time Applications}
url = {https://tools.ietf.org/html/rfc3550}
year = {July, 2003}
}
@report{ RFC2326,
author = {H. Schulzrinne, A.Rao, R. Lanphier}
title = {RFC 2326, Real Time Streaming Protocol}
url = {https://rools.ietf.org/html/rfc2326}
year = {April, 1998}
}
我希望参考书目包含上述所有信息,也希望文献正文中的引用能够以作者年份的形式显示。
例如请参阅RFC2326[SCH98]。
如果有人能提供帮助,我将不胜感激,我曾尝试将样式更改为作者年份,但没有成功。
答案1
你会得到类似
This is BibTeX, Version 0.99d (TeX Live 2015)
The top-level auxiliary file: tubby.aux
The style file: biblatex.bst
Database file #1: tubby-blx.bib
Database file #2: tubby.bib
I was expecting a `,' or a `}'---line 3 of file tubby.bib
:
: title = {RFC 3550, RTP: A Transport Protocol for Real-Time Applications}
(Error may have been on previous line)
I'm skipping whatever remains of this entry
I was expecting a `,' or a `}'---line 10 of file tubby.bib
:
: title = {RFC 2326, Real Time Streaming Protocol}
(Error may have been on previous line)
I'm skipping whatever remains of this entry
Biblatex version: 3.0
(There were 2 error messages)
在文件上运行 BibTeX 时(我将其重命名为tubby.bib
以免破坏我的文件)。
条目中的字段必须以逗号终止,逗号仅在最后一个字段后是可选的(但我建议也在那里添加它)。
您的字段也author
写错了:作者之间应该用 , 分隔and
,而不是用逗号。该year
字段应该只包含年份。
在下面的例子中我使用了filecontents*
,但只是为了使示例独立。
\begin{filecontents*}{\jobname.bib}
@report{RFC3550,
author = {H. Schulzrinne and S. Casgner and R. Frederick and V. Jacobson},
title = {RFC 3550, RTP: A Transport Protocol for Real-Time Applications},
url = {https://tools.ietf.org/html/rfc3550},
year = {2003},
}
@report{RFC2326,
author = {H. Schulzrinne and A. Rao and R. Lanphier},
title = {RFC 2326, Real Time Streaming Protocol},
url = {https://rools.ietf.org/html/rfc2326},
year = {1998},
}
\end{filecontents*}
\documentclass[12pt]{report}
\usepackage[a4paper, width=150mm, top=25mm, bottom=25mm ,bindingoffset=6mm]{geometry}
\usepackage[backend=bibtex, style=alphabetic]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
\cite{RFC3550} and \cite{RFC2326}
\printbibliography
\end{document}