在R Markdown中,如何创建对带有超链接的引用的引用? [英] In R Markdown, how do I create citations to references with a hyperlink?
本文介绍了在R Markdown中,如何创建对带有超链接的引用的引用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
现在我有一个RMarkdown文件,当单击参考文献的引文时,我希望读者可以浏览到参考书目中的相应参考文献.
Now I have a RMarkdown file, when the citation for the reference is clicked, I want the reader to be navigated to the corresponding reference in the bibliography.
---
title: "My Title"
author: "my name"
date: "2020/2/6"
output:
pdf_document:
keep_tex: true
header-includes:
- \hypersetup{colorlinks = false,pdfborder={1 1 1}}
bibliography: bibfile.bib
---
[Stack Overflow](https://stackoverflow.com/)
This is my reference[@Breiman2001].
我希望效果可能是这样的:
I want the effect could be like this:
这是.bib
文件:
@article{Breiman2001,
title={Random Forests},
author={Breiman, Leo},
journal={Machine Learning},
volume={45},
number={1},
pages={5-32},
year={2001},
}
推荐答案
您应该可以通过在YAML中添加link-citations: true
来解决此问题.
You should be able to fix this by adding link-citations: true
in your YAML.
有关更多详细信息,请参见SO上的另一个问题: Rmarkdown删除引用超链接
See this other question on SO for more details: Rmarkdown removes citation hyperlink
这篇关于在R Markdown中,如何创建对带有超链接的引用的引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文