“the j stands for Jeering”
about me | research blog | wordpress plugins | jQuery plugins

3 May, 2010

Mendeley, BibTeX and citing Website URLs

The Problem

  1. Using Mendeley Desktop (<3) to manage all my dissertation references, which automatically writes a BibTeX (.bib) for me which I include in my LaTeX document. So far so good.
  2. When I manually create an entry in Mendeley for a website, it creates a BibTeX entry like the following:
    @misc{myKey,
    author = {Surname, Name},
    title = {{Website Name}},
    url = {http://my.url.com/},
    year = {2010}
    }
  3. That looks fair enough, but standard BibTeX/LaTeX simply ignores the url field in the entry… which makes the reference look rather stupid. So how can I handle websites properly?

What I hoped I would be able to find

  1. I wish Mendeley had some more advanced options which controlled how BibTeX files were created, this would have definitely been the most ideal option, but alas no such options exist. Editing the generated .bib yourself would be pointless since Mendeley will just overwrite the file each time.
  2. BibTeX itself could really do with an update in the website-citation department. I’ve seen lots of talk about new versions but can’t see where they are… Also I know there are alternative BibTeX packages which can be used, but this was something I wanted to avoid because sometimes you can’t tell what else it’s going to change in your references. For more information on the options, I recommend this link: URLs in BibTeX bibliographies

The Solution

  1. The best solution I could come up with so far, is to simply delete these references from Mendeley and put them in your own custom .bib file. Thus, you will have the Mendeley-generated bib file (which we’ll call mendeley.bib) and your own custom bib file for website entries (which we’ll call websites.bib)
  2. When writing your BibTeX website entries, be sure to use the howpublised field like so:
    @misc{myKey,
    author = {Surname, Name},
    title = {{Website Name}},
    howpublished = {\url{http://my.url.com/}},
    year = {2010}
    }
  3. This will get BibTeX to correctly show the URL in the bibliography entry.
  4. Finally in your LaTeX document be sure to include both bib files, like so: \bibliography{mendeley,websites}

An Alternative

Actually, what I ended up doing in my dissertation is listing these “one-off” website references as footnotes rather than actual citations, since they’re not exactly publications. Obviously you will have to see whether this is applicable or not to you.

11 June, 2009

Adding Citation and Bibliography styles to Microsoft Word 2007

Just as it says on the tin!

BibWord : Microsoft Word Citation and Bibliography styles

All you do is download the XSL file for the style you want and place it in the right directory, and hey presto Word 2007 can format your citations in a new style. Nice.