A couple weeks ago, I was looking around the web for a script that would create a small bib file for just the references cited in a certain TeX manuscript. It took me a while to find the right one (aux2bib), which prompted me to write this post on LaTeX/BibTeX tools that are available but not widely known or used. (Kelle has previously talked about some of the basic LaTeX tools here.) Here are five of my favorites, which I think everybody should consider using:
1) Ultimate LaTeX Makefile: While typing latex/bibtex/latex/latex does the trick, it is inefficient. You should use a makefile which will do all of this in one shot. I prefer the Ultimate LaTeX Makefile (here is an alternative by Chris Munson) but also tend to use my custom bash script, which has latex/bibtex/latex/latex/dvipdfm/aux2bib. (This is arguably similar to the “Typeset” button that the GUI versions of TeX offer.) The Ultimate LaTeX Makefile has options to produce either a pdf or a ps, tex all documents or just one document in a directory, write to a html file, and delete the various files produced by TeX. The other reason to use a makefile is not having to produce the bibliography every time you recompile, which is very useful when you are working with large documents.
2) submit_prepare.pl: Marshall Perrin’s perl script prepares your manuscript for submission to the ApJ or ArXiV. The script renames the figures as required by ApJ (e.g. fig1, fig2, …); decreases the resolution of figures and, consequently, the file size (as required for ArXiV submissions); tars everything into a tar.gz file; and removes all comments from the tex file. Especially the first two tasks can be quite time-consuming. This is a great tool to help you get to the “Submit” button.
3) aux2bib: Assuming you maintain a global bibtex file, the number of references it contains easily numbers more than a few hundred. As a result, either storing a copy of the bib file (with the completed paper for your archives) or sending a completely compile-able draft to a collaborator can be a nuisance. David Kotz’s aux2bib makes a sub.bib which includes only the references used in your current draft.
4) ADS-to-BibDesk: I learnt about this Jonathon Sick app from a comment on an AstroBetter post. As the name indicates, this grabs the bibtex, abstract, and PDF for a article from your web browser (Safari or Firefox) and imports it to BibDesk. Having to do this manually is a waste of an astronomer’s time. [Update:] There is also a shell script by Rui Pereira to update the BibDesk references (and pdf) from astro-ph version to the journal version, when it is published.
5) emulateapj: This emulates the ApJ formatting styles and should be very well-known. While it does take a bit of time to convert your aastex to emulateapj, you will have a nicely formatted document at the end. In addition, by uploading fewer pages on to ArXiV, you will save more than a few trees.
I look forward to hearing about more such tools and further automating my LaTeX!
[This post has been reorganized and incorporated in the wiki.]