【问题标题】:Can I use `hyperref` in R markdown2我可以在 R markdown2 中使用“hyperref”吗
【发布时间】:2014-08-28 08:24:10
【问题描述】:

是否可以使用 R markdown v2 在目录中添加链接?

在 LaTeX 中,这将通过加载 \package{hyperref}

【问题讨论】:

  • 应该是可以的。尝试后会发生什么?
  • ! LaTeX Error: Can be used only in preamble. 放在前面的时候,如果放在前面,则以 HTML 模式打开。
  • 您可以修改 RMarkdown v2 使用的 TeX 模板,使其加载 hyperref 包。这个答案有详细信息:stackoverflow.com/questions/25513671/…
  • 谢谢,去看看

标签: r r-markdown


【解决方案1】:

这里其实提到了这个问题的答案:

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

如前所述,这个 YAML 选项并不容易找到。

解决方案

在 YAML 前端添加以下内容:

header-includes:
    - \usepackage{hyperref}

【讨论】:

  • 看起来hyperref 可能已经包含在内,只需将其视为将任何 LaTeX 包添加到 R 降价的示例。
猜你喜欢
  • 1970-01-01
  • 2020-11-01
  • 1970-01-01
  • 2019-01-06
  • 1970-01-01
  • 1970-01-01
  • 2021-01-15
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多