2016-09-12 90 views
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,並嘗試我已經看到了這裏的各種解決方法,但沒有什麼工作

+2

您可以使用'keep_tex:true'來保留中間tex文件並查看206行中發生了什麼...... –

+0

這是一個很好的建議,可以讓我解決類似的問題。在我的例子中,我編寫了'$ \ equiv50%$'而不是'$ \ equiv50 \%$'(在'%'前面缺少反斜線)。 – msoftrain

回答

1

枚舉應該是

1. part of 2. a numbered list

* an un- * ordered list

可以發佈你的.Rmd的一部分?