本文介绍了在同一R降价页面中应用多个列划分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想像图片一样分割我的Rmarkdown文档.第一部分为一列,其他部分为两列.

I want to divide my Rmarkdown document like in picture. One column for the first section then two columns in the other sections.

使用了\onecolumn\twocolumn,但是每个部分都在单个页面中创建.有解决方案吗?

used \onecolumn and \twocolumn but each section is created in a single page. Is there a solution to fix it?

推荐答案

文章已发布在AMS的期刊上.幸运的是,rticle程序包支持AMS日记.我使用RStudio生成的标准模板,在YAML标头中更改layout并使用fancyhdr重新定义页面样式:

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}'

然后我得到以下结果:

作为替代方案,您可以尝试改编APS使用的revtex LaTeX类.

As an alternative, you could try to adapt the revtex LaTeX class as used by the APS.

注意:我使用的是最新版本的pandoc,它使引用LaTeX很复杂.使用pandoc的旧版本,您可能会在没有引号的情况下逃脱.

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.

这篇关于在同一R降价页面中应用多个列划分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 02:12