Closed cderv closed 4 years ago
This is a broader question than for presentation https://stackoverflow.com/questions/31753897/2-column-section-in-r-markdown
\usepackage{multicol}
(PDF)Related 📦 offering format with two column layout:
rticles
📦 has also two columns layout latex template I think.
https://stackoverflow.com/questions/34808612/how-make-2-column-layout-in-r-markdown-when-rendering-pdf
Solution is to use some feature of pandoc variable for Latex: the classoption
variables sets to twocolumn
according to the documentclass
set to article
Related to pandoc feature, and may be part of #106
This is now added in https://bookdown.org/yihui/rmarkdown-cookbook/multi-column.html with several recipes.
From all that was gathered above, I see two possible additions:
From : https://github.com/yihui/rmarkdown-cookbook/issues/19#issuecomment-431581739, https://github.com/yihui/rmarkdown-cookbook/issues/19#issuecomment-428835793 and https://github.com/yihui/rmarkdown-cookbook/issues/19#issuecomment-431580529
Something like this seems to work using classoption: twocolumn
and \onecolumn
or \twocolumn
command. But not easy to tune apparently
This could also be a way to mention packages with those kind of twocolumn format (pinp
and rticles
)
You know better than me about latex, so you may be able to see if it worths mentioning.
multicol
latex packageFrom https://github.com/yihui/rmarkdown-cookbook/issues/19#issuecomment-426152647
It seems that multicol
package is easier to use than the minipage
in column.tex
when using only with text. It does not work well with code chunk or figure without using another package (wrapfig).
Again I am far from being a Tex expert, so I don't know specifically what this tex multicol 📦 is worth. I found about it in one of the SO answer and more in here. The current recipe could be just enough.
@yihui if you find one of the above useful addition, we can leave it open to not forget adding about these. Otherwise, we can close this issue.
classoption
is now mentioned in cb82b3bfda9a7911e92d68a3d0cd3b085280a143 in the part about latex template
I just mentioned \onecolumn
and \twocolumn
in a footnote. I'll leave out the multicol package. Thanks!
Just updating a now dead link to the page in the rmarkdown cookbook: https://bookdown.org/yihui/rmarkdown-cookbook/multi-column.html
@overbeek42 Thanks! I just updated the link above.
Great. Sorry for responding to a closed issue. I later saw that this causes you anxiety. Didn't mean to.
On Fri, Dec 25, 2020, 4:24 PM Yihui Xie notifications@github.com wrote:
@overbeek42 https://github.com/overbeek42 Thanks! I just updated the link above.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/yihui/rmarkdown-cookbook/issues/19#issuecomment-751262843, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKXSH6DQ766CSR3PHH7IE6DSWSVDFANCNFSM4FQKULQQ .
No worries! In this case, it didn't cause me any anxiety at all since it was extremely easy to deal with, and it's entirely reasonable to reply under this issue since you were pointing out a problem right inside this issue. I really appreciate that.
Glad there's no hard feelings. Happy to be of some help after you enabled be to create amazingly crisp and neat slides to present my research!
On Fri, Dec 25, 2020, 5:33 PM Yihui Xie notifications@github.com wrote:
No worries! In this case, it didn't cause me any anxiety at all since it was extremely easy to deal with, and it's entirely reasonable to reply under this issue since you were pointing out a problem right inside this issue. I really appreciate that.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/yihui/rmarkdown-cookbook/issues/19#issuecomment-751269425, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKXSH6AVDNFW6KXHVWYILPDSWS5GJANCNFSM4FQKULQQ .
\begin{multicols}{2} ```{r, echo = FALSE, results='asis'} cat(stringi::stri_rand_lipsum(2), sep = "\n")
\end{multicols}
New chapter with only one column
cat(stringi::stri_rand_lipsum(2), sep = "\n")
It does not work with verbatim code chunks though. And it is impossible to put subheadings inside multicols
.
A specific question we find on SO, but that I can relate to because some colleagues often ask. More generally is how to customize the layout of your output. Maybe too broad or an idea for a specific chapter in the book.
Related SO questions: