Is there a possibility to specify different citation style language (CSL) files in (the YAML header of) RMarkdown?
I tried
---
output:
bookdown::word_document2:
csl: style_1.csl
bookdown::pdf_book:
csl: style_2.csl
---
but it doesn't result in different citation styles in the different output formats.
No, you can't do it like that.
csl
isn't an argument to thebookdown::word_document2
function, orrmarkdown::word_document
.The
csl:
entry in the YAML needs to be at the top level, and is handled by Pandoc. It might be possible to include it in thepandoc_args
argument to the driver functions, but the normal way is to usecsl: style.csl
at the top level, so you'd get the same style for both output formats.Edited to add:
From your comment,
pandoc_args
does work. You would use YAML like this: