References and Bibliographies

From QERM Wiki
(Difference between revisions)
Jump to: navigation, search
(Table of contents info)
(added note about subsetting .bib files)
Line 33: Line 33:
  
 
Far and away the best tool for creating <code>.bib</code> files is [http://jabref.sourceforge.net/ JabRef], which has tons of great neat and simple features.  It can, however, consume considerable resources from a machine (especially if the machine is clunky and old). JabRef uses BibTeX as its native format, which means that changes can be made directly to the .bib file as well as within JabRef.
 
Far and away the best tool for creating <code>.bib</code> files is [http://jabref.sourceforge.net/ JabRef], which has tons of great neat and simple features.  It can, however, consume considerable resources from a machine (especially if the machine is clunky and old). JabRef uses BibTeX as its native format, which means that changes can be made directly to the .bib file as well as within JabRef.
 +
 +
==Subsetting .bib files==
 +
 +
For daily use, there seems to be no reason not to put all references into the same increasingly giant .bib file, which gets called from any .tex file that you compile. This way there's never any doubt about which file is most current, or where to look for a given reference. However, those [http://www.ccrnp.ncifcrf.gov/~toms/latex.html#tex-latex_publishers enlightened journals] which accept LaTeX submissions may not want to receive such a giant file (indeed, the contents might be embarassing if you're ashamed of your love of ''Yertle the Turtle and Other Stories''). To solve this problem, you can temporarily replace your .bst file with [http://ctan.binkerton.com/biblio/bibtex/utils/bibtools/subset.bst subset.bst], which will create a new .bib file when you compile, with will contain only those references which were used in the .tex file that you compiled.
  
 
==makebst==
 
==makebst==

Revision as of 01:04, 11 December 2008

Contents

BibTeX

There is a tool called BibTeX within LaTeX that formats lists of references and generates all the appropriate references within a document when called. The bibliography itself is in a text file with a .bib extension. A .bib file might contain the following entry:

 @BOOK{Lotka1924,
 title = {Elements of Physical Biology},
 publisher = {Williams and Wilkins},
 year = {1924},
 author = {Lotka, A.J.},
 address = {Baltimore}
}

or, for a journal article:

@ARTICLE{Kareiva1983,
 author = {Kareiva, P. M. and Shigesada, N.},
 title = {Analyzing insect movement as a correlated random walk},
 journal = {Oecologia},
 year = {1983},
 volume = {56},
 pages = {234-238},
 url = {http://www.springerlink.com/content/m525270k7647u074/fulltext.pdf}
}

The first line is a reference key which can be used in the LaTeX body in a variety of ways. For example, using the natbib package, \citep{Kareiva1983} will output (Kareiva and Shigesada, 1983), while \citet{Kareiva1983} will output Kareiva and Shigesada (1983). See more examples here. And see a better overview explanation here.

Table of Contents

If you are using \tableofcontents and want your References/Bibligraphy section to appear in the table of contents, add \addcontentsline{toc}{chapter}{References} just before the bibliography command. Or, to make it appear as a numbered section, add the following just before the bibliography command:

\clearpage
\section{References}
\renewcommand*{\refname}{}

JabRef

Far and away the best tool for creating .bib files is JabRef, which has tons of great neat and simple features. It can, however, consume considerable resources from a machine (especially if the machine is clunky and old). JabRef uses BibTeX as its native format, which means that changes can be made directly to the .bib file as well as within JabRef.

Subsetting .bib files

For daily use, there seems to be no reason not to put all references into the same increasingly giant .bib file, which gets called from any .tex file that you compile. This way there's never any doubt about which file is most current, or where to look for a given reference. However, those enlightened journals which accept LaTeX submissions may not want to receive such a giant file (indeed, the contents might be embarassing if you're ashamed of your love of Yertle the Turtle and Other Stories). To solve this problem, you can temporarily replace your .bst file with subset.bst, which will create a new .bib file when you compile, with will contain only those references which were used in the .tex file that you compiled.

makebst

Do you not like any of the available reference styles, or need to create your own to match a particular journal? makebst helps you create a .bst file. Here's how to use it:

  1. Run the command latex makebst in the directory you want to create .bst the file (i.e. where your tex file is)
  2. Follow the directions to enter the output file name and describe reference formatting
  3. In your tex file, set the bibliography style to your new file you just created: \bibliographystyle{myStyle}
  4. Compile

Also, makebst also creates a .dbj file that you can tweak instead of going through all the questions again. After you make changes, simply run latex myStyle.dbj to recreate the .bst file.

EndNote and other reference software

EndNote and other programs offer the option of exporting their records in the BibTeX format (see the Using EndNote with LaTeX/BibTeX FAQ at MIT for more information on this). However, changes to the resulting file will not be recognized by EndNote without importing them back in.

The Great Zotero Debate

Tommy writes:

I came across Zotero (http://www.zotero.org/), a Firefox plugin that acts as a Reference manager. I was able to import my .bib file and then use a plug-in for Word 2007 that allows you to insert citations and then generate a bibliography. Anyways, I was more writing to give a plug-in for Zotero. It has all the great features of JabRef (note taking, file linking, editing, etc.), but imports citations much faster. Since it runs from Firefox it automatically knows if you're at a site (http://www.zotero.org/translators/) that exports citations and you can do so by the click of a button in the browser. I find this much faster than saving the .enw,.ris, etc. file, switching over to JabRef, importing the file, and then editing if necessary. It can all be done from Firefox. Give it a shot!

However, Ian recalls having written:

Zotero is lame. I'm always confused about what it will grab from a given website. Even after watching 2 instructional videos and playing with it for 20 minutes, I have no idea how it's supposed to make my life better. I have Zozero inspiration to spend more time learning about it. Someday maybe a Zotero expert will show me the ropes and I'll be all impressed, but until then, I give up on the thing.

The Qermipedia has yet to come up with a consistent position on recommending Zotero.

Personal tools