# Biber with LatexTools on SublimeText 2

My current workflow for latex involves using the LatexTools package with Sublime Text 2. I've gotten to a point where not knowing how to do citations is crippling my productivity, but I am unable to find good documentation online for how to incorporate biber into LatexTools. Could someone give me guidance on what needs to be done to correctly incorporate citations?

My Minimum Working Example is 2 files, test.bib and main.tex. I am using the default builder and MikTex.

Test.bib is in the same folder as the .tex file

It contains

@misc{ Nobody06,
author = "Nobody Jr",
title = "My Article",
year = "2006"
}


main.tex contains (apologies for the extraneous packages, but I wanted to replicate exactly what is in the file)

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\usepackage{parskip}
\usepackage{graphicx}
\usepackage{comment}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{bm}
\usepackage{bbm}
\usepackage{enumitem}
\usepackage{setspace}
\usepackage[backend=biber]{biblatex}

\title{}
\author{}
\date{Last Updated: \today}

\begin{document}
\maketitle

\abovedisplayskip=0pt
\belowdisplayskip=0pt

\begin{enumerate}
\item \textcite{Nobody06}
\end{enumerate}

\printbibliography
\end{document}


Running this gives me the following warnings:

LaTeX Warning: Citation 'Nobody06' on page 1 undefined on input line 72.

LaTeX Warning: Empty bibliography on input line 76.

LaTeX Warning: There were undefined references.

Package biblatex Warning: Please (re)run Biber on the file:(biblatex) lit_review(biblatex) and rerun LaTeX afterwards.

The resulting pdf does not include the citation, but instead shows the label Nobody06

• The default LaTeXTools-settings set the builder to TraditionalBuilder, which in turn uses the tool texify under Windows/MikTeX. For texify to generate your bibliography, you need to set the BIBTEX environment variable; see this answer for more information. – Pit Jul 2 '15 at 7:22
• Thanks for the pointer. I've added the a BIBTEX environmental variable that is the location of my biber.exe. I also confirmed that my builder setting was set to the default in the user settings of LatexTools. However, I am still getting the same errors when I try and build my file. Any suggestions on what needs to be done? – Shffl Jul 2 '15 at 19:05
• The only thing I could think of is that Subl2 does not pick up your environment variable. Maybe take a look at this? – Pit Jul 2 '15 at 19:49
• Same issue as Shffl - I've added the BIBTEX environment variable both to my system and to LaTeXTools.sublime-settings as described here: github.com/SublimeText/LaTeXTools/wiki/Biber-Support. Running %BIBTEX% in the command prompt runs biber. However, texify refuses to acknowledge its existence. Any suggestions would be greatly appreciated! – Dimpl Apr 14 '16 at 13:08

I found a solution. I have not validated beyond the fact that, by doing these things, I got it to work. It's possible there are extraneous steps, and any improvements are welcomed.

First, I made sure that my MikTex was up to date (and thus had Biber installed). Second, I installed the latexmk package using the Package Manager. Third, I added an environemntal variable BIBTEX that pointed to biber in the MikTex bin\ folder.

Then, I modified the traditionalBuilder.py file so that, the default command for MIKTEX was the same command (beginning with latexmk) as used for other engines. I realize that modifying the default builder is a very bad idea, but I was unable to get custom builders to work, even when I simply changed the builder_path to User\builder and copied traditionalBuilder.py to that folder (renaming it, of course).

After doing this, building via Sublime yielded the desired results.

I had hoped to get simpleBuilder to work, but it refused to run bibtex, despite my efforts. Ultimately, my solution works, but it's not very elegant.

• Might be a bit late, but a less cludgy way to get the desired result would be to set the distro setting in LaTeXTools.sublime-settings to "texlive". – ig0774 Jul 20 '15 at 9:53

Maybe this was not available by the time Shffl wrote his answer, but I could make biber work by changing the LaTeX-Tools builder from default/traditional to basic.

To do so go to Preferences > Package Settings > LaTeXTools > Settings -- User and then change the line "builder": "default" (or "builder": "traditional" resp.) to "builder": "basic". (In my setup this was line 369, but you will find it when looking for "builder" in the settings file.)

Note: I also have my distro set to texlive and have biber available as a command in my shell. I can not tell whether this is also necessary to have the building work correctly.