首页 > 解决方案 > 为什么在尝试编织到 pdf 时 R Markdown 会给我一个 LaTeX 错误?

问题描述

我正在尝试使用 R Markdown 编织 PDF 文档。降价成功编织到 100%,但在尝试创建输出文件时,它会产生以下错误:

output file: project_2_cusack.knit.md

/Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS project_2_cusack.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output project_2_cusack.tex --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --lua-filter /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rmarkdown/rmd/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rmarkdown/rmd/lua/latex-div.lua --variable 'geometry:margin=1in' 
! Output loop---100 consecutive dead cycles.
\end@float ... \@tempdima \penalty \@floatpenalty 
                                                  \else \vadjust {\penalty -...
l.385 \end{figure}

Error: LaTeX failed to compile project_2_cusack.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See project_2_cusack.log for more info.
Execution halted

我已指定保存为 PDF,因此不确定它为什么要尝试编织为 tex 文件。

有关故障排除的任何建议?

标签: rr-markdown

解决方案


推荐阅读