R Sweave does not compile automatically the .bbl file necessary to detect citations in the text. I found a solution with compiling in another program (https://community.rstudio.com/t/impossible-to-cite-with-biblatex-in-r-sweave/35008/2) but it would much more convenient not to compile three times the same file (on two different softwares).
One of the comments here (RStudio will not write a .bbl file when compiling .Rnw file with citations in natbib) mentioned the fact that maybe R Sweave does not run bibtex. Is there something to do to fix this problem ?
(Question also asked here : https://community.rstudio.com/t/r-sweave-does-not-create-a-bbl-file-on-linux-ubuntu/35110)
I finally got the solution, here's what I did :
based on the comments of user1329307, I uninstalled MikTeX and the complete TeX distributions on my computer. Since I use Ubuntu, I used purge
to remove MikTeX, TeXLive, tex-commons, etc.
then, I installed (or re-installed) TinyTeX (details here)
I installed manually the packages I needed with tlmgr_install()
. Normally, it can be done automatically but that's what I did.
finally, I replaced biber
by bibtex
in \usepackage[backend = biber]{biblatex}
(this person explains why it is important)
This last step made it work, but I don't know if the previous ones are important or not. Since user1329307 succeeded in compiling the bibliography too, I suppose it is necessary but there's no way for me to prove it.
Anyway, now, when I compile the Sweave document, the bibliography is directly created. Thanks a lot to user1329307 for his/her ideas.
Edit : I re-installed MikTeX after all of this and it works too.