RStudio, knitr, biber

Richard D. Morey's Avatar

Richard D. Morey

27 Jul, 2012 09:05 PM

I'm trying to compile a document with references that uses biber and biblatex (instead of bibtex), but I can't get it to compile properly. When I compile it with Rstudio 0.96.228, with R 2.15.0, under OSX 10.8, I get the following error:

Running pdflatex on test.tex...failed

But a PDF is, in fact, created. The PDF contains no references. The problem seems to lie with the fact that there are undefined references, and biber is never (re)run to get them right. The resulting .tex document compiles just fine, with references, when I do it manually (using latexmk and texlive, but I don't think that matters). I've attached a zip file containing all the relevant files, including the log file. Below are the outputs of the various commands you typically ask people to report when they have a tex question:

> Sys.getenv("PATH")
[1] "/opt/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/texbin"

> Sys.which("pdflatex")
             pdflatex 
"/opt/local/bin/pdflatex"

I have also included a screenshot of my Rstudio Sweave setup in the attached zip file. How do I get it to compile the references, and not report an error running pdflatex? Thanks!

  1. Support Staff 2 Posted by Josh Paulson on 03 Aug, 2012 02:46 PM

    Josh Paulson's Avatar

    Richard,

    I haven't personally tested this with biber and biblatex (or even bibTeX), but I do know that other users have got this working with RStudio. It is possible you need to have the following environment variables point to the directory where your biber and biblatex (or bibTeX) files are located (similar example):

    TEXINPUTS
    BIBINPUTS
    BSTINPUTS
    

    You can check their current value with Sys.getenv() and can set them either in your .Renviron file or using Sys.setenv().

    If you are able to get this working, definitely let me know so that I can inform other users as well.

    Thanks,

    Josh

  2. Josh Paulson closed this discussion on 06 Aug, 2012 06:03 PM.

Comments are currently closed for this discussion. You can start a new one.