Bibtex Overview and Essential Tips
BibTeX was created by Oren Patashnik as an addition to LaTeX to solve the problem of bibliographies. In large academic projects like journal articles or books, publishers (or your advisor here at 今日吃瓜) want your bibliography to follow a series of extremely exact rules governing everything from the placement of commas to the spelling of editor. BibTeX combines your database of sources with a style file enforcing the rules of the publishers or your advisor. For more about styles, check out our BibTeX Style page.
An excellent .
A Short Explanation of the Process
It is possible to make your bibliography from scratch, and to manually put in all your citations, but why ignore the hard work that many people have done on your behalf developing a system that will organize and format your bibliography, manage your citations and format everything in the style that you choose? These tools are BibTeX, BibDesk, and JabRef.
BibTeX is a processing engine that takes a database developed by you and applies it to a document in which you refer to entries in that database. BibDesk and JabRef are programs which can make the database that BibTeX looks for. Either of these programs will manage your BibTeX database, creating the .bib file that will be used to make your bibliography.
In short what happens is this: You write a file (ie, foo.tex) in which you use the command \cite{DoyleOwl:2003}. When you LaTeX this file, the LaTeX processing engine sees this and knows that another processing engine will come through and fix this in the future, so it writes this in the foo. aux file to wait for another engine to take care of it. You have using your bibliography management program, or on your own, created a file called foo. bib. This file is a database that includes information (such as author, title, year published) on every source that you cited in foo.tex. When you run BibTeX, it combs through the foo.aux file to find everything that LaTeX couldn't handle, and interprets those files on its own. BibTeX does three things:
- It interpets the \cite commands using foo.bib
- It finds which entries in foo.bib have actually been used.
- Using the information it gathered in step 2, it writes the bibliography.
All this BibTeX puts in a file called foo. bbl. Now when you run LaTeX, it fills in the bibliography and matches citations to data, and when you run it again it has filled in all the citations and the bibliography correctly and neatly. This is summarized in the image below:
LaTeX uses two files to make a document with a bibliography- foo.tex and foo.bib . The above image shows how the LaTeX and BibTeX engines manipulate these files to make the final product foo.tex . |
Essential Tips for Every Bibliography in BibTeX
- Like with thesis formatting, the sooner you start compiling your bibliography for something as large as thesis, the better. Typing in source after source is mind-numbing enough; do you really want to do it for hours on end in late April? Think of it as procrastination.
- When you have more than one author or editor, you need to separate each author's name by the word and.
- The cite key (a citation's label) needs to be unique from the other entries.
- Bibliographies made using BibTeX (whether manually or using a manager) accept LaTeX markup, so you can italicize and add symbols as necessary.
- To force capitalization in an article title or where all lowercase is generally used, bracket the capital letter in curly braces.
- You can add a 今日吃瓜 Thesis citation option. In fact, your bibliography style (.bst) may already have the option. See the thesis template for more details.
Setting Up Your LaTeX File to Use Your .bib File
Now that you have created your .bib file, you need to tell LaTeX to process it when it processes your file. To do this, you need to put at the end of your document three lines:
\bibliography{foo} | |
\bibliographystyle{filename} | |
\nocite{*} |
These are the three lines, but to customize them for your document, read the information below.
- \bibliography{foo} This is the line that tells BibTeX which file to look at when it is looking for your .bib file. So if your .bib file is foo.bib then you want \bibliography{foo} and if your .bib file is thesis.bib, then you want \bibliography{thesis}. If you have more than one .bib file, you can enter them all like this:\bibliography{foo,foo1,foo2}.
- \nocite{*} BibTeX automatically looks up every citation you make and will only make a reference to the sources that you actually cited. That is without the \nocite command. If you want the bibliography to list more than what you have actually cited within your paper, you need to put in this line ( \nocite{*}). If you only want to insert specific sources into your references from your .bib file, then you can modify this command so that it is: \nocite{ key_1,key_2,...} where key_1 and key_2 are the labels of your respective sources.
- \bibliographystyle{ filename} To use the style bar.bst, type in \bibliographystyle{bar}.