AASTeX, BibTeX, and Journal style

I’ve now got a winning strategy for citations:  BibDesk, AASTeX, and a python script to clean it all up.

Keeping track of citations is a pain, but there are lots of great tools out there for keeping them all straight and eventually importing them into your papers.  For a while I was a big fan of Papers for Macs. But when I put it into practice, exporting to a BibTeX database and importing into an AASTeX manuscript, I was disappointed. Mostly because Papers fetches data from ADS, but doesn’t use the AASTeX macros for the different journal names. And I couldn’t customize it. Annoying.

That’s when I tried another combination: BibDesk (part of the MacTeX package). It’s a lot like Papers, though with less bells and whistles. But you can’t beat the price (free) and it has this really nice feature:  highlight any citation string (like 2011AJ….141…19B), right-click, and choose “Add to BibDesk”. Voila! Citation is imported from ADS complete with AASTeX journal macros.

There’s just one little problem:  the resulting \bibitem entries have all the author names. The ApJ and AJ Journal styles like to have one, two, three, four, or two with “et al.”. So I wrote a python script to parse a .bbl file and output it with the author entries all fixed up. You might ask:  why not update the BibTeX database instead. Well, I thought about that, but decided I wanted to keep the database in tact, in case I ever want to find someone deep down in the author list (like, say, me). So here’s my magic recipe:

  1. Use BibDesk to maintain your .bib database:
    1. Add entries using the magic right-click-on-ADS-string
    2. Add entries by copying BibTeX entries to the clipboard.
    3. Merge previous BibTeX databases
  2. Use bibtex command as usual to build your .bbl file from your .tex manuscript.
  3. Run my python script:
    fix_authors ms.bbl
    (it will make a backup of the original file:  ms.bbl.backup)
  4. Re-run latex again. Maybe do that a couple of times. Just to be sure.
This entry was posted in Uncategorized. Bookmark the permalink.

Comments are closed.