Biblatex, Biber, and LaTeX: citations undefined

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.

As noted in comments, 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.


On the question of file paths (a separate issue), it is best not to include a path at all but to place the .bib file where it will be 'found': in the current difrectory or somewhere that TeX searches automatically. That is a separate issue, so I'm assuming a demo file reading:

\documentclass{article}
\begin{filecontents*}{\jobname.bib}
@ARTICLE{greenwade93,
  author  = "George Greenwade",
  title   = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
  year    = "1993",
  journal = "TUGBoat",
  volume  = "14",
  number  = "3",
  pages   = "342--351"
}
\end{filecontents*}
\usepackage[style=numeric,backend=biber]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
  Hello\cite{greenwade93}.
  \printbibliography
\end{document}

which 'rolls up' the BibTeX database into the LaTeX source.


To solve the same problem in Sublime Text 3:

  1. Open the LaTeX.sublime-build file. Go to /User/username/Library/Application Support/Sublime Text 3/Packages/LaTeXTools/LaTeX.sublime-build. If you can't find your Library folder, you may have to un-hide it. Type the following into terminal: chflags nohidden ~/Library. Type chflags hidden ~/Library to re-hide.

  2. Find the following block of code near the top of the file, under "osx":

    "cmd": ["latexmk", "-cd", "-e", "\$pdflatex = '%E -interaction=nonstopmode -synctex=1 %S %O'", //"-silent", "-f", "-pdf"],

  3. Make it look like this (only 3 lines are added):

    "cmd": ["latexmk", "latexmk", "biber", "latexmk", "-cd", "-e", "\$pdflatex = '%E -interaction=nonstopmode -synctex=1 %S %O'", //"-silent", "-f", "-pdf"],

  4. Build using the same LaTeXTools system. It should now run pdflatex, biber, pdflatex, pdflatex in that order. Bibliography should be visible!

Related post: Bibliography missing from PDF (Sublime Text 2 and Miktex)

Update:

The alteration to the sublime-build file noted above was derived from a blog. It made my bibliography compile and prevented undefined citations. However, I updated all of my packages via TeXLiveUtility today, reverted back to the default sublime-build file calling 'latexmk' once, and compiled a working bibliography and citations just fine.