r - R Markdown:在“参考”部分之后放置一个附录?
问题描述
我正在用 R Markdown 写一份报告,其中包括参考资料。问题是 R markdown 会自动将引用放在报告的末尾。我想在参考文献后面加一个附录,有什么办法吗?我看到可以使用子文档,但我希望将所有内容都放在一个唯一的.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
推荐阅读
- kubernetes - Micronaut 线人
- python - 我如何将json数组显示到python数据框
- reactjs - 获取所有单选按钮答案的值
- sql - java.sql.SQLException:ORA-06550:第 2 行,第 33 列 -PLS-00103:遇到符号“文件结尾”
- python - 无法在 ubuntu 21.10 中找到 python-gobject?
- python - 在张量流中添加三列时重塑张量
- c# - 对于 RSA,客户端和服务器之间的公钥交换如何发生?
- arrays - postgresql 到 php 数组,以列为索引
- docker - dockerlogs 中的两个时间戳
- tensorflow - 使用 Tensoflow Keras Ubuntu 20.04 在 CNN 训练期间重新启动 GPU