Correcting CiteULike when Using with Natbib, sed

Using CiteULike for administrating my paper bibliographic information is quite nice. I have all the information I need for citing the sources in papers, as CiteULike provides export capability for BibTeX.

The problem with this approach and the package natbib is that URL addresses, ISSN numbers and DOI stuff is used for creating the bibliography, looking nasty in my opinion. Therefore I used the powerful stream editor sed to delete these lines from my BibTeX file and also adding curly braces around capital letters in the title.

CorrectCiteULike.sed

`

Correcting Mistakes of CiteULike BibTeX Export Tool

delete URL lines (look nasty with natbib)

/url =/ d

delete ISSN lines (look nasty with natbib)

/issn =/ d

delete DOI lines (look nasty with natbib)

/doi =/ d

create curly braces around capital letters in titles

/\ttitle = {[^{]/ s/[A-Z]/{&}/g
`

Makefile

All you have to do now is to include the sed command in your Makefile, right in front of the bibtex command.

<br /> sed -i -f correctCiteULike.sed exported_bibtex_file.bib<br />