I am trying to compile a PDF Output with an R Markdown file and build my bibliography with the biblatex
package and using R Studio.
Here are my code/files
in index.Rmd
---
title: |
Hello World!
author: |
Juan Pérez
bibliography: refs.bib
---
# Intro
Lorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsum.
[@Somoza1968]
In a separate file I have _output.yml
file:
bookdown::pdf_document2:
latex_engine: lualatex
includes:
in_header: preamble.tex
keep_tex: yes
citation_package: biblatex
In a separate file I have Refs.bib
:
@Book{Somoza1968,
title = {Argentina, la mortalidad según tablas de vida de 1914, 1946-1948 y 1959-1961},
publisher = {CELADE},
year = {1968},
author = {Somoza, Jorge L.},
address = {Santiago},
timestamp = {2018-07-03},
type = {Book},
}
And preamble.tex
\usepackage[]{biblatex}
Without any other options, it works, but every time that I want to add an option to biblatex
(for example style=alphabetic
) I get this error message:
tlmgr search --file --global '/biblatex-dm.cfg'
! LaTeX Error: Option clash for package biblatex.
Error: Failed to compile index.tex. See index.log for more info.
In addition: Warning message:
In parse_packages(logfile, quiet = c(TRUE, FALSE, FALSE)) :
Failed to find a package that contains biblatex-dm.cfg
Execution halted
Any ideas what could be the problem? Do I need a specific configuration for R Studio? Any suggestion of which one could be the best practice to build a customized bibliography using R Markdown, is welcome.
biblatex
package when you saycitation_package: biblatex
in the.yml
file. If you then load it again with different options inpreamble.tex
you get an option clash, since packages can't be loaded multiple times with different options. Maybe it helps to turn off the inclusion ofbiblatex
in the.yml
file but I don't know if Biber is run in that case. – moewe Sep 4 '18 at 4:36.tex
file, but even without it, it was fairly straightforward to deduce what was going on. In future questions about R markdown and friends it might still be a good idea to provide the intermediate.tex
code produced by markdown so the problem can be analysed more easily. – moewe Sep 4 '18 at 12:38