我想主要将.Rmd文件导出为latex pdf.
这是我目前正在使用的代码
```{r ,fig.cap="caption",fig.env='figure', fig.width=10, fig.height=10,echo=FALSE, results='asis', warning=FALSE, strip.white=TRUE}
library(png)
library(grid)
img <- readPNG("filepath/overview.png")
grid.raster(img)
```
Run Code Online (Sandbox Code Playgroud)
正如你所看到的,我已经在使用strip.white=TRUE&fig.env='figure'但它们似乎不起作用..PNG文件在图像上方或下方没有任何(白色)间距.
我知道我可以直接使用乳胶并实现我想要的,但我希望能够在Word中重现这一点,如果需要的话.同样在Word中,图像上方和下方有半页空白空间.
任何帮助将不胜感激.谢谢
当我使用 #### 作为第 4 级标题时,pdf(latex) 中的输出在段落开始之前不会留下行距。例如,
#### Heading 4
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
when an unknown printer took a galley of type and scrambled it to make a type
specimen book.
Run Code Online (Sandbox Code Playgroud)
仅在 pdf(latex) 中的输出看起来像这样
Heading 4 Lorem Ipsum 只是印刷和排版行业的虚拟文本。自 1500 年代以来,Lorem Ipsum 一直是行业标准的虚拟文本,当时一位不知名的印刷商使用了一个类型的厨房并争先恐后地制作了一本类型样本书。
我到处都读到 r markdown 允许标题使用 1-6 个 #,所以我想弄清楚我在这里做错了什么。
另外我想我可以使用 \subsubsubsubsection 而不是 #### 作为标题,但这给了我一个错误。