Biblatex with Biber: Configuring my editor to avoid undefined citations

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}
\begin{document}
Hello\cite{example}.
\printbibliography
\end{document}


I get the warning There were undefined references.

I have read Question mark 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)

• 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.

• 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

-
For background to this question, see meta.tex.stackexchange.com/questions/4192/… – Joseph Wright Jan 18 '14 at 18:31
– texenthusiast Jan 18 '14 at 21:20
Would "my build script runs biber when necessary, out of the box" be a valid answer? – Raphael Jan 18 '14 at 23:54
@Raphael I've tried to tighten up the guidelines to cover this. Broadly, I'd expect each answer to be about an editor, with details for using build tools fine for inclusion but hopefully focussed on the editor side. Generic 'how to use build tool X' instructions can then be linked but not included directly here. – Joseph Wright Jan 19 '14 at 10:11

Texmaker

Through Quick Build for ALL documents

Click on OptionsConfigure Texmaker:

The following window opens. In Commands tab replace bibtex % by biber %. Make sure that you only have % after the path to Biber and not %.aux. You may browse to the biber.exe using the folder icon on the side (red arrow):

This will make biber as the default for all documents.

Now choose the Quick Build tab in which further choose the second option as in the following figure:

Now your quick buid button should run pdflatexbiberpdflatexview pdf. In all steps above, don't forget to press OK in all windows before exiting.

Making only biber as user command

Go to UserUser CommandsEdit User Commands as in the following figure:

In the window that opens, type in the content as shown (ignore arara thing ;-)..):

Now your build list should have biber:

Now, you can choose to run (only) biber as standalone when you wish.

-
Texmaker-biber-biblatex usage Documentation in French for xm1math.net/doculatex/biblatex.html – texenthusiast Jan 19 '14 at 4:34
Similar procedure on Linux just replace bibtex %.aux to biber % in Bib(la)tex command box without full path to binaries. I suppose this would work with MiKTeX and TeXLive distro if miktex bin and texlive bin path are added to system path. – texenthusiast Jan 19 '14 at 4:45
– matth Jan 21 '14 at 8:01
if i choose to run (only) biber as standalone when you wish. What is the sequence of buttons I have to push? Is it command 2 + quick build or quick build + command 2? Thanks. @Harish Kumar – kww Jul 7 '15 at 23:32

Emacs with AUCTeX

AUCTeX Version 11.88

Version 11.88 has (currently) probably the best support for biber and biblatex among *TeX editors: AUCTeX is able to look at biblatex load options to automatically choose the right bibliography processor on a per-document basis, you need only to enable file parsing by setting TeX-parse-self to t. You can do that by adding the following code to your .emacs

(setq TeX-parse-self t)


or customizing that variable with M-x customize-variable RET TeX-parse-self RET. Most AUCTeX users enable parsing, probably you've already done that, check it before adding the above line to your .emacs. To see the value of the variable issue C-h v TeX-parse-self RET.

As in the previous version, C-c C-c (TeX-command-master) prompts for biber/bibtex when the .bbl file is newer than the .tex file (but now it prompts for the appropriate bibliography processor, and not always biber or bibtex). In addition, if you use the toolbar, in this version the bibliography button will automatically switch between Run BibTeX and Run Biber.

In this version, the variable LaTeX-biblatex-use-Biber is local (and no more customizable) for cases in which AUCTeX fails to automatically detect the correct processor.

AUCTeX Version 11.87

Version 11.87 is the first release of AUCTeX supporting biber by default and you don't need to add that processor to the command list. You can always run biber by hand with C-c C-c Biber RET.

Set biber as default bibliography processor

AUCTeX uses bibtex as default bibliography processor. In order to set biber as default bibliography processor (for all documents and not on a per-document basis) you have to activate parsing of LaTeX documents by setting the variable TeX-parse-self to t (see above). Then, in source files with an explicit

\usepackage{biblatex}


line, C-c C-c prompts for biber or bibtex processor when needed (ie, if the .bbl file is newer than the .tex file), depending on the value of the customizable option LaTeX-biblatex-use-Biber, which defaults to t. But until version 11.87, AUCTeX isn't able to automatically choose the bibliography processor, which is set in a LaTeX document with the backend load option of the biblatex package. Unfortunately, the bibliography button on the toolbar is always bound to Run BibTeX, even if LaTeX-biblatex-use-Biber is set to t.

Run latexmk

You can also run latexmk from AUCTeX. It isn't supported by default, but you can manually add it to TeX-command-list. Here are some Q&As on TeX Stack Exchange or Stack Overflow about how to setup latexmk in AUCTeX:

-
I take it instructions for 'vanilla' Emacs will be different? – Joseph Wright Jan 18 '14 at 18:39
@JosephWright yes. – giordano Jan 18 '14 at 18:44
I know some people use Emacs without AUCTeX, but I still can't understand what the killer feature is that vanilla Emacs provides. (At least with respect to LaTeX.) – jon Jan 18 '14 at 20:46
@jon Well Emacs pops up in more than one answer in tex.stackexchange.com/questions/339/latex-editors-ides, so presumably some people use Emacs without AUCTeX. I guess the argument is that it's a good text editor in general, and without an add-in you get the same behaviour irrespective of the file you're editing. In any case, that doesn't affect the aim here :-) – Joseph Wright Jan 18 '14 at 20:51
@JosephWright -- Indeed. I pratically live inside Emacs and I'm not a computer person! I meant it more as a sort of (light-hearted) provocative, tongue-in-cheek, comment. Although I have often wondered what AUCTeX did badly or what plain Emacs did particularly well, or if it was simply a matter or what one is used to, rather like the divide between vi(m) and Emacs. – jon Jan 18 '14 at 21:14

TeXnicCenter

Through LaTeX → PDF menu For ALL documents

Go to BuildDefine Output Profiles:

In the window that opens, choose any profile (say LaTeXPDF) and make the changes for bibtex field as in the following figure (again you can browse the biber.exe, see red arrow on the right).

Press OK and exit. Now in the main window choose LaTeXPDF from the build drop down tool button:

If you compile, biber is used now for all documents.

Making only biber as a standalone profile

Go to BuildDefine Output Profiles as explained before. Click on Add (1). In the window that opens type Biber (2), click OK to get Biber entry in the profile (3):

Now choose the profile Biber. In the window,

1. Un-check Run (La)TeX in this profile.
2. Un-check Do not use BibTeX in this profile.
3. Check Do not use MakeIndex in this profile.
4. Fill in the content for Path to BibTeX. You can also browse to biber.exe (see the red arrow to right).
5. Fill in the Command line arguments to pass to as shown.

All 5 above in the following figure:

Now your build drop down tool bar has Biber. Choose and compile:

In all steps above, don't forget to press OK in all windows before exiting.

-

TeXstudio

In the current release (2.6 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. Thus the steps required are as follows:

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

2. 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

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

4. 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 ensure that the is a sequence

1. LaTeX
2. Biber
3. 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.

-
More or less what I put in tex.stackexchange.com/questions/153647/… – Joseph Wright Jan 18 '14 at 18:40

TeXShop

Changing for all documents

If you want to make biber the default bibliography tool, you can simply change it in the TeXShop Engine preference panel.

Changing on a per-document basis

Since most of us who are switching to biber still have documents which use bibtex it is often more useful to specify the bibliography engine directly in the document in the same way that other engines can be specified. See the following question for a full description of these possibilities.

To specify the bibliography program as biber or bibtex per document use either of the following lines at the beginning of your document. This will override what the default is set to on a per document basis. (To use bibtex on a document, replace biber with bibtex.)

% !BIB TS-program = biber
% !BIB program = biber

-
Is it necessary to change paths with the advent of El Capitan here? I.e. something along the lines of /ust/texbin -> /Library/TeX/texbin? – moewe Oct 7 '15 at 12:18
If you use the (pdf)latexmk engine it will automatically choose between biber and bibtex. For more information about those engines see the Help->TeXShop Tips and Tricks document. Note: you may have to activate some of the engines (e.g., pdflatexmk is pre-activated but the latexmk engine may not be pre-activated). – Herb Schulz Jun 9 at 13:20

TeXworks

The list of binaries known by TeXworks depends on where you get the program from: direct from the TeXworks site or as part of TeX Live or MiKTeX. However, at present Biber is not included in the standard set in any case. The steps needed to add Biber as an option are as follows:

1. In the TeXworks preferences ('Preferences ...' on the Mac or 'Edit -> Preferences' on Windows/Linux, choose the Typesetting tab.
2. Use the '+' icon to add a new entry to to the 'Processing tool' list
3. Fill in the resulting box as follows:

• Name: Biber
• Program: biber (or the full filespec/biber.ext)

Using the default build engine ("traditional") with MikTeX (Windows):

With MikTeX, LaTeXtools' default builder will use textify. Since I don't run Windows, someone else might be more qualified to provide instructions.

Using "script" build:

After installing LaTeXTools, navigate to the user settings.

Then alter the builder settings to script

and you can use a script. In the below example, for Windows, the build would run pdflatex then biber then pdflatex twice on the file.

-

Editor name: SublimeText / Sublime LaTeX package. https://tekonomist.wordpress.com

main.tex first line should say

%!TEX program = <program>
%\ program: one of pdflatex (the default), xelatex or lualatex. This
%\ selects the TeX engine.


bibliography.bib first 2 lines should say

%!TEX program = bibtex
%!TEX root = main.tex

-
instructions are from SublimeText/LaTeXTools on GitHub section: "Build engine settings" – בנימן הגלילי Sep 10 '15 at 9:21
Are you sure the first line of bibliography.bib should be bibtex instead of biber? – giordano Sep 10 '15 at 9:39
Is there a way to have Biber as the bibliography compiler on a global scale in Sublime or is it always necessary to specify the use of Biber on a per-document basis? – moewe Sep 10 '15 at 9:49