

Creating the bib File and Running
BibTeX
For more information on writing BibTeX entries read BibTeX
Entry Types
For more information about ApJ bibliography and citation styles
read Citations commands
For more infomation on citations, and all the various ways to
enter citations (I only cover a small number of them here), read Using
natbib with AASTeX written by the AAS (a combination of natbib and
the style file for the bibliography allow all the various forms of
\citet and \citep).
PSUThesis uses BibTeX to create the bibliography for your thesis. In
order to use BibTeX, you first need to create a bibliography database.
The database is very easy to make assuming the papers you are citing
have entries on ADS,
because ADS will generate a BibTeX entry and link to it from the
abstract page.
Here are the steps to create a bib file:
- Start with a blank text tile in your favorite text editor, call it
something like "bibs.bib" (the name can be whatever you
want, so long as it ends in ".bib").
- To add an entry for "Morgan & Keenan, 1973, ARA&A,
11, 29", first search for it in ADS (using whatever method you
prefer), eventually you will arrive at the abstract
page
- On the abstract page, scroll down past the abstract, and you will
see a link to Bibtex
entry for this abstract
- Click on the BibTeX entry link and copy this entry to your bib file:
@ARTICLE{1973ARA&A..11...29M,
author = {{Morgan}, W.~W. and {Keenan}, P.~C.},
title = "{Spectral Classification}",
journal = {\araa},
year = 1973,
volume = 11,
pages = {29-+},
adsurl = {http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=1973ARA%26A..11...29M&db_key=AST},
adsnote = {Provided by the NASA Astrophysics Data System}
}
- You will want to change the first line after the "{" and
before the "," to a different citation key (whatever you put
there is what you'll have to put in all the \citet{} and \citep{} in
your document, so make it something short and easy to remember), for example I would change it to:
@ARTICLE{MK73,
author = {{Morgan}, W.~W. and {Keenan}, P.~C.},
title = "{Spectral Classification}",
journal = {\araa},
year = 1973,
volume = 11,
pages = {29-+},
adsurl = {http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=1973ARA%26A..11...29M&db_key=AST},
adsnote = {Provided by the NASA Astrophysics Data System}
}
- Enter any other papers in whatever order you want then save your
bib file. (Hint: do not leave any blank lines between entries, if you
would like "blank lines" to separate entries, start them
with a " % " to comment them out)
A Word of Caution about ADS and Conference Proceedings...
If you are citing conference proceedings and take the bibtex entry
from ADS, for some reason they do not add the "editor" or
"publisher" information in their bibtex entry. You will
need to enter these by hand. The information is included on the
abstract page, just add two lines into the bibtex entry, such as:
editor = {J.\ Smith},
publisher = {Conference Publishers R.\ Us.},
Be sure to inclose the entries with " { } " and end the line
with a comma. The ApJ bibliography format will pick up these two
entries and include them in your thesis bibliography.
Now, to compile you paper and generate a bibliography (for the first
time, after referencing a new paper for the first time, or removing
all references to a paper):
- Run latex on your paper (you'll get a bunch of citation errors -
that's OK): "latex mypaper"
- Run bibtex on you paper (important: be sure to leave off the
".tex" extension!!!): "bibtex mypaper" -- this
will generate the file "mypaper.bbl" which contains your
formated bibliography
- Rerun latex on you paper (you will need to do this a couple times
to get all the citations and cross-references correct).
- If you add/remove citations in the future, you will need to repeat
these steps to update the bbl file
Note: you can hand-edit the bbl file to make any minor tweaks you want
(however, be warned that the next time you run bibtex it will
overwrite the bbl file and thus destroy any tweaks you made --- so
it's probably best not to tweak it until you are absolutely certain
that all the references are included).
A quick note about citation references
BibTeX uses the \citet, \citep, and \nocite references in your paper
to determine what references to included in the bibliography from your
master bib file. General usage:
- \citet{<cite key>} = in-text citation, as in: Morgan &
Keenan (1973)
- \citep{<cite key>} = parenthetical citation, as in:
(Morgan & Keenan 1973)
- \nocite{<cite key>} = adds nothing to the text, but lets
bibtex know that you want a citation included in the bibliography,
in the document you may type: "As was shown in Morgan &
Keenan (1973)\nocite{MK73} ..."
If you would like to type in all your references by hand (rather than
using the \citet, \citep referencing), then in order for BibTeX to
know what to include in the bibliography, you will need to enter:
"\nocite{<bib citation keys separated by commas>}"
somewhere in your document.
Other fun facts:
- Three author papers --- the traditional way to deal with
three author papers is to list all three authors the first time you
cite the paper, then use "first author, et al." each
subsequent citation. BibTeX has a * version of \citet and \citep
that accomplishes this. The first time you cite a three person
paper, use "\citet*{<cite key>}" or
"\citep*{<cite key>}", this will cause LaTeX to
include all three author names. Then each subsequent time you cite
the same three author paper, just use "\citet{<cite
key>}" or "\citep{<cite key>}" which will
cause LaTeX to list only the first author followed by et al.
Caveat: the * form will also list all authors for papers with
more than three authors. So be careful if you are combining
multiple references into a single cite* command.
- Authors with "von part" names --- for author
names like "von Braun" or "de la Maire", in the
rare instance that a citation for this author starts a sentence
(i.e., "Von Braun (2000) said that..."), then it needs to
appear capitalized as "Von Braun", to get that to happen,
use "\Citet" (or you could just type it out by hand and
use \nocite).
- Adding other words to parenthetical citations --- for
instance you want a cite to say: "(see Morgan & Keenan
1973)" or "(Morgan & Keenan 1973, give examples of
this)"; \citep has square-bracket optional parts to add this
additional text: "\citep[text before citation][text after the
citation]{<cite key>}". Examples:
- (see Morgan & Keenan 1973) = \citep[see][]{MK73}
- (Morgan & Keenan 1973, give examples of this) =
\citep[][give example of this]{MK73}
- (see Morgan & Keenan 1973, for more examples) =
\citep[see][for more examples]{MK73}
Note: the comma is automatically added after the date, I couldn't
find anyway to get rid of it or change it to some other punctuation.
E-mail to
