18

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}
}
21

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}
  • 2
    ,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 '13 at 2:48
  • 2
    @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 '13 at 3:26
  • @LijieXu see the update :) – cmhughes Mar 4 '13 at 3:31
  • 1
    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?. – patryk.beza Jun 25 '16 at 11:21
  • Note for future readers: Using hyperref with \url{....} can also solve issues related to underscores and tildes in urls. – starbeamrainbowlabs Apr 24 '18 at 12:28
12

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

  • 1
    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 '16 at 11:45
  • how to get the link in "In OSDI, 2004"? – Ka-Wa Yip Feb 27 '17 at 1:11
  • @Lijie Xu the command \href{}{} does not work in the bibtex file. How can I activate it? – QGravity Jan 13 at 8:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.