bibtex - 如何获得没有 URL 的网页链接(最好在号码上有链接)

bibtex - 如何获得没有 URL 的网页链接(最好在号码上有链接)

我一直在尝试不同的软件包 - url、hyperref 等,以便将 URL 添加到我的参考书目中。基本上,我已经拥有了 URL - 上面有一个可点击的网络链接 - 这几乎就是我想要的。

但是,有些网页链接真的很长,而且很丑,理想情况下,我希望链接可以附加到参考书目中的其他参考资料部分,或者只是网页链接,而不明确显示网址。我确信这应该不需要太多工作就可以实现,我相信这在期刊中相当常见。

注意 - 尽管有一些类似的问题.....我不认为(????)它是重复的。

例如。 是否可以将 PDF 中的 URL 链接到网页?- 他们想要网址

注意:- 我对 bibtex 还比较陌生,我倾向于不涉及重写 bibtex 样式的解决方案。正如 blackadder 所说:“我就是那些很乐意穿棉质衣服但不知道它是如何工作的人之一。”希望这不会让你失望.....

BibTexUrls.tex:

\documentclass[12pt]{article}

\usepackage[numbers,sort&compress]{natbib}
\usepackage{hyperref}

\title{BibTexUrls}
\author{JP}
\date{\today}

\begin{document}
\maketitle

I read something really interesting the other day........\cite{Gaebel2004}

\bibliographystyle{IEEEtran}
\addcontentsline{toc}{chapter}{Bibliography}

\bibliography{BibTexUrls}

\end{document}

BibTexUrls.bib:

@article{Gaebel2004,
author = {Gaebel, T and Popa, I. and Gruber, A. and Domhan, M. and Jelezko, F. and Wrachtrup, J.},
doi = {10.1088/1367-2630/6/1/098},
issn = {1367-2630},
journal = {New Journal of Physics},
pages = {98--98},
title = {{Stable single-photon source in the near infrared}},
url = {http://stacks.iop.org/1367-2630/6/i=1/a=098?key=crossref.c22c6711b1c99f09b470c1b95fb132c0},
volume = {6},
year = {2004}
}

答案1

如果你愿意修改你的参考书目样式文件,这个答案可能会提供您想要的内容(只需将 DOI 链接与 URL 链接交换即可)。此外,在 bibtex 中添加超链接可能有帮助。

但您指出,摆弄bst文件并不是一个真正的选择,一些明显是链接的文本就足够了。这很简单:

\documentclass[12pt]{article}
\usepackage[numbers,sort&compress]{natbib}
\usepackage{hyperref}

\begin{document}
I read something really interesting the other day........\cite{Gaebel2004}

%% add this
\let\oldUrl\url
\renewcommand{\url}[1]{\href{#1}{Link}}
%% up to here

\bibliographystyle{IEEEtran}
\addcontentsline{toc}{chapter}{Bibliography}
\bibliography{BibTexUrls}

\end{document}

您将获得实际上链接到 URL 的文本“链接”。 示例输出

相关内容