![natbib:网站名称后的逗号](https://linux22.com/image/286893/natbib%EF%BC%9A%E7%BD%91%E7%AB%99%E5%90%8D%E7%A7%B0%E5%90%8E%E7%9A%84%E9%80%97%E5%8F%B7.png)
考虑下面的 MWE。生成的参考书目在网站名称后显示一个令人讨厌的逗号。有什么方法可以修复它(但保留乌斯特纳特适用于所有其他类型(如文章)的样式?
\documentclass{scrartcl}
\usepackage{filecontents}
\usepackage[square,numbers]{natbib}
\bibliographystyle{unsrtnat}
\usepackage[english]{babel}
\usepackage{url}
\begin{filecontents}{\jobname.bib}
@Other{some-web,
Title = {A Website},
url = {https://en.wikipedia.org/wiki/Main_Page},
Note = {Last visited: 15.03.2014},
}
@Other{some-web2,
Title = {Another Website},
url = {https://en.wikipedia.org/wiki/Main_Page},
Note = {Last visited: 15.03.2014},
}
\end{filecontents}
\begin{document}
\section{first section}
some content \cite{some-web,some-web2}
\newpage
\section{Bibliography}
\bibliography{\jobname}
\end{document}
答案1
逗号在year
. 之前(当您运行bibtex
该文件时,您会收到有关“空年份”的警告。)
文档natbib
似乎表明(在“2.7 无作者和无年份的参考文献中”)应该省略,但似乎它并不适用于所有风格。
我会使用 Biblatex,它可以很好地处理缺失字段(运行biber
而不是bibtex
):
\documentclass{scrartcl}
\usepackage{filecontents}
\usepackage[style=numeric-comp]{biblatex}
\addbibresource{\jobname.bib}
\usepackage[english]{babel}
\usepackage{url}
\begin{filecontents}{\jobname.bib}
@online{some-web,
Title = {A Website},
url = {https://en.wikipedia.org/wiki/Main_Page},
urldate = {2014-03-15},
}
@online{some-web2,
Title = {Another Website},
url = {https://en.wikipedia.org/wiki/Main_Page},
urldate = {2014-03-15},
}
\end{filecontents}
\begin{document}
\section{first section}
some content \cite{some-web,some-web2}
\newpage
\printbibliography[title=Bibliography]
\end{document}