BibTeX

BibTeX is a convenient way to organize your references. To use BibTeX, insert the following lines at the end of your LaTeX file where the bibliography would be:

\bibliographystyle{apj}
\bibliography{refs}

You will need this file:

apj.bst

and your bibliography file

refs.bib

On a Mac, you can put these in Library/texmf/bibtex/ or you can put them in the directory you are compiling from.

Now you need to make refs.bib. It is a text file that contains information about your references. ADS automatically generates BibTeX entries for articles. Click on “Bibtex entry for this abstract” under the ADS abstract. The ADS entries for articles are good, but books and articles in books usually need to be modified.

To cite a paper in the text of your document, you use commands like

\citet{citekey}      citation in the text
\citep{citekey}      parenthetical citation

You need to specify a citekey for each citation in your bibliography file. There are many variations on these commands to make the citations look the way you want them to. This document lists some of them. The command \nocite{citekey1,citekey2,citekey3} adds references to the bibliography that haven't been cited in the text. I used this to add papers to the bibliography of my thesis that were cited by hand in the text of my pre-BibTeX papers.

To compile your LaTeX file, run

latex (or pdflatex or whatever you use) 
bibtex 
latex
latex

When you are ready to submit to ApJ, you will need to comment out

\bibliography{refs}

and paste in the contents of

ms.bbl

This file is generated automatically by BibTeX.

BibDesk

BibDesk is a nice Mac program for maintaining your bibliography file(s). Here are a few BibDesk notes:

Preset Format: Custom
Format String: %a[][+]31%y%u0  (set by clicking on Advanced)
Generate lowercase cite keys is checked in the Advanced dialog box.

This example generates cite keys like mc05, mcp05, mcp+05 where the letters are the authors' last initials, a + says that there are more than three authors, and the last two digits are the year. When you drag citations in from ADS, they have a citation key already set. Hitting ⌘k (apple-k) with the citation highlighted will regenerate the cite key according to your rule.

File papers in fixed location: ~/Documents/References
File papers automatically is checked
Preset Format: Custom
Format String: %a1/%f{Cite Key}%u0%e

When I download a paper, I save it to the desktop then drag it over its citation entry in BibDesk. BibDesk renames the file citekey.pdf and moves it to ~/Documents/References/FirstAuthorLastName/citekey.pdf. A thumbnail of the paper appears in the right-hand column of BibDesk when I click on a reference. I can double-click on the thumbnail, and it opens the paper. I like finding papers this way.

I added a column to the list of references by ctrl-clicking on the column names and choosing Add Other, then picking Group from the list. None of my references had a group field already. To add one, I select one or more references, then chose Edit; Find; Database Find and Replace.

Operation: Overwrite or Add Field
Field: Group
Value to Set: groupname
Selected Items and Set empty fields are checked
Then I click Replace All

The dialog box will stay open, so you don't have to go through all that again to do the same thing to other references. By clicking on the header of the left-hand column in BibDesk, you can choose “Group,” and it will list your groups. If you click on one, you will only see references in that group.