apply multiple columns division in the same R markdown page

偶尔善良 提交于 2019-12-24 02:31:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!