I'm looking for a solution to the RMarkdown 2-column question. The columns.sty works great in Beamer but not in article or document mode. What I'm looking for is a way to switch from full width to two column text in which the RMarkdown parameters are recognized (minipage doesn't allow this, apparently) and where I can execute a chunk for a plot or table or pander output, and then back again to full width, w/o creating a new page as with \twocolumn \onecolumn. The classoption: twopage approach doesn't work for me for some reason as suggested here. Am I asking too much? Any help with a fully working example would be great!
Here's an example of the use of the class option 'twocolumn' in the yaml section. A two column section starts with \begin{minipage} and ends with \end{minipage}. This will produce a two column section but, as far as I can tell, this also creates a latex-only section because RMarkdown parameters (e.g. # ... for a heading) create an error on rendering to a pdf (that's what I want).
title: "Two column test"
author: "David Stevens"
date: "10/19/2020"
output:
pdf_document: default
html_document: default
classoption: twocolumn
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
### Left column
\begin{minipage}[t]{0.5\textwidth}
First Column Goodies.\\
More First Column Goodies.\\
### Left column\\
\end{minipage}
\begin{minipage}[t]{0.5\textwidth}
Second Column Goodies.\\
More Second Column Goodies.\\
\end{minipage}
Produces the error
output file: Two-Column-Tester.knit.md
! You can't use `macro parameter character #' in horizontal mode. l.81 # ## Left column
Error: LaTeX failed to compile Two-Column-Tester.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Two-Column-Tester.log for more info. Execution halted
The line ### Two column renders fine outside the two-column section but when moved inside the two column section throws an error