2016-06-24 3 views
0

This example LaTeX file은 Rstudio, TexShop 및 pdflatex example.tex을 사용하여 나에게 잘 컴파일됩니다. 그러나 rmarkdown::render이 작동하지 않습니다.rmarkdown :: render LaTeX 문서를 컴파일합니다.

> rmarkdown::render("example.tex", output_format = "pdf_document") 
/usr/local/bin/pandoc +RTS -K512m -RTS example.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output example.pdf --template /Library/Frameworks/R.framework/Versions/3.3/Resources/library/rmarkdown/rmd/latex/default.tex --highlight-style tango --latex-engine /Library/TeX/texbin/pdflatex --variable graphics=yes --variable 'geometry:margin=1in' 
! LaTeX Error: Can be used only in preamble. 

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

l.88 \documentclass 

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

에 LaTeX 문서로 시작한다고 말할 수 있습니까? 나는 2016 라이브

  • 맥 OS 10.11.5
  • R 3.3.0
  • rmarkdown 0.9.6
  • pandoc 1.13.2
  • pdfTeX 3.14159265-2.6-1.40.17 (TeX이 사용하고)

답변