我想知道是否有任何简单的方法可以使用.bib-file在github站点的自述文件中创建学术参考。在rmarkdown中,我习惯于在文本中执行以下操作:
@test2010
如果我在yaml-header中指定了正确的bibtex-file,它可以很好地工作。
在“普通的”github标记中有没有类似的东西?
发布于 2021-04-10 12:30:44
GitHub Flavored Markdown(GFM)不支持书目。解决方法是从R Markdown生成GFM。
步骤:创建README.Rmd和bibliography.bib并编织README.Rmd。
README.Rmd
---
output:
md_document:
variant: markdown_github
bibliography: bibliography.bib
---
[@xie2018]bibliography.bib
@Book{xie2018,
title = {R Markdown: The Definitive Guide},
author = {Yihui Xie and J.J. Allaire and Garrett Grolemund},
publisher = {Chapman and Hall/CRC},
address = {Boca Raton, Florida},
year = {2018},
note = {ISBN 9781138359338},
url = {https://bookdown.org/yihui/rmarkdown},
}输出README.md
(Xie, Allaire, and Grolemund 2018)
<div id="refs" class="references csl-bib-body hanging-indent">
<div id="ref-xie2018" class="csl-entry">
Xie, Yihui, J. J. Allaire, and Garrett Grolemund. 2018. *R Markdown: The
Definitive Guide*. Boca Raton, Florida: Chapman; Hall/CRC.
<https://bookdown.org/yihui/rmarkdown>.
</div>
</div>https://stackoverflow.com/questions/66796916
复制相似问题