Mogu
October 4, 2021, 6:55pm
1
Dear Community,
I have been working with the oxforddown template for a few weeks. I am trying to change the citation style to csl: apa.csl
Therefore I downloaded the CSL format here: Zotero Style Repository
The file is in the same repository as my rmd file. Unfortunately, my reference list is knitted incorrectly. According to the guidelines online, it should work. I hope anyone of you can help me out. Here my YAML code:
bibliography: references.bib
csl: "apa.csl"
output:
bookdown::pdf_book:
citation_package: biblatex
template: templates/template.tex
keep_tex: true
pandoc_args: "--lua-filter=scripts_and_filters/colour_and_highlight.lua"
bookdown::bs4_book:
css:
- templates/bs4_style.css
- templates/corrections.css # remove to stop highlighting corrections
theme:
primary: "#6D1919 "
repo: https://github.com/ulyngs/oxforddown
pandoc_args: "--lua-filter=scripts_and_filters/colour_and_highlight.lua"
bookdown::gitbook:
css: templates/style.css
config:
sharing:
facebook: false
twitter: yes
all: false
bookdown::word_document2:
toc: true
link-citations: true
documentclass: article
always_allow_html: true #this allows html stuff in word (.docx) output
Thanks!
Maybe try csl: apa.csl without the " "?
Mogu
October 5, 2021, 1:07pm
3
hey, thanks for your answer. I have tried it - but wasn't successful.
I am not much of an Rmarkdown user. I have just played with it as I am used to Lyx + knitr but that YAML code looks excessive.
What is your desired output format? Currently it looks like you have calls into pdf_book , bs4_book , gitbook , & word_document2 .
BTW are you getting any error messages when you knit?
You might want to start with something basic such as :
bibliography: references.bib
csl: "apa.csl"
output:
bookdown::pdf_book:
citation_package: biblatex
template: templates/template.tex
```r
and see what happens.
Otherwise let's hope an expert arrives.
Mogu
October 6, 2021, 12:08pm
5
Hey. Thank you for your answer. I found the solution for my problem. I needed to insert style=apa in the following line:
bib-latex-options: "style=apa, sorting=nyt, backend=biber, maxcitenames=2, useprefix, doi=true, isbn=false, uniquename=false"
All the best and thank you
1 Like
system
Closed
October 13, 2021, 10:35pm
7
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.