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:

    author = {Jonas Mönnig},
    title = {How to Cite a Website with BibTeX},
    year = 2016,
    url = { },
    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

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

which would result to something like this:

    author = {jonas},
    title = {How to Cite a Website with BibTeX},
    year = 2016,
    howpublished = {\url{}},
    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.

Lustiges Tool zum Dateitransfer

Wer kennt das nicht? Man will ganz schnell mal eine Datei von einem Gerät auf ein anderes transferieren, aber hat keinen USB-Stick parat. Dafür habe ich nun eine Lösung entwickelt. Auf kann man genau eine Datei hochladen und sie dann genau einmal herunterladen. Ruft man die Seite auf und es liegt schon eine Datei auf dem Server, wird die Datei heruntergeladen und dann auf dem Server gelöscht. Ist keine Datei vorhanden, wird ein Formular angezeigt, über das man eine Datei hochladen kann. Versucht man eine Datei hochzuladen, obwohl schon eine andere auf dem Server liegt, wird die Anfrage zurückgewiesen.

Das Ganze funktioniert leider nur einwandfrei, wenn sehr wenige Leute es benutzen, da man jemand anderem die Datei vor der Nase wegschnappen kann und dieser diese dann nochmals hochladen muss. Da ich die Seite im Wesentlichen für mich geschrieben habe und nur wenige Leute diese Seite kennen werden, ist das aber ziemlich egal.