简体   繁体   English

我可以在R markdown2中使用`hyperref`吗

[英]Can I use `hyperref` in R markdown2

Is it possible to have links in the Table of Contents using R markdown v2? 使用R markdown v2可以在目录中具有链接吗?

In LaTeX this would be by loading \\package{hyperref} 在LaTeX中,这是通过加载\\package{hyperref}

The answer to this question is actually mentioned here: 这里实际上提到了这个问题的答案:

https://stackoverflow.com/questions/24208889/how-to-specify-numbered-sections-in-pandocs-front-matter# = https://stackoverflow.com/questions/24208889/how-to-specify-numbered-sections-in-pandocs-front-matter# =

As mentioned this YAML option is not easy to find. 如前所述,这个YAML选项不容易找到。

Solution

add the following to the YAML front matter: 在YAML前端添加以下内容:

header-includes:
    - \usepackage{hyperref}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM