I'd like to create a PDF report with knitr
with LaTeX
-code in RStudio
with biblatex
for citations. However, the in-text-citations are always undefined and no bibliography is printed. The same bibliography works perfectly with a pure .tex
-document stored in the same folder and containing the same citations, same path to the .bib
-file etc. However, as for all references (also with hyperref
) I have to compile twice. I thought this might be the problem with knitr
(that the compilation is run only once), but the hyperref
-references to figures work well. Any idea what might go wrong with the bibliography when using knitr
and how I can solve the problem?
MWE:
\documentclass{article}
\usepackage[style=authoryear-comp, maxnames=1, bibencoding=utf8, backend=biber]{biblatex}
\bibliography{ZoteroOutput.bib}
\begin{document}
According to the literature \parencite{gonzalez2003} we can assume...
\printbibliography
\end{document}
From the log
-file:
Package biblatex Warning: Please (re)run Biber on the file:
(biblatex) mwe
(biblatex) and rerun LaTeX afterwards.
use texi2dvi
enabled? rstudio.org/docs/using/customizingRstudio
options, I can only findInvoke compiler via texi2dvi script
. I have now enabled it, but this doesn't solve the problem.knitr
/RStudio
? That's a bit disappointing. How does it create the within-text-figure references then? As far as I know, they also need a 2nd compilation.