Home Curriculum Vitae References Blog Stuff

Navigation

Banner

Get Firefox!
Get Thunderbird!
W3C HTML Validator
W3C CSS Validator

www.classen.be

BibTeX to Html Script

bibtex2html is a small PHP script which converts a BibTeX file into Html code, producing a list of the publications contained in the file.

The script is particularly useful if you want to include a list of your publications on your website, without having to worry about updating the .html file each time a publication is added or something else changes. As you have your bibliography in a BibTeX file anyway, you simply replace the online BibTeX file (an operation which is quick and easy).

Download the script (latest version from 20100401)

The script is also available as a plugin for Wordpress. The plugin, called bibtex adds a new tag [bibtex]...[/bibtex] which you can use in posts or pages to display a list of BibTeX entries in nice Html. The BibTeX entries are stored inside a regular Wordpress page or post, not inside a separate file. This makes it easy to edit them with the normal user interface.

Download the Wordpress plugin (latest version from 20100401)

Instructions for the script

The script is easy to use, you only need to add two lines of PHP code to your webpage; there is nothing to configure whatsoever. If you are used to managing your bibliography with a BibTeX-based management tool like JabRef, this is all quite straightforward.

There are several parameters that allow you to configure how the entries are grouped/ordered, and which group titles are used. This, and instructions about how to change the layout of a listing can be found in the short documentation (the first part of the php file).

It is also possible to place a link opening a popup showing the BibTeX of an entry (for the visitor to copy/paste).

Instructions for the Wordpress plugin

The Wordpress plugin is even easier to use. To instal it, unzip the archive and upload its contents into the wp-content/plugins/ folder; then activate the plugin in the plugin settings page. That's it. To show a list of BibTeX entries, just paste the raw BibTeX into the content of a page or post and enclose it with the tags [bibtex]...[/bibtex], like so:

   This following is a list of nicely formatted publications:
   [bibtex]
   @article{foobar, 
      author = {...},
      ...
   } 
   ...
   @inproceedings{toto,
      author = {...},
      ...
   }
   [/bibtex] 

There can be multiple lists inside the same page.

You can use [bibtex groupyear] to group entries by year or [bibtex grouptype] to group them by type (both can also be combined). Other advanced settings of the raw script (like changing the names of the entry types) are not yet available in the Wordpress plugin version.

There will be a "BibTeX" link behind every entry; clicking on it will open a popup window with the raw BibTeX of the entry.

Instructions about how to change the layout of a listing can be found in the short documentation (the first part of the bibtex2html.php file inside the plugin folder).

General remarks

bibtex2html interprets several non-standard BibTeX fields:

  • url: The content of this field is assumed to be the url of the venue. It is used on the "in" part of the citation. If there is no "in" part, a "more..." link is displayed at the end.
  • webpdf: This is assumed to be a link to the pdf file of the given publication (the title becomes clickable and a "pdf..." link is displayed).
  • publisherurl: The url of the publisher, used on the "publisher" part of the citation. If there is none, a "publisher..." link is displayed at the end.
  • citeseerurl: The citeseer url (displayed as "citeseer...").
  • doi: This is supposed to be DOI name from dx.doi.org (displayed as "doi...").

Note that the script does not interpret BibTeX strings (abbreviations), crossrefs or similar things, maybe I'll add this one day. If you need a more comprehensive BibTeX parser, check out bibliophile.sourceforge.net.

Feel free to use/adapt this script like you want. If you detect errors in the presentation of a given entry, please send me a desrciption of the error so I can correct it in subsequent versions.

Thanks to

Contact

acs
@
info.fundp.ac.be

Other Website

My page at the University of Namur.

 

[ copyright © 2010 by Andreas Classen ]   [ Curriculum Vitae ]   [ References ]   [ Blog ]   [ Stuff