Computer Science Department, Bucknell University

BibTex Format
By Dan Hyde

The BibTex format is used to compile a bibliographic database. It is designed to coordinate with Donald Knuth's Tex documentation system. For details see Appendix B in "LaTeX: User's Guide and Reference Manual" by Leslie Lamport, second edition, Addison-Wesley, 1994.

Once you learn to use BibTex, you find that it easier to let BibTex make your reference list than do it yourself. Moreover, you will quickly compile a bibliographic database that eliminates almost all the work of making a bibliography. The BibTex format is extensively used by Computer Science Departments and others world wide.

I recommend you enter the entries by using the BibTex mode in the emacs editor.


Using BibTex Mode of Emacs

The BibTex Mode in Emacs allows you to enter, check for syntax, sort and edit bibliographic entries such as articles and books. It is very easy to use.
  1. Create a file with .bib extension.

  2. Open the file in emacs. (You may have to update your .emacs file in your home directory.)

  3. Look at the menus at the top of emacs. Notice the two labeled "Entry-Type" and "BibTex-Edit" (If you don't have them, either you do not have a file with .bib extension or you need to update your.emacs file.).

  4. For a new entry, select the appropiate item under "Entry-Type" menu. For example, for a book, select "Book" and you should see the following:
     @Book{,
      author = 	 {},
      title = 	 {},
      publisher = 	 {},
      year = 	 {},
      OPTkey = 	 {},
      OPTeditor = 	 {},
      OPTvolume = 	 {},
      OPTnumber = 	 {},
      OPTseries = 	 {},
      OPTaddress = 	 {},
      OPTedition = 	 {},
      OPTmonth = 	 {},
      OPTnote = 	 {},
      OPTannote = 	 {}
    }
    

  5. Fill in the cite key right between first { and the comma. For example,
                 @Book{Waterman:text-computational-biology,
    
    Use cite keys with NO blanks or commas. I suggest you use last name followed by ":" followed by phrase with "-" between words. For example:
            Smith:program-design
    
    These cite keys are used in the text of a LaTex document by \cite, for example,
          \cite{Smith:program-design}
    
    Cite keys must be unique. Also, since emacs sorts on these cite keys, best to use author's last name first.

  6. Fill in the rest of the field between the curly braces. For example:
    @Book{Waterman:text-computational-biology,
      author = 	 {Waterman, Michael S.},
      title = 	 {Introduction to Computation Biology: Maps, sequences 
                      and genomes},
      publisher = 	 {Chapman and Hall},
      year = 	 {1995},
      note = 	 {Excellent textbook},
    }
    
    If multiple authors, type an and between them. DO NOT use commas. For example:
    @Book{Kevles:genetic-code,
      author = 	 {Daniel J. Kevles and Leroy Hood},
      title = 	 {The Code of Codes},
      publisher = 	 {Harvard University Press},
      year = 	 {1992},
      note = 	 {scientific and social issues of the Human Genome Project},
    }
    
    Delete the fields not used. The OPT fields are NOT printed. To make them printing fields remove the OPT as shown in the "note" field. For help on what a field means, move cursor to that line and select "Help about Current Field" from "BibTex-Edit" menu. Message will appear at the bottom of emacs.

    After entering a few entries, check for correctness of the syntax by highlighting the region and selecting "Validate Entries" on "BibTex-Edit" menu.

    The .bib file in raw form may be edited as long as one does not mess up the structure and syntax.

  7. To sort the items, select "Sort Entries".

  8. To print the .bib file in raw form
         % lpr database.bib
     
    For explanation of the raw form, see Appendix B in "LaTeX: User's Guide and Reference Manual" by Leslie Lamport, second edition, Addison-Wesley, 1994.

  9. To print the .bib file in a nice format put the bibliography in a small LaTex document. See demo program print-bib.tex in directory~hyde/BibTex

Page maintained by Dan Hyde, hyde@bucknell.edu Last update September 6, 1997
Back to Computer Science Department's Home page.