, , , , , , , ,

This is a three part article describing different ways to handle bibliography and citation in LaTeX: (1) using  thebibliography environment, (2) using BibTeX, and (3) controlling BibTeX citations using natbib.

1. Using thebibliography environment to create bibliography:

The easiest way to create a bibliographic references for a scientific article is using thebibliography environment, especially when you have a very few references:

\bibitem[label1]{cite_key1} Mead, C. A.; Truhlar, D. G. {\it J. Chem. Phys.} {\bf 1979}, {\it 70}, 2284.
\bibitem[label2]{cite_key2} Mead, C. A.; Truhlar, D. G. {\it J. Chem. Phys.} {\bf 1983}, {\it 78}, 6344.

Notice that I have formatted the references in accordance with the requirement of the journal where I am going to send the article

Put the above environment in your LaTeX source file somewhere in between \begin{document} and \end{document}, where you want your bibliography to appear. The field with 99 in it indicates the maximum length of your entry labels. If you put 1 in place of 99, the bibligraphy cannot have more than 9 entries (because 10 has two digits, i.e. width=2). 99 is a safe number to use! The optional argument label at the beginning of each bibitem gives you an option to put your own label.

If you want to cite the second one, do it as

I am citing the second reference\cite{cite_key2} here.

Easy, isn’t it?

However, the problem with this is that you have to manually type each entry, and you cannot reuse the list for another journal unless you change the format by explicitly typing again. If you want to use the same bibliographic database again and again you should use BIBTeX (especially if you are going to stay long enough in this business!).

2. Using BibTeX to create bibliography:

A. First, create your bibliographic database.

I generally break it down into two parts: (1) abb.bib, which contains the 3-6 letter abberviations of the journal names and their expansion according to the journal where the article is going to be submitted, and (2) ref.bib, the actual bibliographic database with the 3-6 letter abbreviations in place of the journal names.

A sample of abb.bib:

@String{AnMath="Ann. Math."}
@String{CheRev="Chem. Rev."}
@String{CMP="Commun. Math. Phys."}

and a snippet of ref.bib:

author = "J. Aguilar and J. M. Combes",
title = "A class of analytic perturbations for one-body {S}chr{\"o}dinger {H}amiltonian",
journal = CMP,
year = "1971",
volume = "22",
pages = "269--279",

I use the graphical front-end Jabref package to maintain the ref.bib file (in fact, I used Jabref when I first created the database). Besides editing and entering new references, I can also link individual PDF files of the corresponding entries — thus it’s a PDF organizer as well. However, in order not to have to modify the journal names I always put there the abbreviations (e.g. CMP for Communications in Mathematical Physics above) and expand their names manually in abb.bib in accordance with the requirement of the journal where I am going to send the article. So if I have the same bibliographic database, ref.bib I can use it for all the journals as long as I modify abb.bib correctly.


Note that the quotes in the database may be replaced by braces, but the braces have another very important use, namely to protect the contents within it:  the braces in  “{H}amiltonian” protects the uppercase H even though most bibliography styles  forces the whole title to be typeset as a sentence by lowercasing all letters except the first.

B. Cite!

Cite the reference in the same way as above, e.g.

I'm citing Aguilar and Combes' complex scaling paper.\cite{agu71}

Use the cite command to your heart’s content in the LaTeX source file and then proceed to the next step. Needless to point out, if you use a reference not in the database, ref.bib,  you must enter it in the database (or else don’t cite it at all!).

C. Copy the correct bibliography style (*.bst) file in the working directory.

It’s usually available in the CTAN or TUG websites. For example, for American Chemical Society’s Journals, the achemnat style file may be used [link].

[Update (11/19/2009): The original achemnat.bst file seems to be missing in the above link;  here is a copy from Google’s cache]

If you don’t want to use any style file, that’s OK, too (see below).

D. Link  the bibliographic style file and the database to the LaTeX source code.

Enter these two lines  where you want the bibliography to appear in the LaTeX source file:


The first one is to specify which style-file (here, achemnat.bst) is going to be used. If you don’t want to use any style file other than the default, just replace achemnat by plain above. Some styles files are in-built which comes with other packages. Some useful style files may be found here.

In the second line, the stuff in the curly brakcets tells LaTeX where to look for the bibliographic database. Here, abb refers to the file abb.bib, and ref to ref.bib [see 2. A above]. You need to copy these two files in your working directory.

E. Lastly, compile!

Compilation  is the trickiest part — you have to compile it twice (maybe, thrice!) with latex:

$ latex source.tex
$ bibtex source
$ latex source
$ latex source

3. Citation using natbib:
More control over citations for BibTeX can be achieved using natbib package [download link]  — include these in the preamble:

\usepackage[super,comma,numbers,sort&compress]{natbib} % First (see below)
\renewcommand\bibname{REFERENCES} % Second (see below)
\renewcommand{\bibnumfmt}[1]{(#1)} % Third (see below)

Let’s try to explain above options one-by-one:

  • First: the terms within the square bracket mean (in respective order) cite as superscripts; separate two citations by a comma; use numbers (not alphabet) for the citations; sort in increasing order and compress, i.e. if the references 1 and 3 through 5 are cited then show the citation as 1,3-5.
  • Second: give the bibliography the title “REFERENCES”.
  • Third: make the number format in the bibliography as (1), (2), etc.

Cite the references in the same way as above [see 2. B above].

See this link (PDF) for more details on natbib.