How to write BibTeX files

From CCM
Jump to: navigation, search

Contents

Basics

A simple example

@ARTICLE{Anderson-2001-EAK,
  author = {Anderson, J. L.},
  title = {An Ensemble Adjustment {K}alman Filter for Data Assimilation},
  journal = {Monthly Weather Review},
  year = {2001},
  volume = {129},
  pages = {2884--2903}
}

Spacing and capitalization

  • Space between authors' initials, dot after each initial. The BibTeX style will decide the spacing in print.
  • All significant words in the title are capitalized. The style will decide if to change to lowercase or not.
  • Protect letters in the title that should stay uppercase (but nothing else) by { }.
  • -- for the proper long dash

Entry names a.k.a. keys

The first field Anderson-2001-EAK in the entry is called the key. I am using the key also for file names when I have the fulltext, so in the references directory, this paper would be as Anderson-2001-EAK.pdf.

Do not code

  • author = {Anderson, J.L.} (no space between initials) or author = {Anderson, JL} (duh)
  • title = {{An Ensemble Adjustment Kalman Filter for Data Assimilation}} - defeats the capitalization by the style
  • title = {An Ensemble Adjustment Kalman Filter for Data Assimilation} - will result in "kalman" if style puts the title in lowercase
  • journal = {Monthly weather review} (missing capitalization)
  • journal = {MONTHLY WEATHER REVIEW} (too much capitalization)

Comments

  • BibTeX ignores fields unknown to the style, good for comments - if you want to get rid of note= in print but keep the info just change it to say xnote=.
  • BibTeX ignores entries that do not start with @ so changing @ARTICLE to ARTICLE above will make the whole entry to a comment.

DOI

Whenever DOI is available, use it instead of URL. Code DOI as its own field,

doi="10.1051/jphys:019860047010100"

The idea of DOI is that it provides a permanent link to the online paper, in the above example as http://dx.doi.org/10.1051/jphys:019860047010100 But do not put URL like this in the BibTeX entry.

Some BibTeX styles now print DOI. More and more journals will expect it, soon all will. Most publishers have provided DOI even for backfiles of papers from pre-internet times, so you need to fix up your old BibTeX entries. Online books (such as from Springer) have DOI and usually one for the book as a whole and a separate DOI for each chapter.

Real publications have DOI. Preprints and conference websites don't. (So far attempts to have the library provide DOI for reports and theses as a part of their online publishing mission were unsuccessful.)

Some DOI contain special characters that throw off some LaTeX styles. In some styles, you need

doi="10.1175/1520-0493(1998)126<1469:TUODWO>2.0.CO;2"

while in others

doi="10.1175/1520-0493(1998)126$<$1469:TUODWO$>$2.0.CO;2"

otherwise you get unprintable characters. You might need to make two entries in your database with the different DOI and then use whichever works in a particular paper.

Web links

You should use URL only if the resource cited does not have DOI. If you must use URL it should be coded using the \url command. This will result in a proper fixed font and the link can break between lines. You have to add \usepackage{url} or \usepackage{hyperref}or to your main LaTeX file for this to work. (Both produce clickable links in pdf file, the latter works also for links broken between lines.) URLs are important for reports that are otherwise hard to find. It is best to include the link in the note field, then it will print in any style and it gets printed at the end of the entry. Do not use the url= field in BibTex files, this will give inconsistent results for different styles and bad formatting in many.

@misc{Norton-2009-WHS,
title="Analysis and Visualization of High-Resolution  {WRF} Hurricane Simulation using {VAPOR}",
author="Alan Norton and Yongsheng Chen and John Clyne",
howpublished="10th WRF Users' Workshop, National Center for Atmospheric Research, Boulder, CO, June 23--26, 2009",
note="\url{http://www.mmm.ucar.edu/wrf/users/workshops/WS2009/abstracts/P1-02.pdf}",
year="2009"
}

Websites should have a date visited because they may go away in time. NSF requires the date visited in proposals.

@misc{WRF,
key="WRF",
title="{Weather Research Forecasting (WRF) Model}",
year="2005",
howpublished="\url{http://wrf-model.org}",
note="Visited July 2010"
}

Also, there is no author here, and the key= field tells BibTeX how to sort this entry alphabetically. Not all styles may treat author-less entries well, so you may have to use something like author="WRF Working Group" instead. Some styles end the sentence before the note and some will not, so you may need to change "Visited" into "visited".

Common sense

  • Use abbreviations for all journals or for none. If you use abbreviations be consistent. Journal may require a specific abbreviations scheme (such as from MathSciNet).
  • Avoid Unidentified Flying Conference Papers! A reference like
@misc{Geiser-2005-OSI,
    author="J\ddot{u}rgen Geiser",
    title="Operator Splitting Methods for Transport Equations with Nonlinear Reactions",
    howpublished="Third M.I.T. Conference on Computational Fluid and Solid Mechanics, Massachusetts Institute of
          Technology Cambridge, USA, June 14 - 17, 2005,
    year="2005"
}

is useless, impossible for the reader to find, and may as well not exist. Either it is a book, then it has book title, editors, and publisher, or it is a web resource and it has URL. Some areas (meteorology, for example) do not even allow this kind of citations.

  • Avoid coding et al., ..., and such. Spend the effort and get the actual information instead.
  • Avoid hearsay: Never cite anything you have not read yourself, you do not know what is there.

Where to get BibTeX entries

Look in the databases we have first. You can refer to the the .bib files there directly (then you will benefit from any updates) by including the proper relative path in your file, as in \bibliography{../../bibliography/dddas-jm}, or copy the entries for your paper only into a file in your paper's directory.

Many reference searches and fulltext sources provide BibTeX entries also, however the entries are often incorrect, or badly and carelessly formatted, and must be verified against the paper fulltext and edited by hand.

  • MathSciNet - the standard in math, but often too wordy - you may need to squash the note= field, and (electronic) in journal names
  • Google Scholar - titles are enclosed in double { }, journal names often miscapitalized or incorrect, chapters in books tend to have incomplete info
  • Web of Science - miscapitalized, uses double { }
  • SpringerLink - export citation in BibTeX format may produce a text file with extension .ris, which however contains BibTeX and should be viewed in a text editor; author middle initials missing; page numbers have a single - instead of -- ; the note= field needs to be changed to doi=.
  • Microsoft Academic Research

Bibdesk and other tools

The rules above still apply - just using a tool does not make everything magically correct. Always check the BibTeX file in a plain text editor, and by actually using the citation in LaTeX. These tools also tend to produce some garbage fields which are best to be deleted.

Other links

See also

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox