我正在用 R Markdown 编写一份报告,其中包含引用资料。问题是 R markdown 会自动在报告末尾放置引用。我想在引用文献后面放一个附录,有什么办法吗?我看到 a child document 是可能的但我想把所有东西都放在一个独特的 .Rmd
中文件。
下面是一个可重现的示例:
---
title:
author:
date:
abstract:
output:
pdf_document:
template: NULL
number_sections: true
citation_package: biblatex
bibliography: references.bib
biblio-style: bwl-FU
---
# Partie 1
\cite{greenwood_financial_1989}
<!-- where I would like the references to be -->
# Appendix
bla bla
这是
references.bib
的内容文件:@article{greenwood_financial_1989,
title = {Financial Development, Growth and the Distribution of Income},
url = {https://www.nber.org/papers/w3189},
number = {3189},
journaltitle = {NBER Working Paper Series},
date = {1989},
author = {Greenwood, Jeremy and Jovanovic, Boyan}
}
任何的想法 ?
最佳答案
这在 R Markdown Cookbook 中有解释(第 3.5.4 节)。我们可以强制将引用书目打印在特定位置:
# References
<div id="refs"></div>
# Appendix
注意:
@id_of_paper
的论文,这会起作用(这是 R Markdown 中推荐的方式)但不是 \cite{id_of_paper}
. citation_package: biblatex
这不起作用在 YAML 这是我改编的例子:
---
title:
author:
date:
abstract:
output:
pdf_document:
template: NULL
number_sections: true
bibliography: references.bib
biblio-style: bwl-FU
---
# Partie 1
@greenwood_financial_1989
# References
<div id="refs"></div>
# Appendix
bla bla
关于R Markdown : place an Appendix after the "References" section?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58187514/