【问题标题】:pandoc document conversion failed with error 2pandoc 文档转换失败,错误 2
【发布时间】:2017-07-14 15:02:41
【问题描述】:

当我在 R studio 中编写 HTML 时,我得到了这个:

"C:/Users/Susan/ANACON~1/Scripts/pandoc" +RTS -K512m -RTS course3_student.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output course3_student.html --smart --email-obfuscation none --self-contained --standalone --section-divs --template "C:\Users\Susan\Documents\R\win-library\3.3\rmarkdown\rmd\h\default .html" --no-highlight --variable highlightjs=1 --variable "theme:bootstrap" --include-in-header "C:\Users\Susan\AppData\Local\Temp\RtmpaUaaRx\rmarkdown-str3cf45da21737.html " --mathjax --variable "mathjax-url:https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" 输出文件:第3课_student.knit.md

无法识别的选项 `--smart' 尝试 pandoc.exe --help 以获取更多信息。 错误:pandoc 文档转换失败,错误 2 另外:警告信息: 运行命令'"C:/Users/Susan/ANACON~1/Scripts/pandoc" +RTS -K512m -RTS course3_student.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output course3_student.html --smart --email-obfuscation none --self-contained --standalone --section-divs --template "C:\Users\Susan\Documents\R\win-library\3.3\rmarkdown\rmd\h\default .html" --no-highlight --variable highlightjs=1 --variable "theme:bootstrap" --include-in-header "C:\Users\Susan\AppData\Local\Temp\RtmpaUaaRx\rmarkdown-str3cf45da21737.html " --mathjax --variable "mathjax-url:https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"' 状态为 2 执行停止

谁能告诉我出了什么问题以及如何解决它?

谢谢

【问题讨论】:

  • 嗯,你能在你的 Rmd 文件中包含 YAML 吗?
  • 我猜pandoc 的版本在您的情况下不支持--smart 标志。据推测,您安装了 Anaconda 或类似的东西,并且提供了不支持该标志的 pandoc 版本?

标签: html r rstudio pandoc


【解决方案1】:

今天我遇到了同样的问题。 我通过将智能选项设置为false 来修复它,如here 所述。

   output:
     html_document: 
       smart: false

似乎在最新的 pandoc 版本(1.19.2.1)中不再支持--smart,尽管它应该是;见discusion on the RStudio forum

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-04-13
    • 1970-01-01
    • 2018-02-23
    • 1970-01-01
    • 2017-05-08
    • 2019-10-14
    • 2015-01-14
    • 1970-01-01
    相关资源
    最近更新 更多