Constructing a ~.bib file for LaTeX.


There are several approaches to including a bibliography into a LaTeX document. The easiest, but not the best is to construct a bbl file. The bbl file, of FILE.bbl where file is the name of the LaTeX file simply contains the command LaTeX interprets to write out the bibliography. The difficulty with a bbl file is that it is rigid. Once constructed, in order to change the formatting or ordering, manually rewriting the file is the only option available.

Instead, the preferred mechanism for producing a bibliography is to construct a bib file, i.e., a file, usually with the name FILE.bib. The bib file is a database file, which can be processed by the utility bibtex to produce a bbl file. The advantage is that the formatting of the bbl file is then determined by a style template, consequently the bibliography can easily be reforatted to meet the requirements of a particular publication.

This documentation provides information on constructing the bib file manually (and to explain its setup). The preferred mechanism for constructing a bib file is the the use of the latex package bibview. If you have old bib files, bibview will convert them to a standard format. It is recommended that you use bibview to construct bib files. You may invoke bibview from the Etextool package.


Setting up a bib file

The entries in the bib file are based on the type of reference, i.e., whether it is a book, journal article, and so on. For each of these choices, there are several fields which need to be complete in order specify completely the description of each entry in the database. Each entry is given a unique label, and this label is called in the \cite{} and \nocite commands in LaTeX to produce the citation.

For example, for the citation for an article by Jauberteau, Rosier and Temam, the entry would be:

@ARTICLE{jauberteau202,
AUTHOR = {F. Jauberteau and C. Rosier and R. Temam},
TITLE = {A Nonlinear Galerkin Method for the Navier--Stokes Equations},
JOURNAL = {Computer Methods in Applied Mechanics and Engineering},
YEAR = {1990},
VOLUME = {80},
NUMBER = {},
PAGES = {245-260},
MONTH = {},
OFNOTE = {PWL CAT202},
ANNOTE = {}     }
In this example, the citation reference in LaTeX would be for
\cite{jauberteau202}
or
\nocite{jauberteau202}
Note that a citation is used to invoke a particular passage in a text, while the \nocite command is used to include references from the bib database that are not explicitely cited by a \cite command. Thus if there is no reference anywhere in the text to the article by Jauberteau, it can be included into the list of references by using the \nocite command. This shows that 1) the items in the bib file are not automatically included in the reference list produced by latex, and 2) that a bib file can be constructed as a comprehensive listing of all references. Only those that are used in a particular article are included at run time by the \cite or \nocite commands. All other entries are excluded. For the book by Husemoller, the citation would be
@BOOK{husemollerd,
TITLE = { Fibre Bundles},
AUTHOR = { D. Husemoller},
PUBLISHER = { Springer-Verlag},
YEAR = {1966},
ADDRESS = {},
NOTE = {},
OFNOTE = {USM CAT89},
ANNOTE = {}    }

Several options are available such as @BOOK and @ARTICLE for entering a citation into the database.

Note that if there are several citations, the preferred method of citing is to use

 \cite{ husemollerd, auberteau202}
It is also important to alphetize the entries when an alphabetically sorted bibliography is being produced. Thus, for example, if a plain or siam style is used, the listings will be sorted alphabetically in the bibliography when the bib file is produced. This means that the number associated with the entry for Husemoller will be larger than the number for Auberteau. If the citation is reversed, for example, \cite{ auberteau202, husemollerd}, then the numbers appearing in the text will not be in ascending order. LaTeX will not resort this list for you. You need to be aware not produce an unsequential listing.

To be used by LaTeX, the bib file must be processed to produce a bbl file. This is done with the bibtex command. Thus if the file being processed were called FILE.tex with bib file BILE.bib, then

bibtex FILE

In order for LaTeX to produce the citation entries needed to pull the correct files from the bib file, the file FILE.bib must include the command:

\bibliography{FILE}
\bibliographystyle{plain}


Choosing a bst file

The entries in the bib file are based on the type of reference, i.e., whether it is a book, journal article, and so on. For each This command is usually followed by a command telling LaTeX the style to use to process the bib file entries by using a bst file:
\bibliographystyle{plain}
Where plain.bst is a file which determines the manner in which the bibliography is formatted.

Several options are available besides plain style. These include

\bibliographystyle{unsrt}
\bibliographystyle{siam}
\bibliographystyle{amsplain}
\bibliographystyle{apalike}

A comparison of several bst files is available along with the dvi files. The examples were generated using the script Embib which takes the entries in the file pat.bib and creates a latex file pat.tex and the file patnocite.tex. The script then runs latex, bibtex and then latex to produce the file pat.dvi. To use the script

Embib FILENAME
where
 FILENAME.bib 
is the bibliography database file to be processed. The bst file oplist.bst allows an entry for cataloguing the files.

In order for the bst file to be found, it should be on a path where LaTeX expects input to be found. To set the directory, use the shell variable TEXINPUTS.


Constructing a ~.bib file for LaTeX using a Front End

Several front end interfaces are available to assist in the construction of a bibliography database file, or bib file. These include:


Document Frontpage
Contents

USM
inquire@delphi.st.usm.edu
Updated

http://pax.st.usm.edu