Can I modify the default Latex template used by Rmarkdown to compile Rmd files to pdf with the beamer class?
I am asking because of the difficulties I encounter using \includepdf (from the pdfpages package). Inspecting the generated tex source suggests that the root problem is the ignorenonframetext option in \documentclass[ignorenonframetext,]{beamer}.
(It is not a viable option for me to manually change the tex source each time)
In short: I want to modify the "Rmd beamer Latex template" (if that exists) to change the default ignorenonframetext
Everything that rmarkdown does goes through knitr and pandoc. In the yaml, you can specify a fair amount of LaTeX arguments, I've gone as far as including Haskell parsers to get LaTeX tables right.
You'll notice at the end of knit the command string that puts the whole chain together:
So, I fear, what you will have to do is to add a LaTeX document class where /Library/Frameworks/R.framework/Versions/3.6/Resources/library/tufte/rmarkdown/templates/tufte_handout/resources/tufte-handout.tex --highlight-style pygments --pdf-engine pdflatex --variable 'documentclass:tufte-handout appears.
That, I think is the sound position for a template you expect to use a lot. I find it a lot easier to write scripts using bash tools or Python to batch correct the offending option you found if I only expect to be processing this format a few dozen times. Writing LaTeX templates is not what I want to spend my time doing if possible.