Utiliser biber et biblatex pour gérer la bibliographie de votre thèseUsing biber and biblatex for managing the bibliography of your PhD thesis
Installing biber and biblatex
biber is a alternative solution to bibtex for generating bibliography. Combined with the biblatex package, it provides powerful tools for sorting and formatting a bibliography in LaTeX. On the latest LTS release of Ubuntu (12.04, precise pangolin), biblatex is provided as a distribution package but not biber. This section explains how to install biber and biblatex on Ubuntu (and variants), version 12.04.
First, biblatex is simply installed by typing:
sudo apt-get install biblatex
The version of biblatex (which is mandatory to install the correct version of biber) is shown with:
apt-cache show biblatex
which gives:
Package: biblatex Priority: extra Section: universe/tex Installed-Size: 9392 Maintainer: Ubuntu Developers Original-Maintainer: Debian TeX Task Force Architecture: all Version: 1.7-1 ...
The version provided with Ubuntu 12.04 is thus version 1.7-1 which is not compatible with the latest release of biber (current biber version is 1.8 which should be used in conjunction with biblatex 2.8). Older realeases can be found here. In each version directory a documentation file indicates the compatibility between biber versions and biblatex versions. The latest biber release compatible with biblatex v1.7x is 0.9.9 which binary for linux can be downloaded here (the version must be chosen according to your system’s requirements). Once the proper file downloaded, the following command lines finish the installation:
tar zxvf biber-linux_x86_64.tar.gz
sudo mv biber /usr/bin/.
cd /usr/bin
sudo chown root:root biber
sudo chmod +x biber
Using biber
This example explains how to obtain different types of bibliography in a single document using biber and BibLaTeX. The presented examples are very limited as compared to the huge possibilities offered by biblatex. I advice the reader to refer to the biblatex reference manual for more options. The example is built on the following objectives:
- two bibliography files;
- all articles written by the PhD thesis’s author contains a specific keyword, say “moi”;
- each chapter of the PhD thesis contains a specific bibliography;
- the PhD thesis contains a general bibliography which is the union of the section specific bibliographies (at the end of the document);
- the PhD thesis contains the author’s personal bibliography (i.e., a bibliography with all the articles with the keyword “moi”, cited or not cited in the document.
First, in the headers of the TeX document, the package has to be loaded with eventually a few options specifying the way the references has to be displayed (the langage declared in the document also influences the formatting of the references). Details about these options are provided in the BibLaTeX reference manual. In particular, the option backend
tells BibLaTeX which bibliography generator has to be used (in my example biber
and not bibtex
which is less powerful).
\usepackage[style=authoryear,backend=biber,sorting=nyt,sortcites=false,
maxbibnames=20,maxcitenames=2,language=english,hyperref=false]{biblatex}
Then, the command \addbibresource
declares the different bibliography files (in my case two, provided at the end of this tutorial).
\addbibresource{biblio.bib}
\addbibresource{mabiblio.bib}
Then, the bibliography heading can be defined (in my case, I set an empty header).
\defbibheading{bibempty}{}
Second, a first chapter is written, which is associated to a “refsegment” (with the commands \begin{refsegment}
and \end{refsegment}
). At the end of this chapter, the command \printbibliography
is used to display this chapter specific blbiography with the option segment=1
. A second chapter can be built similarly.
\chapter{First chapter}
\begin{refsegment}
\section{What I want to explain}
In this chapter, you cite interesting papers, such as
\parencite{newman_girvan_PRE2004,fortunato_PR2010}.
\section{References}
Then, the references corresponding to the first chapter are displayed below.
\printbibliography[heading=bibempty, segment=1]
\end{refsegment}
Third, at the end of the document (in the appendexes), two chapters are used to display, on one hand, a global bibliography which is the union of the segment specific bibliographies and on the other hand a specific bibliography that contains all the references (and not only the ones cited in the document, using the command \nocite{*}
): the first one is made using the same \printbibliography
command as before, but not including a segment=
option, and the second one is made using the option keyword=moi
. The bibliography can also be splitted into several parts by type of reference using the option type=article
(to display only articles).
\chapter{Global bibliography}
This chapter is dedicated to a summary of the cited bibliography.
\printbibliography[heading=bibempty]
\chapter{Personal bibliography}
\printbibliography[heading=bibempty,type=article,keyword=moi]
\nocite{*}
The file is finally compiled using
pdflatex biberExample.tex
biber biberExample
pdflatex biberExample.tex
pdflatex biberExample.tex
The final file can be watched there:
Source files
The following archive: biberExample.zip contains the two bib files and the tex file.
</div>