Link but don’t print a hyperref link in references

biblatexbibliographieshyperrefurls

Generally, URLs are not pretty nor compact.
How can I embed a hyperlink to the documents URL without printing the URL in the reference catalog?

Right now I am using the backref=page option in the hyperref package and get:

enter image description here

With a .bib file:

@article{knuth1984,
  title={Literate Programming},
  author={Donald E. Knuth},
  journal={The Computer Journal},
  volume={27},
  number={2},
  pages={97--111},
  year={1984},
  publisher={Oxford University Press},
  url={https://doi.org/10.1093/comjnl/27.2.97}
}

Best Answer

For BibTeX you can use bibliography styles produced by the urlbst script. This is a script that takes an existing .bst file as input and produces a new .bst file with added url functionality. One of the features of the script is to suppress url and doi fields and make the title a hyperlink to the contents of those fields. This is done using the command line flags --hyperref --inlinelinks.

The following command modifies plain.bst into plainlinks.bst:

$ urlbst --hyperref --inlinelinks `kpsewhich plain.bst` > plainlinks.bst

The kpsewhich substitution is to find the path of the installed plain.bst and provide this path as input to urlbst, of course you can also locate the plain.bst yourself and copy it to your working directory first.

Then you can use the following MWE:

\documentclass{article}
\usepackage{hyperref}
\begin{filecontents*}{\jobname.bib}
@article{knuth1984,
  title={Literate Programming},
  author={Donald E. Knuth},
  journal={The Computer Journal},
  volume={27},
  number={2},
  pages={97--111},
  year={1984},
  publisher={Oxford University Press},
  doi={10.1093/comjnl/27.2.97}
}
\end{filecontents*}
\begin{document}
\cite{knuth1984}
\bibliographystyle{plainlinks}
\bibliography{\jobname}
\end{document}

Result:

enter image description here

urlbst is compatible with the standard styles (plain, alpha, unsrt, abbrv) but also with Natbib, AMS styles, IEEE, and many other custom styles. It is used by big publishers like ACL for their conferences.

Related Question