Warning: require(): Unable to allocate memory for pool. in /storage/content/98/133698/erikfrojdh.com/public_html/wp-includes/template.php on line 690

How to include a publication list in WordPress

Having the need to reproduce a list of my publications on various locations (CV, website, applications etc.) it quickly becomes unreasonable time consuming to maintain a hand coded list. Using bibtex to handle references for my articles and CV it makes sense to use it as a base for the webpage as well.

1. Get your publications into a bibtex file

Can be done manually but better use an automated tool. I’m still on Mendeley even though there was some controversy with the Elsevier takeover. [1] Make sure Mendeley is saving the bibtex files by going to Mendeley Desktop > Preferences > Bibtex and check Enable Bibtex Synching. I’m using one bibtex file per collection and have all my publication stored in a separate collection.

2. Generate html code from the bibtex file

Secondly you need to generate html code from the information in the bibtex file. For this I’m using the excellent tool, bibtexbrowser. While there are other tools available most of them generate static html files but bibtexbrowser uses php to generate the list dynamically. It is also contained in a single php file, making installation simple since you just need to upload it and your bibtex file.

3. Include bibtexbrowser in WordPress

To get the publication list into a html document you need a short pice of php code:

include( 'bibtexbrowser.php' );

where Mov.bib is my bibtex file, getting all entries and using the academic style seperating different types of publications. You can also query on author name if you have a large bibtex file containing for example the publications of the while department.

To run the php code in a WordPress page I use the Insert PHP plugin and place the code between
Parse error: syntax error, unexpected ‘.’ in /storage/content/98/133698/erikfrojdh.com/public_html/wp-content/plugins/insert-php/insert_php.php(48) : eval()’d code on line 1

4. Customize bibtexbrowser

Bibtexbrowser can be customized using cusom functions in bibtexbrowser.local.php and by using CSS styles. Directly copied from the documentations my bibtexbrowser.local.php looks like this:

function my_sectioning() {
          // Books
                'query' => array(Q_TYPE=>'book'),
                'title' => 'Books'
          // Articles
                'query' => array(Q_TYPE=>'article'),
                'title' => 'Refereed Articles'
          // Conference and Workshop papers
                'query' => array(Q_TYPE=>'inproceedings'),
                'title' => 'Conference and Workshop  Papers'
          // others
                'query' => array(Q_TYPE=>'misc|phdthesis|mastersthesis|bachelorsthesis|techreport'),
                'title' => 'Other Publications'

This allows me to change categories and titles used in the academic style list. I also added some styling in my wordpress CSS file to customize the look. The classes used in the list can be found in the source code of the generated page.

Finally check out the result under: Publications

Warning: require(): Unable to allocate memory for pool. in /storage/content/98/133698/erikfrojdh.com/public_html/wp-includes/comment-template.php on line 1472

Leave a Reply

Your email address will not be published. Required fields are marked *