URLs in bibtex

A source of frustration for me over the past month or so has been how bibtex has handled URLs in the citations of my german coursework. Firstly I tried something like the following:

@misc{foo,
author = "{\url{www.example.com}}",
title = "{Foobar}"
}

and then \usepackage{url} in my main document, however this was rather messy and also didn’t work (can’t remember the errors, but something concerning the fact that the url wasn’t fixed and so latex couldn’t precalculate).

Solution

As the document in question is written in german, I was using the babelbib bibtex styles. These allow bibliographies to be in languages other than english:
e.g. “Literaturverzeichnis” is used instead of “Bibliography”
The best bit: bibtex styles include support for urls.

@misc{wiki_ger_dialect,
    author = "http://en.wikipedia.org/wiki/German\_language\#German\_dialects\_ versus\_varieties\_of\_standard\_German",
    title = "{German dialects versus varieties of standard German}",
}

became

@misc{wiki_ger_dialect,
    url = "http://en.wikipedia.org/wiki/German_language#German_dialects_ versus_varieties_of_standard_German",
    title = "{German dialects versus varieties of standard German}",
}

My bibliography now looks much better, with URLs typeset in the typewriter font.

The bibliography using URLs.
The bibliography using URLs.

See also: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=citeURL

Advertisements
URLs in bibtex

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s