5.1.1 JabRef
I've chosen to describe JabRef here because it's an open source Java application that can run on any operating system that has the Java Runtime Environment installed (at least version 1.5). You can download JabRef from http://jabref.sourceforge.net/download.php. Linux users may also be able to install it via their “Add/Remove Software” tool. (If you have successfully been using arara, you already have Java installed.)
Once you have installed it, run JabRef and select File→New database to create a new database (see Figure 5.1). When you save your data, it's saved as a BibTeX (.bib) file.
Note that if you use the inputenc package in your thesis (see Volume 1) you'll have to make sure JabRef is using the same encoding as your document. You can do this by selecting Options→Preferences to open the Preferences dialog box and set the default encoding as appropriate. For example, I use UTF-8 so I've set that as the default encoding (see Figure 5.2). I also need to change the database encoding in the “Database properties” dialog, Figure 5.3, which can be opened using File→Database properties.
To create a new entry you can select BibTeX→New entry, which will open the dialog box shown in Figure 5.4. Now you need to click on the button appropriate to the entry. For example, click on “Article” for an article in a journal or click on “Inproceedings” for a paper in a conference proceedings.
Example (Book):
Suppose I want to enter information about a book. I need to select BibTeX→New entry and then click on the button labelled “Book”. This now displays fields in which I can enter the relevant information (see Figure 5.5).
Next I need to enter information in the “Required fields” tab. This will
usually include the title and the author. I also need to specify a
key that uniquely identifies this entry. If you have read
Volume 1
this key corresponds to the mandatory argument
of \bibitem
and is also used in \cite
.
Figure 5.6 shows the details for my new entry. I've set
the key to the author's surname followed by the year to make it easy
to remember. This key won't appear anywhere in the document, it's
just used to identify the entry, just like the \label
/\ref
mechanism. Alternatively, I can click on the “Generate BibTeX
Key” button to automatically
insert a unique key.
There are also optional fields you can specify as well. In Figure 5.7, I've added the book's edition.
Example (Journal Article):
Now I want to enter an article in a journal. So I need to go back to BibTeX→New entry and click on “Article”. This time I've used the “Generate BibTeX Key” button to generate the key to save me typing. (See Figure 5.8.) I've also used the “General” tab to enter the DOI for this article. The entry now has an icon next to it. I can click on this button to direct my web browser to the article's entry on the Internet.
BibTeX uses the European assumption[BibTeX sorting and name prefixes] that names are composed of forenames, an optional “von” part which starts with a lower case letter, a surname and an optional “jr” part. In order to enable BibTeX to correctly identify these components, names in the author or editor fields must be entered in one of the formats listed in Table 5.1.
<forenames> <von> <surname> |
<von> <surname>, <forenames> |
<von> <surname>, <jr>, <forenames> |
Examples:
Entry | Abbreviated as |
---|---|
Alex Thomas von Neumann | A.T. von Neumann |
John Chris {Smith Jones} | J.C. Smith Jones |
van de Klee, Mary-Jane | M.-J. van de Klee |
Smith, Jr, Fred John | F.J. Smith, Jr |
Maria {\MakeUppercase{d}e La} Cruz |
M. De La Cruz |
Compare the last example with: Maria De La Cruz which would
be abbreviated to: M. D. L. Cruz, which is incorrect. Let's analyse
this last example in more detail: BibTeX always expects the “von”
part to start with a lower case letter, but “De” and “La” both
start with an upper case letter, so BibTeX will assume that these
form part of the forenames. However, BibTeX will ignore any LaTeX commands such as [Case-changing
oddities]\MakeUppercase
in
\MakeUppercase{d}e
since it assumes that the command is an
accent command[Accents in bibliographies]. So when it
parses \MakeUppercase{d}e
it will skip \MakeUppercase
and look at the following letter. In this case it is “d” which is
lower case, so from BibTeX's point of view the word
\MakeUppercase{d}e
starts with a lower case letter (“d”),
so it is therefore the “von” part. You can either do the same
with the “La” part, or, as in the above example, you can place it
in the same group as \MakeUppercase{d}e
.
Multiple authors should be separated by the keyword “and”. Don't use a comma to separate the authors. Here is an example with three authors:
If the author is an institution or company that happens to have the word “and” in its name, such as “Smith and Jones Inc”, then you need to group the “and” to indicate that you mean the word “and” rather than the keyword:
Figure 5.9 shows the entry for a paper in a conference proceedings, so for that one I used BibTeX→New entry and clicked on the “Inproceedings” button.
Notice the way I've written the title for this entry:
BibTeX automatically converts the title to lower case (apart from the initial letter) but here both “Bayesian” and “L1” should begin with a capital. I therefore need to enclose those words in braces to instruct BibTeX not to convert their case.
Multiple editors must also be separated by the “and” keyword, as shown in Figure 5.10. For that entry, the editors are listed as:
Note that if I don't use the inputenc package, I need to change this to:
It's also possible to import entries from other formats, such as Copac or ISI, using File→Import into new database or file→Import into current database. Alternatively, you can copy and paste a plain text reference using BibTeX→New entry from plain text. This again opens the dialog box where you need to click on the entry type, but then it opens the “Plain text import” window.
Example:
Suppose I want to add an entry for an article whose DOI is 10.1007/s10994-008-5055-9. First, I direct my browser to http://dx.doi.org/10.1007/s10994-008-5055-9, which takes me to the article's web page. In this case, it's in a journal published by Springer, so my browser is redirected to the SpringerLink cite. There I can use the export as text only option, then copy and paste the reference into JabRef's import window, as shown in Figure 5.11.
Next, I need to select text, for example an author's name, and select the appropriate field in the “Work options” list. Then click on the “Insert” button. For example, in Figure 5.12 I have selected an author's name then I selected the “author” field in the “Work options” list.
Next I clicked on the “Insert” button. Now the author's name is highlighted in red and the author field has a tick next to it (see Figure 5.13). I can repeat this process for the next author. (Just make sure the “Append” rather than “Override” radio button is selected.)
I can repeat this for all the different fields. Each time, I select the text in the raw source panel, then select the appropriate field from the “Work options” list and then click “Insert”. Once I have finished, I then need to click “Accept”.
This book is also available as A4 PDF or 12.8cm x 9.6cm PDF or paperback (ISBN 978-1-909440-02-9).