问题
I want to divide my Rmarkdown document like in picture. One column for the first section then two columns in the other sections.
used \onecolumn
and \twocolumn
but each section is created in a single page. Is there a solution to fix it?
回答1:
This article has been published in a journal of the AMS. Fortunately, the rticle
package supports the AMS journals. I use the standard template as generated by RStudio, change layout
in the YAML header and use fancyhdr
to redefine the pagestyle:
layout: twocol
header-includes:
- \usepackage{fancyhdr}
- '`\fancypagestyle{plain}{\fancyhf{}\fancyfoot[C]{\thepage}\renewcommand{\headrulewidth}{0pt}}`{=latex}'
I then get the following result:
As an alternative, you could try to adapt the revtex
LaTeX class as used by the APS.
Note: I am using a quite recent version of pandoc
, which makes the quoting of LaTeX complicated. With older versions of pandoc
you might get away without the quoting.
来源:https://stackoverflow.com/questions/52411750/apply-multiple-columns-division-in-the-same-r-markdown-page