[英]How to change citation style in biblatex in R Markdown?
当citation_package: biblatex
包含在.Rmd文件的YAML中时,是否可以指定引用样式? 我在各种R降价手册中找不到任何相关信息。
此问题已于2016年3月解决。 由于很多文档都是在此之前编写的,因此并不总是出现在指南中。 但是,rmarkdown上的NEWS文件始终是检查新功能的好地方。
您可以在YAML中使用biblio-style
参数。 如果你熟悉乳胶,这基本上填写了\\usepackage[style= *SELECTED STYLE*]{biblatex}
。 这是一个例子。 它将为您构建一个单独的.bib
文件:
---
output:
pdf_document:
citation_package: biblatex
keep_tex: TRUE
bibliography: test.bib
---
```{r}
knitr::write_bib(x = c("knitr", "rmarkdown") , file = "test.bib")
```
Some ref [@R-knitr]
Another ref [@R-rmarkdown]
# References
添加biblio-style
参数:
---
output:
pdf_document:
citation_package: biblatex
keep_tex: TRUE
bibliography: test.bib
biblio-style: authoryear
---
```{r}
knitr::write_bib(x = c("knitr", "rmarkdown") , file = "test.bib")
```
Some ref [@R-knitr]
Another ref [@R-rmarkdown]
# References
要了解有关您可以使用的不同样式的更多信息,请访问: https : //www.sharelatex.com/learn/Biblatex_citation_styles
更进一步 :YAML只提供对biblio风格的一定程度的控制。 例如,您无法直接指定
citestyle
。 如果你想进一步改变biblatex风格,你需要编辑pandoc模板: https : //github.com/rstudio/rmarkdown/blob/master/inst/rmd/latex/default-1.15.2.tex 。 这有点高级,所以只有在您熟悉LaTex时才推荐它: https ://rmarkdown.rstudio.com/pdf_document_format.html#custom_templates
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.