我正在使用RMarkdown文档创建MS Word报告。我已经成功使用了一个
以下是示例代码:
reference.docx
文件,其中我调整了标题、页眉、文本和图表标题的样式以满足我的需求。现在我想确保某些行、段落和图片保持在同一页上。有什么方法可以做到这一点吗?以下是示例代码:
---
title: "Test"
output:
word_document:
reference_docx: reference.docx
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
Here is some text.
### I Use This as Figure Caption Above the Figure
(Index, 2015=100, seasonally adjusted series)
![Source: World Bank](https://previews.123rf.com/images/lovjane/lovjane1610/lovjane161000009/64921112-hand-drawn-sun-with-face-and-eyes-alchemy-medieval-occult-mystic-symbol-of-sun-vector-illustration-.jpg){ width=10cm }
The last 3 lines are the ones I would like to be kept together in my MS-Word output file, i.e. Caption+(Comment)+Figure.
\newpage
或\pagebreak
将它们包装起来。 - Highland