0
votes

I have R Client 3.2.2.0, pandoc version 2.6, Miktex 2.9, markdown 0.7.7, rmarkdown 1.1, knitr 1.14

Conversion from .rmd to HTML and .docx functions, but whenever I convert to PDF it gives error 2. Any ideas ?

Error: pandoc document conversion failed with error 2
In addition: Warning message:
running command '"C:/PROGRA~1/Pandoc/pandoc" +RTS -K512m -RTS rmd_2b68dd11afa.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc2b6834775719.pdf --template "C:\Users\username\Documents\R\win-library\3.3\rmarkdown\rmd\latex\default-1.17.0.2.tex" --highlight-style tango --latex-engine pdflatex --variable graphics=yes --variable "geometry:margin=1in"' had status 2 
1

1 Answers

1
votes

The option --latex-engine used by pandoc 1.x has been replaced with --pdf-engine in pandoc 2.x. Newer rmarkdown/knitr versions use the correct option. You should update these packages.