Site icon texblog

How to use Bibtex as a reference library for Latex

Having all your references in a BibTeX-file (*.bib) is more convenient for reusage than typing or copy the whole list of references everytime you are writing a new book, report or article. Therefore, it is worth to learn how to use BibTeX from the beginning, it will save you a lot of time…

BibTeX offers a whole list of entry fields, entry types and different bibliography styles.
Entry fields (standard):

Entry fields (non-standard):

In addition, each entry contains a key that is used to cite or cross-reference the entry. This key is the first item in a BibTeX entry, and is not part of any field.

Entry types:

An article from a journal or magazine.
Required fields: author, title, journal, year
Optional fields: volume, number, pages, month, note, key

A book with an explicit publisher.
Required fields: author/editor, title, publisher, year
Optional fields: volume, series, address, edition, month, note, key

A work that is printed and bound, but without a named publisher or sponsoring institution.
Required fields: title
Optional fields: author, howpublished, address, month, year, note, key

The same as inproceedings, included for Scribe (markup language) compatibility.
Required fields: author, title, booktitle, year
Optional fields: editor, pages, organization, publisher, address, month, note, key

A part of a book, which may be a chapter (or section or whatever) and/or a range of pages.
Required fields: author/editor, title, chapter/pages, publisher, year
Optional fields: volume, series, address, edition, month, note, key

A part of a book having its own title.
Required fields: author, title, booktitle, year
Optional fields: editor, pages, organization, publisher, address, month, note, key

An article in a conference proceedings.
Required fields: author, title, booktitle, year
Optional fields: editor, pages, organization, publisher, address, month, note, key

Technical documentation.
Required fields: title
Optional fields: author, organization, address, edition, month, year, note, key

A Master’s thesis.
Required fields: author, title, school, year
Optional fields: address, month, note, key

For use when nothing else fits.
Required fields: none
Optional fields: author, title, howpublished, month, year, note, key

A Ph.D. thesis.
Required fields: author, title, school, year
Optional fields: address, month, note, key

The proceedings of a conference.
Required fields: title, year
Optional fields: editor, publisher, organization, address, month, note, key

A report published by a school or other institution, usually numbered within a series.
Required fields: author, title, institution, year
Optional fields: type, number, address, month, note, key

A document having an author and title, but not formally published.
Required fields: author, title, note
Optional fields: month, year, key

[Source: http://en.wikipedia.org/wiki/BibTeX]

Example bibliography entry in bib-file:

@article{zhou2005ada,
title = {Adaptive Successive Erosion-based Cell Image Segmentation for p53 Immunohistochemistry in Bladder Inverted Papilloma.},
author={Zhou, H. and Mao, K.},
journal={Conf Proc IEEE Eng Med Biol Soc},
volume={6},
year={2005},
}

Cross-referencing:

It is possible to cross-reference different entries by using the crossreference field, e.g. crossref = {zhou2005ada},

Usage in Latex:

Using your BibTeX-file in Latex is done by specifying a style: \bibliographystyle{style} as well as the bib-file \bibliography{filename1, filename2} (without the bib-extension, just the name). The most commonly used styles are: plain, acm, ieeetr, alpha, abbrv, siam.

Many other styles are available, see here for an extensive list.

PDF generation:

Generating your PDF is a bit of a hassle, as you have to run Latex several times, you need to run the following series of commands:

  1. latex input-file : complains about undefined citations
  2. bibtex input-file : generates a bbl-file
  3. latex input-file : complains about undefined citations
  4. latex input-file

You will have to repeat the procedure every time you add or remove citations, as they will imply changes in the bbl-file.

Note:

Exit mobile version