How to Cite a Website with BibTeX

Citing a website in some kind of scientific writing can be really annoying. If you use LaTeX (which you should do) to write it, you probably will use BibTeX for bibliography managment. However, because the BibTeX format has been relatively unchanged since 1985 there is no entry type for a website. The solution to this is just using the newer BibLaTeX which supports the @ONLINE entry type.

In order to switch from BibTeX to BibLaTeX you just need to add \usepackage{biblatex} to your preamble. Assuming your bibliography file is called bibliography.bib you will also have to add \bibliography{bibliography.bib} to the preamble. Printing the bibliography is done by \printbibliography instead of \bibliography{bibliography}. Instead of running bibtex on the .aux-file after running pdflatex for the first time, you will have to run biber on the generated .bcf-file. Much more about BibTeX and bibliography management in general can be found here.

Having done all this, this website for example could be cited after adding the following to your bibliography file:

@online{cite_key, 
    author = {Jonas Mönnig},
    title = {How to Cite a Website with BibTeX},
    year = 2016,
    url = {https://jonas-moennig.de/how-to-cite-a-website-with-bibtex/ },
    urldate = {2016-07-26}
}

This is a simple format but still annoying to type manually. Wouldn’t it be easier if you could just generate these entries automatically? That is why I have written a Firefox Add-on that does exactly this. It tries to extract author, title and publishing year from the website and generates an @ONLINE entry that can be copied and pasted into your .bib file. You still have to change the cite key manually as the add-on cannot guess what you would prefer. You can find the add-on in the Mozilla Add-on store.

Unfortunately version 1.0 requires Firefox 48 which at the time of this writing is only available as a beta version. A stable version can be expected mid-August. Until then you can install version 0.9.1 manually here.

If you don’t like the default template, for example because you want to use plain BibTeX and not BibLaTeX, from version 1.0 upwards you can change the template in the preferences. For a plain BibTeX format you could simply use

@misc{cite_key,
    author = {$author$},
    title = {$title$},
    year = $year$,
    howpublished = {\url{$url$}},
    note = {Accessed: $urldate$}
}

which would result to something like this:

@misc{cite_key,
    author = {jonas},
    title = {How to Cite a Website with BibTeX},
    year = 2016,
    howpublished = {\url{https://jonas-moennig.de/how-to-cite-a-website-with-bibtex/}},
    note = {Accessed: 2016-07-26}
}

Sometimes the add-on has multiple guesses available for author name, title and publishing year. In this case you can click on the current value to open a menu with all of the guesses from which you can choose from. Sometimes however, it doesn’t find the right values at all in which case you have to fill in the blanks manually.

As the add-on uses the WebExtension standard it can be easily ported to Chrome. If you want the add-on to be released as a Chrome extension, you can just leave a comment down below or feel free to fork the project on GitHub and do it yourself.

3 Gedanken zu „How to Cite a Website with BibTeX“

    • That happens sometimes on some Firefox-Versions. I don’t know why. It probably will work with future releases again. Sometimes it helps to close the popup and open it again.

Schreibe einen Kommentar