next up previous contents
Next: Footnotes Up: Common LaTeX Operations Previous: Generating an Index   Contents

BibTeX

As you learned in the first article, you manage your bibliographic citations using BibTeX. BibTeX is a separate program that you use to manage your bibliographic citations and merge selected citation information onto your LaTeX documents.

BibTeX solves some very common problems that arise when constructing a bibliography. For example, imagine you are writing a paper that includes many references and citations. Further imagine that the publication you are submitting to requires citation information to be formatted in a certain format; such as ACM or IEEE. Without BibTeX, you would need to maintain a list of your references and format each entry by hand in the required format. If you need to submit the paper to another publication, with a different citation format, you have to reformat each citation by hand.

BibTeX solves this problem quite easily. Here's what you need to do. First, maintain your citations in a format that BibTeX understands. You do this by formatting each citation in a defined format and placing it into a file with a .bib extension. You can place all citations in a single file, or break them up as you wish.

Here's an example of the format:

@misc{ wilson-ltxx,
  author = "Peter R. Wilson",
  title = "LTX2X: A LATEX to X Auto-tagger",
  url = "citeseer.nj.nec.com/wilson97ltxx.html" }

BibTeX identifies each record by its key. In the above example, the key is wilson-ltxx. This is the value you use to reference the citation within your LaTeX document.

As you can imagine, the format has many options and parameters. See the Resource section for more information. In fact, you can get many citations already formatted in BibTeX format at sites such as CiteSeer [http://citeseer.ist.psu.edu].

To create a citation in your text, use the cite command, with the parameter specifying the citation key. This command places a citation mark into the final text pointing to the reference and includes the reference in the bibliography. You can add a reference to the bibliography, without adding a reference mark to the main text with the no cite command.

To create a bibliography, add the following commands just before the end document command.

...
\bibliographystyle{plain}
\bibliography{sources}
...
\end{document}

The bibliography style command specifies the bibliographic style used to format each citation. The bibliography command instructs LaTeX to insert the appropriate citations into the document. BibTeX supports many bibliographic styles. See its documentation for more information.

To generate your bibliography, perform the following steps.

% latex latexfile
% bibtex latex-file
% latex latex-file
% latex latex-file


next up previous contents
Next: Footnotes Up: Common LaTeX Operations Previous: Generating an Index   Contents
Kevin O'Malley 2004-03-05