Все в одном:
Я использую этот код для хранения ссылок в самого .Rmd
файла:
---
output:
html_document:
citation_package: natbib
biblio-style: apsr
references:
- id: baseR
title: A Language and Environment for Statistical Computing
author:
- family: R Core Team
given: Team
organization: R Foundation for Statistical Computing
publisher: Nature Publishing Group
year: 2019
type: article
---
I cite R here: [@baseR]
Some content,
Приведенный выше код напечатает цитирование в конце файла html при вязании.
Внешний файл .bib:
В качестве альтернативы я иногда использую extern .bib
файл (например, если есть много ссылок):
Содержимое файла .Rmd
:
---
output:
pdf_document:
citation_package: natbib
keep_tex: true
fig_caption: true
latex_engine: pdflatex
bibliography: ext/lit.bib
biblio-style: apsr
---
Cite here [@baseR] creates a parenthetical citation (R ..., 1900)
Содержимое ext/lit.bib
:
@Manual{baseR,
title = {R: A Language and Environment for Statistical Computing},
author = {{R Core Team}},
organization = {R Foundation for Statistical Computing},
address = {Vienna, Austria},
year = {2019},
}