让我提醒一下,这可能更适合作为 html/css 问题,但是(a)我对这些技术不太熟悉,并且(b)如果可能的话,我想把它全部放在家庭(R 系列)中。
我想使用 Rmarkdownknitr
编写学术风格报告(APA 6 类型指南)。我已经解决了大多数方面,但没有分页。我可以手动设置分页符,例如:
# report
```{r setup, include=FALSE}
# set global chunk options
opts_chunk$set(cache=TRUE)
```
------
## Page 1
```{r plot1}
plot(1:10, 1:10)
```
------
## Page 2
在下面的 .Rmd 中,我想在 n 行/n 距离之后以编程方式设置这些中断。因此,假设在 8 英寸或 140 行之后。
# report
```{r setup, include=FALSE}
# set global chunk options
opts_chunk$set(cache=TRUE)
```
Initial Text. Yay!
```{r plot1}
plot(1:10, 1:10)
```
More Text. Outstanding. What Hadley's not calling it plyr2?
```{r plot2, fig.width=4, fig.height=4}
plot(1:10, 1:10)
```
`r paste(rep("So much text so little time!", 10000))`
如何在 n 距离后以编程方式设置分页符。这类似于如何LaTeX
将文件分成页面,所以如果一个图形占用太多空间,它将被强制到下一页。
编辑从朋友那里找到这个:http: //www.w3.org/TR/css3-page/ 可能会有所帮助。