Welcome to the UK List of
TeX Frequently Asked Questions
on the Web

Searching

The index of Frequently Asked Questions about TeX is searchable.

Please enter your keyword here:   then press here: ,    or:
Google

URLs in BibTeX bibliographies

There is no citation type for URLs, per se, in the standard BibTeX styles, though Oren Patashnik (the author of BibTeX) is believed to be considering developing one such for use with the long-awaited BibTeX version 1.0.

The actual information that need be available in a citation of an URL is discussed at some length in the publicly available on-line extracts of ISO 690–2; the techniques below do not satisfy all the requirements of ISO 690–2, but they offer a solution that is at least available to users of today’s tools.

Until the new version of BibTeX arrives, the simplest technique is to use the howpublished field of the standard styles’ @misc function. Of course, the strictures about typesetting URLs still apply, so the entry will look like:

@misc{...,
  ...,
  howpublished = "\url{http://...}"
}

A possible alternative approach is to use BibTeX styles other than the standard ones, that already have URL entry types. Candidates are:

You can also acquire new BibTeX styles by use of Norman Gray’s urlbst system, which is based on a Perl script that edits an existing BibTeX style file to produce a new style. The new style thus generated has a webpage entry type, and also offers support for url and lastchecked fields in the other entry types. The Perl script comes with a set of converted versions of the standard bibliography styles.

Another possibility is that some conventionally-published paper, technical report (or even book) is also available on the Web. In such cases, a useful technique is something like:

@techreport{...,
  ...,
  note = "Also available as \url{http://...}"
}

There is good reason to use the url or hyperref packages in this context: BibTeX has a habit of splitting lines it considers excessively long, and if there are no space characters for it to use as ‘natural’ breakpoints, BibTeX will insert a comment (‘textpercent’) character … which is an acceptable character in an URL. Any current version of either of the url or hyperref packages detects this “textpercent–end-of-line” structure in its argument, and removes it.

babelbib bundle
biblio/bibtex/contrib/babelbib (or browse the directory); catalogue entry
custom-bib bundle
macros/latex/contrib/custom-bib (or browse the directory); catalogue entry
harvard.sty
macros/latex/contrib/harvard (or browse the directory)
hyperref.sty
macros/latex/contrib/hyperref (or browse the directory); catalogue entry
natbib styles
macros/latex/contrib/natbib (or browse the directory); catalogue entry
url.sty
macros/latex/contrib/url (or browse the directory); catalogue entry
urlbst
biblio/bibtex/contrib/urlbst (or browse the directory); catalogue entry


Go to previous question, or next question

Go to FAQ home.

URL for this question: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=citeURL

Comments, suggestions, or error reports? - see “how to improve the FAQ”.

This is FAQ version 3.28, released on 2014-06-10.