When rendering html documents with rmarkdown there are ways to make a two columns layout, e.g. here
Is there an easy way to render a pdf document with two column layout? Is there an example code somewhere?
New pandoc version have made this easier since my original answer. According to pandoc's manual, you can now specify classoptions directly in the YAML front matter:
--- classoption: - twocolumn ---
The new div notation also allows for inserting two column sections anywhere in the document, working for most formats
:::::::::::::: {.columns} ::: {.column width="40%"} contents... ::: ::: {.column width="60%"} contents... ::: ::::::::::::::
You can use the article option twocolumn
to format the whole document in two columns. Add this to your yaml front matter:
--- output: pdf_document: pandoc_args: [ "-V", "classoption=twocolumn" ] ---
More succinctly:
--- output: pdf_document: classoption: twocolumn ---
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With