Anchoring document URLs into BibTeX entries

Including hyperlinks for references makes reading of electronic versions of papers much more efficient. However, these URLs are often printed verbatim, which is a bit invasive, not quite useful and space consuming. A possibility is to anchor URL as \href on titles or articles. However, these only works if the document is produced with pdflatex or dvipdfm because line breaking does not work with other drivers of hyperref. An alternative non invasive solution is to anchor URLs on labels of entries in default bibtex modes, or adding a marginal small anchor for natbib bibtex styles.

Our solution is to propose patched version of bibtex styles that prints \biburl{URL} before the \bibitem entry instead of including \url{URL} inside the \bibitem. By default this does nothing. However, we provide a package biblabelurl.sty that redefines some of the internal bibtex commands so as to print the reference with an appropriate anchor.

Here are several bibtex styles for which we provide modified versions. (The pacth is just a few lines and can easily be reproduced manually to other style files).

Original version plainnat.bst abbrvnat.bst plain.bst
Biblabelurl version plainnaturl.bst abbrvnaturl.bst plainurl.bst

Two commands may be used to change the default behavior of the biblabelurl package:

We also provide a perl script makebiburlbst to automatically build the foourl.bst from the foo.bst versions. The interest of this script is not only to applying under other source files (under certain asumptions), but also to customize the output. In particular, the script accepts an option --urllist that takes as argument an ordered comma-separated list of bibtex fields and will produce use the first of those field that is non empty for the url. This allows to store several URLs such as the publisher, author, or project url in the bibtex database, and decide which one take priority when generating the bibtex style.

Example:

    makebiburlbst --urllist 'url,urlauthor,urlpublisher,urlproject' \
	$(kpsewhich plainnat.bst) plainnaturl.bst

Download

You may just pick the script makebiburlbst or download a compressed tar ball biblabelurl.tgz of all files.

License

Copyright 2008, Didier Remy. Released under the terms of the GNU General Public Licence.