当在.Rmd文件的YAML中包含时,是否可以指定引用样式?我在各种R markdown手册中找不到任何信息。
biblio-style
参数。如果您熟悉 latex,那么这基本上就是填写 \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仅提供了有限的控制文献样式的方式。例如,您无法直接指定
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