Search code examples
rpandocr-markdown

R Studio change pandoc .tex template


I want to use a different latex template for rendering R markdown version 2.

I found the following suggestions:

a) location of template

system.file("rmd/latex/default.tex", package="rmarkdown")

b) change of YAML front matter

---
...
output:
   pdf_document:
      template: mytemplate.tex
---

However, his does not seem to be the correct template location for R Studio/ Pandoc, as I get the following error message:

pandoc.exe: Could not find data file templates\mytemplate.tex

Solution

  • Just put the style.tex file in the same folder as the markdown file does now works for me.