Render .Rmd from Rscript does not work

My suggestion:

  • copy the Report.tex template from my github to your working directory (or someplace else, and use the full path; working directory makes debugging easier)
  • in the YAML heading of your .Rmd file include this reference:
output:
  pdf_document:
    latex_engine: xelatex
    template: Report.tex

The indentations are important.

  • then run your script again; it should not fail on \begin{tabu}, since package tabu is attached in my template.