# What to do to switch to biblatex?

Because of the great answers posted around in the site, I'm finally considering to do the switch and move to biblatex. So, the question is what do I have to do?

To give the question some focus, assume that I already have a somewhat largish .bib file and a bunch of documents using natbib for my references. What do I have to change in my existing .bib and .tex files?

And what about coauthors? Would it be reasonably simple to instruct them how to work with the new documents using biblatex? Do they have to install new software/packages as well?

-
The manual is unfortunately of the common latex style: beautifully typeset, and incredibly detailed, but of no use to get you up and running quickly. –  hadley Jun 29 '11 at 18:09
If you prefer looking at sample documents, you can find a bunch of them online or on your computer already in the Tex tree at texmf/doc/latex/biblatex/examples. –  matth May 9 '13 at 8:28
From the manual: For a quick start guide, browse §§ 1.1, 2.1, 2.2, 2.3, 3.1, 3.3, 3.6, 3.7, 3.11.. That's still almost 90 pages. –  gerrit Jul 4 '13 at 16:17

I've made the switch from natbib to biblatex two years ago, so I should be able to answer this. That said, Seamus, Simon Byrne, and domwass have already made lots of good points.

(For anyone still asking "Why should I use biblatex?": See this answer [shameless plug].)

## LaTeX document

With natbib, a model LaTeX document would look as follows:

\documentclass{<someclass>}

\usepackage[<options>]{natbib}

\begin{document}

A bare citation command: \citep{<key>}.

A citation command for use in the flow of text: As \citet{<key>} said \dots

\bibliographystyle{<somestyle>}
\bibliography{<mybibfile>}% Selects .bib file AND prints bibliography

\end{document}


With biblatex and its built-in styles, this changes to:

\documentclass{<someclass>}

\usepackage[<language options>]{babel}% Recommended
\usepackage{csquotes}% Recommended

\usepackage[style=<somebiblatexstyle>,<other options>]{biblatex}

% \bibliography{<mybibfile>}% ONLY selects .bib file; syntax for version <= 1.1b
\addbibresource[<options for bib resources>]{<mybibfile>.bib}% Syntax for version >= 1.2

\begin{document}

A bare citation command: \autocite{<key>}.

A citation command for use in the flow of text: As \textcite{<key>} said \dots

\printbibliography[<options for printing>]

\end{document}


Note that I used \autocite instead of \parencite which is the actual counterpart of natbib's \citep. \autocite is a high-level citation command that will be translated into the low-level bare citation command appropriate for the chosen style - e.g. it will enclose a citation in parentheses in authoryear styles, but produce a footnote citation in authortitle styles. Even more, it will automatically move trailing punctuation.

For some of the custom (not already built-in) biblatex styles, additional preamble adjustments may be advisable - see the example provided by Seamus for biblatex-apa.

As Simon Byrne has mentioned: If you don't want to change every instance of \citep and \citet in every document to its biblatex counterpart, use the natbib=true compatibility option.

Typically, you'll select one or several local .bib files as your bibliographic database; however, \addbibresource also allows to load remote resources and other data types (e.g., ris).

## .bib file

domwass has already mentioned that changes to your .bib files are not mandatory, but you'll miss some of the goodies offered by biblatex. When I switched to biblatex, I changed my address fields to location and my journal fields to journaltitle. I also added hyphenation fields in order to be able to switch languages on a per-entry basis in the bibliography.

## Biber

biblatex will work for the most part with traditional BibTeX and its 8-bit version bibtex8, but I recommend the use of Biber (the default backend since biblatex v2.0) for the following reasons:

• Full unicode support.

• No capacity issues. (In contrast, when using BibTeX with bibliographies of about one hundred entries, I've run into errors disguised as obscure warnings - see section 2.4.2 of the biblatex manual for details.)

• Multiple or subdivided bibliographies will always be processed in a single pass.

• Many biblatex features introduced since v1.1 (e.g., advanced name disambiguation, smart crossref data inheritance, configurable sorting schemes, dynamic datasource modification) are "Biber only".

Biber is included in TeXLive and MiKTeX; latexmk also supports the use of Biber.

-
Great answer! You wrote many good answers regarding biblatex. What do you think about writing a blog article about benefits and use of biblatex on our blog, based on your answers? –  Stefan Kottwitz Oct 27 '11 at 12:47
@StefanKottwitz Sadly, I won't be able to deliver a German translation of my "Guidelines" before the end of spring. If that's too late for you, I'll return your bounty. –  lockstep Apr 30 '14 at 13:24
No problem, at any time is fine. –  Stefan Kottwitz Apr 30 '14 at 13:40
Could you please explain how to use BibTeX bibliography styles with BibLaTeX? I cannot find how to use amsplain, for example. –  Alexey Mar 29 at 16:22
@Alexey Using BibTeX styles with biblatex is not possible. –  lockstep Mar 29 at 21:00

Converting from natbib is pretty straightforward: the minimal requirements are in the header:

\usepackage[natbib=true]{biblatex}
\bibliography{dotbibfile}


and where you want the bibliography:

\printbibliography


The natbib option will automatically create the relevant aliases for the \citep and \citet commands, so you can use them as before. If your file has previously been compiled using natbib, you may need to delete some of the auxiliary files created by LaTeX and BibTeX (.aux, .bbl, .blg) for it to work properly.

Regarding coauthors, the main issue is that everyone uses the same version (as the package is still being developed, some of the options have changed between versions). Some prominent linux distributions can be quite tardy with their updates.

-
I did not know that about biblatex! and that's a good point about deleting the aux files –  Seamus Nov 8 '10 at 14:33
I'm afraid I can't agree with the claim that "natbib will truncate the author list of multi-author works only in the text" but not the bibliography. For one, it's not natbib but the settings of the .bst file which control whether (and how) truncation occurs. Second, see this question for a specific example of how to modify the code of unsrt.bst in order to truncate an author list down to FirstAuthor et al in the bibliography. –  Mico Sep 16 '11 at 21:15
Whereas natbib will truncate the author list of multi-author works only in the text, biblatex (even in natbib-compatibility mode) will by default truncate in the text AND the bibliography. To emulate natbib's behaviour, one should use the package option maxbibnames=99. –  lockstep Dec 10 '11 at 13:12
As we're talking about changes: Note that in biblatex, \bibliography is deprecated, the use of \addbibresource (with the .bib file extension) instead is recommended (as @lockstep mentioned in his answer). See section 3.5.1 of the biblatex documentation. –  doncherry Jan 8 '12 at 12:07

Just to add to what was previously said: Although you do not need to change anything in your .bib file in order to use biblatex, you will have to make some changes if you would like to benefit from some features that biblatex provides. For example (this is not meant to be a complete list):

• publisher and location are list fields: you could still use, for example, address = {Berlin, New York} (with address being an alias for location), but then you cannot make use of the option maxitems (maxitems=1 would still give you “Berlin, New York”); in order to make use of this option, you would have to change to address = {Berlin and New York} (or location instead of address), which would then give “Berlin et al.” with maxitems=1.

• A similar case are some options regarding the appearance of date specifications: instead of using the fields year, month and day, you should use the date field with an ISO formatted date, e.g. date = {2010} or urldate = {2010-08-11}. Then, biblatex can make use of some options like “date=short” etc.

• biblatex offers some additional fields that other packages do not provide, e.g. subtitle, titleaddon, maintitle for multi-volume works, editortype, and many more.

-
It's almost always a mistake to give more than one location for a publisher - to see why most style guides ask for just the first listed location, consider that recent OUP publications list 16 primary locations, and several other publishers list 10+ locations. –  Charles Stewart Nov 8 '10 at 19:06

Nothing really needs to change in your .bib to make the switch. Biber is also optional (but recommended). biblatex can still work with a standard LaTeX and BibTeX compile.

biblatex should be part of most (relatively up to date) TeX distributions now. (correct me if I'm wrong...). Otherwise, it's a fairly standard package installation from CTAN.

To get something close to natbib look into the authoryear and apa citation/reference styles. (Warning: to get biblatex-apa working you may need to update your versions of biblatex and biblatex-apa, so it might be best going with authoryear at first...)

As an example, here's the relevant parts of a preamble to a recent paper of mine:

%%% Bibliography Packages
%% biblatex-apa dependencies

\usepackage[american]{babel}
\usepackage{csquotes}

%% biblatex commands themselves
\usepackage[sorting=nyt,style=apa]{biblatex}
\bibliography{../bigbib}

%% Language sensitive biblatex macros need:
\DeclareLanguageMapping{american}{american-apa}


And then where I want my bibliography (at the end...):

 \printbibliography


You also need to replace \citep with \parencite and \citet with \textcite. There might be other similar minor changes, but those are the ones I use... [edit: apparently you don't need to do this, see Simon Byrne's answer]

-
should be part of most TeX distributions – Sadly, Tetex is still fairly widely used. –  Charles Stewart Nov 8 '10 at 14:36
Edited. But then, TeTeX probably doesn't even make my "it's a shame people still use X" list. MS Word, IE4,5,6,7,8... –  Seamus Nov 8 '10 at 14:55
Generally, one doesn't need to use the sorting option because the selected style will set it to an appropriate (for the style) value. (apa is a case in point - it uses sorting=nyt.) The main exception of this rule is reproducing the effects of the unsrt bst-style: Here, one would use \usepackage[sorting=none]{biblatex}. (One wouldn't need to set style=numeric because that's the default behaviour of biblatex.) –  lockstep Nov 8 '10 at 21:39
As we're talking about changes: Note that in biblatex, \bibliography is deprecated, the use of \addbibresource (with the .bib file extension) instead is recommended (as @lockstep mentioned in his answer). See section 3.5.1 of the biblatex documentation. –  doncherry Jan 8 '12 at 12:07
Would also like to add this link re: \addbibresource: biblatex - Is there any advantage to using \addbibresource over \bibliography? - TeX - LaTeX - Stack Exchange –  sdaau Apr 29 '12 at 10:58

This answer is more related to the question “Biblatex guide?”, but because of [duplicate] mark on it — with which I strongly disagree :) — I post it here.

Let me introduce a biblatex-related document I prepared some time ago. It consists of three parts

and contains a detailed example of using biblatex for numbered footnote citation scheme. This document can be seen as a practical introductory guide, but also — for experienced users — as an example of the biblatex workflow for highly customized bibliography. It includes thorough discussion of all introduced biblatex customizations (including appearance of references in the main text and in the bibliography) as well as an example of the customized numeric-comp biblatex style.

-

I made the switch from natbib to biblatex for my master's thesis. Here's the complete diff.

I also had to do make clean and sudo apt-get install biblatex.

-