I\'m trying to come up with a good system for generating slides and accompanying handouts. The ideal system would have the following properties:
There is a workaround for beamer error.
In short: Error is related to pandoc conversion engine, which treats everything between \begin{...}
and \end{...}
as TeX. It can be avoided by giving new definition for begin{column}
and end{column}
in yaml header.
Create mystyle.tex and write there:
\def\begincols{\begin{columns}}
\def\begincol{\begin{column}}
\def\endcol{\end{column}}
\def\endcols{\end{columns}}
In the Rmd file use these new definitions
---
output:
beamer_presentation:
includes:
in_header: mystyle.tex
---
Two Column Layout
-------
\begincols
\begincol{.48\textwidth}
This slide has two columns.
\endcol
\begincol{.48\textwidth}
```{r}
#No error here i can run any r code
plot(cars)
```
\endcol
\endcols
And you get: