我的.bib
文件包含以下条目:
@Article{ LM11,
title = "Name of paper",
author = "Author A and Author B",
journal = "Arxiv",
year = "2011",
url = "http://arxiv.org/PS_cache/arxiv/pdf/..."
问题:编译时,标题/作者/期刊显示正常,但 URL 根本不出现。类似的条目类型(例如书籍)也会出现同样的情况
参考书目包含在以下两行中:
\bibliography{bib_filename}
\bibliographystyle{plain}
答案1
书目plain
样式不支持该url
字段。请使用样式plainurl
(并加载url
包)。
\documentclass{article}
\usepackage{url}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{ LM11,
title = "Name of paper",
author = "Author A and Author B",
journal = "Arxiv",
year = "2011",
url = "http://arxiv.org/PS_cache/arxiv/pdf/..."
}
\end{filecontents}
\begin{document}
Some text \cite{LM11}.
\bibliographystyle{plainurl}
\bibliography{\jobname}
\end{document}
(filecontents 环境仅用于将一些外部文件直接包含到示例中,以便进行编译。对于解决方案来说,它不是必需的。)
答案2
我遇到了同样的问题,最终以下方法对我有用,似乎也是最简单的解决方案(在托管环境中,我无法改变 bib 样式):
\usepackage[square,sort,comma,numbers]{natbib}
\usepackage{url}
\usepackage{hyperref}
...
\bibliographystyle{plainnat}
\bibliography{my_bib}
引用如下:
\cite{Bacon:2000}
带围兜如下:
@misc{Bacon:2000,
author = {Crunchy Bacon},
title = {Breakfast at Murphy's},
month = {May},
year = {2000},
publisher = {Bacon Daily},
note ={\url {http://www.dailybacon.com} (visited: 2014-11-09)}
}