【问题标题】:How do I put the citations at the end of a document in a tufte handout?如何在 tufte 讲义中将引文放在文档末尾?
【发布时间】:2016-08-20 10:32:28
【问题描述】:

我正在使用 bookdown::tufte_html2() 创建一个单文档 bookdown 文档,虽然我喜欢 Tufte 的所有功能,但我希望我的引用不要弄乱页边距。

tufte 包文档似乎建议 [这是可选的]:

引用可以显示为 HTML 输出的边注。例如,我们可以在此处引用 R(R Core Team 2015R Core Team. 2015. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing.https://www.R-project.org/.)。要启用此功能,您必须在 YAML 元数据中设置 link-citations: yes,并且 pandoc-citeproc 的版本应至少为 0.7.2。如果版本不够,您始终可以从http://pandoc.org/installing.html 安装您自己的 Pandoc 版本。要检查系统中 pandoc-citeproc 的版本,您可以在 R 中运行它:

system2('pandoc-citeproc', '--version')

如果您的 pandoc-citeproc 版本太低,或者您没有在 YAML 中设置 link-citations: yes,则 HTML 输出中的引用将放在输出文档的末尾。

我已经设置了

link_citations: false

在我的 YAML 标头中,但无济于事。

tufte_html2() 输出仍然在边缘有引用。

奇怪的是,tufte_handout2() 也没有对争论做出反应,只是总是将引用放在文档末尾。

我在这里错过了什么?

【问题讨论】:

    标签: r knitr r-markdown tufte bookdown


    【解决方案1】:

    这里有两个问题。一个在我身边,一个在你身边。它是link-citations 而不是link_citations。然后就可以了

    devtools::install_github(c('rstudio/tufte', 'rstudio/bookdown'))
    

    如果不设置 link-citations(默认为 false)或设置 link-citations: no,您应该会在文档末尾看到引用而不是页边距。

    【讨论】:

      猜你喜欢
      • 2023-04-06
      • 1970-01-01
      • 2019-05-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多