gpt4 book ai didi

通过 RStudio 的 R Markdown 无法生成 PDF,只能生成 HTML 和 Word(Pandoc 生成状态 43)

转载 作者:行者123 更新时间:2023-12-02 04:45:07 25 4
gpt4 key购买 nike

即使使用 'Newfile' -> 'New R Markdown' 序列生成的非常简单的 Rmd 文件,选择 'Document ' 和 'PDF' 作为默认输出格式时,我也会收到以下错误在 RStudio 中按下“Knit PDF”按钮:

"C:/PROGRA~2/Pandoc/pandoc" +RTS -K512m -RTS mist2.utf8.md --to latex 
--from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures
--output mist2.pdf --template "D:\_Dateien_von_ulk\Dokumente\R\win-library\3.2\rmarkdown\rmd\latex\default-1.14.tex" --highlight-style tango
--latex-engine pdflatex --natbib --variable graphics=yes --variable "geometry:margin=1in"
output file: mist2.knit.md

! Incomplete \iffalse; all text was ignored after line 131.
<inserted text>
\fi
<*> ./tex2pdf.2196/input.tex

! ==> Fatal error occurred, no output PDF file produced!
Transcript written on D:/ulk/uk-uni/Uni-ab-September-1999/Lehre/Unterlagen-Lehr
e-WS-2015-16/Lektuerekurs.VAR.ECM.COINT.WS2015.16/Pfaff.2008.RCode/RCode/tex2pd
f.2196/input.log.

pandoc.exe: Error producing PDF from TeX source
Fehler: pandoc document conversion failed with error 43
Zusätzlich: Warnmeldung:
Ausführung von Kommando '"C:/PROGRA~2/Pandoc/pandoc" +RTS -K512m -RTS mist2.utf8.md --to latex
--from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output mist2.pdf
--template "D:\_Dateien_von_ulk\Dokumente\R\win-library\3.2\rmarkdown\rmd\latex\default-1.14.tex"
--highlight-style tango --latex-engine pdflatex --natbib --variable graphics=yes
--variable "geometry:margin=1in"' ergab Status 43
Ausführung angehalten

sessionInfo() 提供的 R session 信息给出:

R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8 x64 (build 9200)

locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252 LC_MONETARY=German_Germany.1252
[4] LC_NUMERIC=C LC_TIME=German_Germany.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] RevoUtilsMath_3.2.2

loaded via a namespace (and not attached):
[1] htmltools_0.2.6 tools_3.2.2 yaml_2.1.13 rmarkdown_0.8.2 digest_0.6.8

在 Window 8.1 下。我使用:

  1. MikTeX 版本 2.9.5721
  2. Pandoc 1.15.1.1。
  3. RStudio 0.99.489

今天(2015 年 11 月 17 日)所有库都已更新。此外,所有软件都已使用管理员权限安装在驱动器 C: 上的安装默认路径中,并可供所有用户使用。

将 Rmd 文件编织成 HTML,Word 可以正常工作。
有什么解决问题的建议吗?

最佳答案

刚遇到同样的问题。这是发生了什么:

---
date: "8. Mai 2017"
---

pandoc 视为枚举。然后 TeX 在 \date{} 中找到一个枚举:

\日期{\开始{枚举}
\def\labelenumi{\arabic{enumi}.}
\setcounter{枚举}{7}
\紧身名单
\元素
2017年5月
\结束{枚举}}
它根本不喜欢。

解决方法:

  • 转义点:日期:8\。 Maidate: '8\. Mai 2017'date: "8\\. Mai 2017"

    date: '`r format(Sys.time(), "%d\\. %B %Y")`'
  • 作为枚举的处理是由序列号-点-空间触发的。 08.05.2017 不会出现此问题(也不会出现轻微打错的 8.Mai 2017)。

关于通过 RStudio 的 R Markdown 无法生成 PDF,只能生成 HTML 和 Word(Pandoc 生成状态 43),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33765692/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com