【问题标题】:RMD conversion to PDFRMD 转换为 PDF
【发布时间】:2016-09-12 00:13:02
【问题描述】:

我正在尝试将 RMD 转换为 PDF,但不断收到此错误

output file: hw1.knit.md

/Volumes/RStudio-0.99.893/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS hw1.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output hw1.tex --template /Library/Frameworks/R.framework/Versions/3.2/Resources/library/rmarkdown/rmd/latex/default-1.15.2.tex --highlight-style tango --latex-engine /Library/TeX/texbin/xelatex --variable graphics=yes --variable 'geometry:margin=1in' 
/Volumes/RStudio-0.99.893/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS hw1.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output hw1.pdf --template /Library/Frameworks/R.framework/Versions/3.2/Resources/library/rmarkdown/rmd/latex/default-1.15.2.tex --highlight-style tango --latex-engine /Library/TeX/texbin/xelatex --variable graphics=yes --variable 'geometry:margin=1in' 
! LaTeX Error: Command \end{enumerate} invalid in math mode.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...                                              

l.206 \end{enumerate}

pandoc: Error producing PDF from TeX source
Error: pandoc document conversion failed with error 43

如果完美地格式化为 html,但我需要 PDF。 我有 TeX,并尝试了我在这里看到的各种修复,但没有任何效果

【问题讨论】:

  • 您可以使用keep_tex: true 保留中间tex 文件并查看第206 行中到底发生了什么...
  • 这是一个很好的建议,让我能够解决类似的问题。就我而言,我写的是$\equiv50%$ 而不是$\equiv50\%$% 前面缺少反斜杠)。

标签: pdf r-markdown


【解决方案1】:

枚举应该是

1. part of 2. a numbered list

* an un- * ordered list

你能发布你的 .Rmd 的那部分吗?

【讨论】:

    猜你喜欢
    • 2017-01-24
    • 1970-01-01
    • 2017-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-17
    • 2012-04-04
    相关资源
    最近更新 更多