[Tex/LaTex] Biblatex with Biber: Configuring the editor to avoid undefined citations

biberbiblatexbig-listeditorside

Running the minimal example

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@ARTICLE{example,
  author  = {Other, Anthony Norman},
  title   = {Some things I did},
  year    = {2014},
  journal = {J.~Irrep. Res.},
  volume  = {1},
  number  = {1},
  pages   = {1-10}
}
\end{filecontents*}
\usepackage[backend=biber]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
Hello\cite{example}.
\printbibliography
\end{document}

I get the warning There were undefined references.

I have read Question mark or bold citation key instead of citation number and know that I need to run:

  1. LaTeX
  2. Biber
  3. LaTeX

However, my editor is only set up to run BibTeX. How do I go about setting up my editor/IDE to be able to run Biber, and how do I run the LaTeX/Biber/LaTeX cycle?

Answers (sorted alphabetically by editor name)

Answer guidelines

  • Each answer should be for one editor. If the editor is cross-platform, if possible give a single answer with notes covering the minor platform variations.

  • Please edit the question to include new answers in the 'link list'

  • Each answer should be 'stand alone', i.e. don't say 'It's almost the same as editor Y but …' for the editor part

  • Instructions for 'build tools' such as arara or latexmk are welcome but should explain how to set up the editor in question as not all editors allow simple addition of arbitrary tools

Best Answer

TeXstudio

In the current release (2.12 branch), TeXstudio's build process ('Build & View') by default runs pdfLaTeX but not a bibliography tool, which you need to do separately. There is also a need to change the settings to run Biber rather than BibTeX for creating a bibliography.

The configuration step sets Biber as default bibliography tool.

In the TeXstudio preferences ('Preferences ...' on the Mac or 'Options -> Configure TeXstudio' on Windows), choose the Build tab and alter the 'Default Bibliography Tool' to 'Biber'. Save and close the preferences.

Default Bibliography Tool: Biber

The compile step is to ensure that the sequence

  1. LaTeX
  2. Biber
  3. LaTeX

is run. Manually this can be done as follows.

  1. Run 'Build & View' from the 'Tools' menu (or press the two green arrows icon), which will create a PDF but with the bibliography not completed

  2. Run 'Bibliography' from the 'Tools' menu.

    Tools > Bibliography

  3. Run 'Build & View' again: the bibliography will appear in the PDF.

It is possible to set up TeXstudio in alternative ways to achieve the same effect. The key is that you have to run the compile sequence LaTeX, Biber, LaTeX, which can be done 'by hand' (as I have) or can be automated in various ways. Note that the same general idea applies whatever editor is used: this is a feature of LaTeX and not of the editor.

Changing the bibliography tool only for a specific document

If you only want Biber for a single document, it is possible to specify this in the .tex file itself, using a so-called "magic comment". Simply add the following line at the top of your main .tex file:

% !TeX TXS-program:bibliography = txs:///biber

Or, if you want compatibility with the TeXShop and TeXWorks editors, use this instead:

% !BIB TS-program = biber

More details: TeXstudio user manual: 4.10 Advanced header usage, When and why should I use % !TEX TS-program and % !TEX encoding?