In R Markdown, how do I create citations to references with a hyperlink?

半腔热情 提交于 2020-02-25 04:06:21

问题


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:

this is the .bib file:

@article{Breiman2001,
  title={Random Forests},
  author={Breiman, Leo},
  journal={Machine Learning},
  volume={45},
  number={1},
  pages={5-32},
  year={2001},
}

回答1:


You should be able to fix this by adding link-citations: true in your YAML.

See this other question on SO for more details: Rmarkdown removes citation hyperlink



来源:https://stackoverflow.com/questions/60087346/in-r-markdown-how-do-i-create-citations-to-references-with-a-hyperlink

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!