且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Rmarkdown 删除引用超链接

更新时间:2023-02-21 20:00:47

默认情况下 pandoc 会渲染引文.我看到了两种选择.

By default pandoc will do the rendering of the citations. I see two alternatives.

  1. 在 Rmd 中使用 citet{sharpe} 而不是 @sharpe.缺点:您只能将 Rmd 渲染为 pdf.
  2. 使用 --natbib 参数.缺点:渲染成 pdf 时,您需要一个额外的 bibtex 步骤.
  1. Use citet{sharpe} in the Rmd instead of @sharpe. Downside: you can only render the Rmd into pdf.
  2. Use the --natbib argument. Downside: You need an extra bibtex step when rendering into pdf.

更新:您还可以在 YAML 中提供选项 link-citations: true(自 pandoc v1.16 起)并保留引用的 pandoc 语法.

Update: You can also provide the option link-citations: true in your YAML (since pandoc v1.16) and keep the pandoc syntax for citations.