Automating my CV

To celebrate the submission of my most recent paper, I decided to finally fix the organization of my personal publications list. This seems rather presumptuous, since I have just a handful of papers to my name, but I enjoy automation and organization for their own sake, and this was a nice opportunity to make my life easier and learn a few new tools. It also had the side benefit of making it much easier for me to manage the documents I cite in my writing.

The complete workflow I’ve put together lets me easily auto-generate my CV as a PDF, populated with my publications, and also produce nicely-formatted HTML which is automatically included in my about page. The tools I’m using are:

ZoteroAutoZotBibbibtex2html

Zotero is a very nice tool for organizing documents and information, particularly scientific papers. For me, it has completely replaced Mendeley and Papers2, both of which I had used in the past but which ultimately turned out to be unsuitable for me, in particular because Papers has no Linux version, and Mendeley’s owners are ethically questionable. Zotero is free software and generally does everything I need quite well, but it is missing one of my favorite features from Mendeley: automatically exporting a collection of scientific papers as a BibTeX bibliography. In case you’re not familiar with LaTeX and BibTeX, they are the most widely used and mature tools for generating scientific, technical, and mathematical papers and bibliographies, respectively. Mendeley’s auto-export meant that I could create a single collection of all of my publications, automatically export it to a BibTeX file any time anything changed, and use that file to generate the list of publications in my CV, which is a LaTeX document.

Fortunately, Zotero’s free-software nature meant that someone had already developed a partial solution to my problem. Robin Wilson’s AutoZotBib plugin will generate a BibTeX bibliography file for your entire Zotero library and keep that file up to date any time you add or change a document. This was overkill for just the few papers in my CV, and it wasn’t quite flexible enough, so I learned enough about Zotero’s plugin structure (which mimics the extensions in Firefox) to extend the plugin into my own version. My fork of AutoZotBib lets the user specify a list of rules for auto-export, where each rule consists of a Zotero tag and a filename. A complete bibliography of all Zotero documents matching the given tag will be exported to the given filename, and the files are all kept up to date any time a tagged document changes. This turned out to be extremely useful, not just for my CV but for all of my paper writing. For every paper I write, I can tag all of the related documents in Zotero and have them automatically exported to BibTeX and available to cite in my writing.

Generating my CV Publications

Once I had a BibTeX file with the correct bibliography, including them in my LaTeX resume was remarkably easy. To include a given publication in my CV, I just use the LaTeX \nocite command, which ensures that a given document will appear in the bibliography but won’t generate an inline citation. So, the source file for my CV contains lines like the following:

\nocite{deits_computing_2014}
\nocite{fallon_architecture_2014}
\nocite{deits_radial_2014}

And to produce the bibliography containing the cited documents, I add the following:

\renewcommand\refname{} % prevent LaTeX from adding a "References" headline
\vspace*{-3em} % squish the references together
\bibliographystyle{IEEEtran}
\bibliography{refs} % where refs.bib is my BibTeX file

The result is very nice:

and the best part is that I never have to think about the order or formatting of a proper bibliography reference.

Embedding my Publications

I also decided that, in addition to my CV as a PDF, I wanted a list of publications embedded in my personal website. Rather than generating that list by hand, I found the bibtex2html tool, which converts the BibTeX file generated by AutoZotBib into nicely formatted HTML. To get the citations nicely formatted in a way that was compatible with embedding in the blog, I used the following command:

export TMPDIR=. \ # This gets around a bug in bibtex2html on OSX
&& bibtex2html --sort-by-date \
               --reverse-sort \
               --style plain \ # use the "plain" BibTeX style
               --no-header \ # remove some comments at the beginning of the file that confused my markdown interpreter
               --nodoc \ # don't generate the HTML <head> and <body> tags so we can embed the output in another page
               --html-entities --unicode \ # nice non-ASCII characters
               --nobibsource \ # skip generating an extra .bib file
               -nokeywords \ # don't include my Zotero tags in the output
                ~/Documents/Resume/Latex/refs.bib # the BibTeX file generated from Zotero

Results

You can see the output in my CV here: Robin_Deits_CV.pdf and my HTML publications list here: about.html#publications.

Robin Deits 06 April 2014