36

It's cool to add a hyperlink in references like this: enter image description here

I want to know how to add the blue box in bibtex. For example, the following article's link is "ee".

@inproceedings{DBLP:conf/osdi/DeanG04,
author    = {Jeffrey Dean and
           Sanjay Ghemawat},
title     = {MapReduce: Simplified Data Processing on Large Clusters},
booktitle = {OSDI},
year      = {2004},
ee        = {http://www.usenix.org/events/osdi04/tech/dean.html},
crossref  = {DBLP:conf/osdi/2004},
bibsource = {DBLP, http://dblp.uni-trier.de}
}

2 Answers 2

35

Loading the hyperref package and using

url        = {http://www.usenix.org/events/osdi04/tech/dean.html},

gives a clickable url in your bibliography.

screenshot

alternatively you can use

             note        = {\href{http://www.usenix.org/events/osdi04/tech/dean.html}{my text for the link which can break across lines}},

which gives a link which has different text from the link. I agree with @Mico- this is probably a bad idea in general for a variety of different reasons.

screensh

Complete MWE

% arara: pdflatex
% arara: bibtex
% arara: pdflatex
% arara: pdflatex
\begin{filecontents}{mybib.bib}
  @inproceedings{dblp,
             author = {Jeffrey Dean and
             Sanjay Ghemawat},
             title     = {MapReduce: Simplified Data Processing on Large Clusters},
             booktitle = {OSDI},
             year      = {2004},
             note        = {\href{http://www.usenix.org/events/osdi04/tech/dean.html}{my text for the link which can break across lines}},
             bibsource = {DBLP, http://dblp.uni-trier.de}
             }
\end{filecontents}

\documentclass{article}
\usepackage[backend=bibtex]{biblatex}   % bibliography
\usepackage{hyperref}

% bibliography
\bibliography{mybib}
\begin{document}

hello world \cite{dblp}

\printbibliography
\end{document}
9
  • 4
    ,this is a solution, but I'm wondering if this url can be hidden in paper's title. Paper's title is clickable.
    – Lijie Xu
    Mar 4, 2013 at 2:48
  • 7
    @LijieXu - Unless you can be absolutely certain that your paper will always be read on-screen, and never from a paper copy, it's probably not a good idea to hide the actual URL from your readers' eyes.
    – Mico
    Mar 4, 2013 at 3:26
  • 2
    Note that if you have tilde ~ in \href it won't work. To fix it, you can replace ~ with %7E. BTW: interesting point of view why the %7e solution really good?. Jun 25, 2016 at 11:21
  • 1
    @cmhughes the command \href{}{} does not work in the bibtex file. How can I activate it?
    – QGravity
    Jan 13, 2019 at 7:55
  • 1
    @Mico Most documents come in an electronic format now and hidden clickable links seem to be fine to me. If you read a hard-copy without a computer around, then having the explicit link is not really helpful. If you read a hard-copy with a computer around, get the electronic version and click on the link. Bottom-line: explicit human-unreadable links are not useful. Am I missing something?
    – pluton
    Nov 20, 2020 at 3:42
18

Thanks for the code of @cmhughe. I rewrite it as follows:

@inproceedings{DBLP:conf/osdi/DeanG04,
author    = {Jeffrey Dean and
           Sanjay Ghemawat},
title     = {\href{http://www.usenix.org/events/osdi04/tech/dean.html}{MapReduce: Simplified Data Processing on Large Clusters}},
booktitle = {OSDI},
year      = {2004},
ee        = {http://www.usenix.org/events/osdi04/tech/dean.html},
crossref  = {DBLP:conf/osdi/2004},
bibsource = {DBLP, http://dblp.uni-trier.de}

In this way, the hyperlink effect can be achieved.

enter image description here

5
  • 4
    Nice solution. You can add the entry automatically using BibTool and bibtool -- 'add.field{title2="\href{%s(url)}{%s(title)}"}' test.bib -o test1.bib. See this post for details.
    – DJJ
    Sep 20, 2016 at 11:45
  • how to get the link in "In OSDI, 2004"?
    – Ka Wa Yip
    Feb 27, 2017 at 1:11
  • @Lijie Xu the command \href{}{} does not work in the bibtex file. How can I activate it?
    – QGravity
    Jan 13, 2019 at 8:13
  • According to the official bibtex documentation ( ctan.org/pkg/bibtex ), ee is not an accepted field for inproceedings . The fact that ee appeared in your example, confused me and might confuse other people. Please consider removing it.
    – evaristegd
    May 13, 2019 at 0:52
  • I was looking for hours on how to add a website to the bibliography, and this is the unique solution that worked for me. Thanks. Mar 14, 2022 at 8:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .