I'm writing on a beamer presentation in rmarkdown and I have two types of frames which should differ by their background. So I wrote two functions like that in latex:
\newcommand{\settitlestyle}{
\setbeamertemplate{background canvas}{%
\includegraphics[width = \paperwidth, height = \paperheight]
{backgroundtitle.jpg}}
}
\setmainstyle
is exactly the same command but another jpg.
In the YAML I have already input a tex file that defines the functions and calls \settitlestyle
. Works. But after the first slide I want to switch to the mainstyle. When I call \setmainstyle
in the markdownfile nothing happens.