简体   繁体   English

pandoc文档转换失败,错误2

[英]pandoc document conversion failed with error 2

when I knit HTML in R studio, I get this: 当我在R studio中编写HTML时,我得到了这个:

"C:/Users/Susan/ANACON~1/Scripts/pandoc" +RTS -K512m -RTS lesson3_student.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output lesson3_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 " output file: lesson3_student.knit.md “C:/ Users / Susan / ANACON~1 / Scripts / pandoc”+ RTS -K512m -RTS lesson3_student.utf8.md - to html - from markdown + autolink_bare_uris + ascii_identifiers + tex_math_single_backslash --output lesson3_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 - 变量“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”输出文件:lesson3_student.knit.md

unrecognized option `--smart' Try pandoc.exe --help for more information. 无法识别的选项`--smart'尝试pandoc.exe --help以获取更多信息。 Error: pandoc document conversion failed with error 2 In addition: Warning message: running command '"C:/Users/Susan/ANACON~1/Scripts/pandoc" +RTS -K512m -RTS lesson3_student.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output lesson3_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 "' had status 2 Execution halted 错误:pandoc文档转换失败,错误2另外:警告消息:正在运行命令'“C:/ Users / Susan / ANACON~1 / Scripts / pandoc”+ RTS -K512m -RTS lesson3_student.utf8.md --to html - -from markdown + autolink_bare_uris + ascii_identifiers + tex_math_single_backslash --output lesson3_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 = Te-SAMS -MML_HTMLorMML “'状态为2执行暂停

Can someone give me an idea what went wrong and how to fix it? 有人能告诉我出了什么问题以及如何解决这个问题吗?

Thank you 谢谢

Today I had the same problem. 今天我遇到了同样的问题。 I fixed it by setting the smart option to false , as described here . 我通过智能选项设置为固定的, false ,如所描述这里

   output:
     html_document: 
       smart: false

It seems that --smart is no longer supported in the newest pandoc version (1.19.2.1), even though it should be should be; 看来, --smart在最新版本pandoc(1.19.2.1)不再支持,即使它应该是应该的; see discusion on the RStudio forum 看看RStudio论坛上的讨论

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

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