经管之家送您一份
应届毕业生专属福利!
求职就业群
感谢您参与论坛问题回答
经管之家送您两个论坛币!
+2 论坛币
写论文要插入很多图表,刚刚学习Rmarkdown,千辛万苦调试出来了PDF及汉字显示。但标题、目录及摘要、正文之间都没有分页,百度了一下,说是在RMD文件中插入 <div STYLE="page-break-after: always;"></div> 就可以分页,没有实验成功。
请教做过的老师指导一下,如何在Rmarkdown导出PDF时,插入分页符?谢谢!!!
这是我的PDF实验文件。
---
title: "一个PDF实验"
author: "先生"
date: "2021/12/16"
documentclass: ctexart
geometry: "left=2.5cm,right=2cm,top=3cm,bottom=2.5cm"
output:
pdf_document:
toc: yes #目录
latex_engine: xelatex
indent: true #首行缩进
#header-includes:
#- \usepackage{pdfpages}
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
<div STYLE="page-break-after: always;"></div>
# 这是一个实验
## R Markdown
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
这是一个表格。
```{r cars}
summary(cars)
```
## Including Plots
You can also embed plots, for example:
```{r pressure, echo=FALSE}
plot(pressure)
```
Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
|