Go to the first, previous, next, last question, table of contents.

Citing URLs with BibTeX

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

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

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

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 macros/latex/contrib/other/misc/url.sty in this context, since (by default) it ignores spaces in its argument. 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, so that \url will typeset it. The way around the problem is to insert odd spaces inside the URL itself in the .bib file, to enable BibTeX to make reasonable decisions about breaking the line.


Go to the first, previous, next, last question, table of contents.