1
我试图把一个RMD转换成PDF,但不断收到此错误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 \%$'(在'%'前面缺少反斜线)。 – msoftrain