9

I've been using LaTeX for years, but I haven't learned how to use BibTeX. I've been manually inserting bibliographic entries into a thebibliography environment at the end of each document, which usually requires copying and pasting from a previous document. I've heard that BibTeX is a system that makes it easier to manage bibliographic data that I will likely use in many LaTeX documents. I've also heard that biblatex is an improved re-implementation of BibTeX. I would like eventually to learn to use biblatex.

The problem is that the biblatex documentation seems to be written for the reader who already knows BibTeX and wants to upgrade to biblatex. So in order to understand the biblatex reference manual, I would need to learn all about BibTeX first, even though many of its features are replaced in biblatex. This seems like an inefficient and confusing way to go about it.

Can someone direct me to a reference text or manual that explains how to use biblatex, for someone who knows LaTeX but has never used BibTeX?

  • 2
    I do not think you need to know about BibTeX, it is just referenced often as many users replace BibTeX with BibLaTeX. Besides the reference manual, which is in my opinion not really suited for beginners I would recommend Joseph Wright's introduction here: biblatex for idiots. This should get you started. – Alexander Jun 11 '13 at 8:37
  • 2
    I barely glanced at BibTeX before moving on to biblatex, and I have not been under the impression that the manual assumes the reader is already a BibTeX user. As Alexander says, it does provides commands and hints for BibTeX users, but I always ignored those, and I haven't found a reason yet to 'un-ignore' them. Unlike BibTeX, there doesn't seem to be a basic walk-through-guide for biblatex, so it can be quite daunting for a beginner: tex.stackexchange.com/questions/64907/biblatex-guide. – Sverre Jun 11 '13 at 10:05
6

There are two aspects to 'traditional' BibTeX: the idea of using a separate database (.bib file) for storing citations and the business of the BibTeX stack language. To use biblatex, you only need to understand the first of these. We'll need to start with some basic concepts then add in some more detail. (There is an overview of the traditional BibTeX approach in Question mark or bold citation key instead of citation number, which overlaps to some extent with the following as the two-stage concept is the same.)

As with 'traditional' BibTeX, the biblatex approach involves a two-file approach for creating the bibliography. The first stage is therefore to create the two separate files. Here I'll use filecontents to allow me to wrap them up into one, but that is only for the purpose of the demo.

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@ARTICLE{Alder2004,
  author = {Alder, Roger W. and Blake, Michael E. and Chaker, Leila and Harvey,
    Jeremy N. and Paolini, François and Schütz, Jan},
  title = {{When} and {How} {Do} {Diaminocarbenes} {Dimerize}?},
  journaltitle = {Angew. Chem. Int. Ed.},
  year = {2004},
  volume = {43},
  number = {44},
  pages = {5896-5911},
  doi = {10.1002/anie.200400654},
}

@ARTICLE{Arduengo1991,
  author = {Arduengo, III, Anthony J. and Harlow, Richard L.
    and Kline, Michael},
  title = {{A} stable crystalline carbene},
  journaltitle = {J. Am. Chem. Soc.},
  year = {1991},
  volume = {113},
  number = {1},
  pages = {361-363},
  doi = {10.1021/ja00001a054},
}
\end{filecontents*}

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[backend=biber]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
\cite{Arduengo1991}

\printbibliography
\end{document}

So what is going on here? The BibTeX database (.bib file) contains the information needed for the bibliography in a structured format. Covering all of this here would be a bit much, so I'll point to Tame the BeaST for more detail. Hopefully the basic idea is however clear: you have a series of entries of one or more types (detailed in the biblatex manual), each of which has a 'key' (identifier) and one or more fields containing the actual information. Note that in the author field each name must be separated by and.

If you run LaTeX on the demo, you'll find that rather than a citation and bibliography you get [Arduengo1991]. That's because the LaTeX file itself doesn't contain the bibliography information: to do the 'transfer' we need a second program, Biber. To run that, we do

biber <filename>

where <filename> does not include the .tex extension. Biber reads the auxiliary files from the LaTeX run and the .bib file and creates a .bbl file containing the extracted bibliography information. In particular, it only extracts those records we've cited in the LaTeX file: my demo deliberately includes two BibTeX database entries but uses only one.

Biber doesn't alter the PDF output: we need to run LaTeX again. On this second run, LaTeX will find the .bbl file and use it to (a) fill in the citations and (b) create the bibliography. At this stage, if we've not made a mistake then everything will resolve and there will be no undefined citations.

There are three questions this probably leaves open: how does BibTeX know which .bib files to use, how do you control where the bibliography appears, and how is the formatting of the bibliography controlled. The first part is handled by the \addbibresource line, which takes a comma-separated list of .bib files: this information is passed to Biber via an auxiliary file. Where things are prinited is determined by where \printbibliography is in the LaTeX file

Output style is the most complex area. As well as backend, biblatex understands the load-time option style:

\usepackage[style=numeric-comp,backend=biber]{biblatex}

There are several styles supplied with biblatex plus addition ones on CTAN and the ability to customise appearance from within the LaTeX file. The way these work is that bibaltex adds formatting to the 'raw' database information when it prints the bibliography, but the exact detail is controlled by the style.

There are a few additional 'more advanced' things you may need to know. First, biblatex supports BibTeX for the .bib-to-.bbl process if you use backend=bibtex in place of backend=biber. However, BibTeX is more limited than Biber in what it supports. Secondly, Biber supports alternative formats in addition to .bib, which is why we need the extension in the list given for \addbibresource.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.