Skip to content

Biber Support

Luca Innocenti edited this page Jun 19, 2017 · 1 revision

Biber Support

biber is a program designed to replace bibtex when working with biblatex. If you do not specify a backend option when using biblatex, it will default to using biber. biber is invoked by the LaTeXTools builder to process your bib file into data LaTeX can use directly.

For the most part, biber is supported and should work out of the box. This is because latexmk does a good job of detecting when biber (as opposed to bibtex) needs to be run and running it. Unfortunately, there is one major scenario where biber support is a little more rocky: when using MiKTeX. By default, when using MiKTeX, LaTeXTools will run MiKTeX's compiler driver, texify. texify, though offering intelligent handling of a number of different scenarios, doesn't know about biber or make any attempt to run biber unless explicitly told to via the %BIBTEX% environment variable. Fortunately, there are a range of ways available to work around this.

Solutions

Here's a run-down of the various ways that biber can be used with LaTeXTools on Windows.

Use the basic builder

In v3.8.0, a basic builder was added that is similar to the simple builder, but natively supports biber. You can use this builder by changing your builder setting to basic. This is probably the simplest way to add support for biber on MiKTeX, but note that it is not as feature-rich as latexmk and lacks texify's support for makeindex.

Install latexmk and use the traditional builder

As stated above, unlike texify, latexmk knows about biber and will execute biber when it finds the appropriate output in the log file. Although latexmk is not installed as part of the default MiKTeX suite, it is available as a package and can be installed in the usual ways either using mpm --install from the command prompt or using the package manager.

After installing latexmk, you will need to "fool" LaTeXTools into using it by changing the command setting in the builder_settings block of your LaTeXTools.sublime-settings file. To do this, find the "builder_settings" section and then add the following line within it:

"command": "latexmk -cd -f -%E -interaction=nonstopmode -synctex=1"

Now, the traditional builder will run using latexmk instead of texify and biber should be run automatically.

Use the script builder

The script builder included from v3.6.2 can be used to run biber (and virtually any other commands that might be relevant to your build; see the documentation in the README for a run-down of how to use it).

Normally, when using the script builder, you'll define the script in the project file settings, but if you don't use Sublime Text's project feature you can also change the relevant settings in your LaTeXTools.sublime-settings file. We simply don't recommend this configuration. In the "settings" section of your project file add the following lines:

"builder": "script"
"builder_settings": {
    "windows": {
        "script_commands": [
            "pdflatex -synctex=1 -interaction=nonstopmode",
            "biber",
            "pdflatex -synctex=1 -interaction=nonstopmode",
            "pdflatex -synctex=1 -interaction=nonstopmode"
        ]
    }
}

This will setup the script builder to run the standard pdflatex -> biber -> pdflatex -> pdflatex sequence. Note, however, the script builder (unlike texify and latexmk) is quite naive. It will just try to execute the series of commands you give it, regardless of the outcome of the previous step.

Using a custom builder

This is a relatively advanced topic, but it is possible to make a custom builder that runs the pdflatex -> biber -> pdflatex -> pdflatex sequence (or whatever else you might want to do). There is some documentation on the custom builder system on another wiki page, which includes one sample builder, intended to demonstrate using user settings, but which supports switching between using BibTeX and Biber.

You can’t perform that action at this time.