Mendeley, BibTeX and citing Website URLs
The Problem
- 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.
- 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}
} - That looks fair enough, but standard BibTeX/LaTeX simply ignores the
urlfield 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
- 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.
- 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
- 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 callwebsites.bib) - When writing your BibTeX website entries, be sure to use the
howpublisedfield like so:
@misc{myKey,
author = {Surname, Name},
title = {{Website Name}},
howpublished = {\url{http://my.url.com/}},
year = {2010}
} - This will get BibTeX to correctly show the URL in the bibliography entry.
- 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.