## Friday, July 9, 2010

### Using URLs as references with LaTeX and BibTex

Recently, while writing a paper using LaTeX, I needed to reference some URLs. Sometimes footnotes might be used for this, but here I felt it would be better to put it in the list of references using BibTeX. There are, however, no obvious way of referencing URLs with BibTeX. After searching a little and playing with the results, the the following seems to be a good way to write up URL references in BibTeX.

```@misc{example_com,     Howpublished = {\url{http://www.example.com/}},     Key = {example},     Title = {The example.com Web Site},     month = jul,     year = {2010}```
`}`

Howpublished is where you put the URL that should be displayed in the list of references. I also use the URL-package to make sure that the URL is formated properly. It is possible to use the hyperref-package to make the URLs clickable. Month and year are used to denote when the site was last visited.

When the list of references is created, this should create a reasonably nice display of the URL. An even better approach would probably be to use biber or BibLatex, but that was not really an option in this case.