我正在使用knitr + Rmarkdown创建PDF文档。我在yaml文件头中设置了
。下面是创建上述文档的Rmd代码:
geometry: margin=0.1in
,该边距应用于文档正文,但是标题与文档顶部还有正文之间的距离很远。下面是截图:![enter image description here](https://istack.dev59.com/eRMAc.webp)
---
title: "test"
output:
pdf_document:
latex_engine: xelatex
geometry: margin=0.1in
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
a bunch of text to demonstrate that the margin applies only to the body text of
this document, while the title (above) remains quite far from the top of the
document, and this is messing up my plan to make a document that's only one page
in length
我需要将此文档长度限制在一页内。标题的较大空白导致了问题。如何缩小标题、文档顶部和正文之间的空白?
注:由于某些原因,我只能在此处使用xelatex latex引擎。
vspace
呼叫需要在引号内并带有额外的转义斜杠,例如"\\vspace{-1.5cm} test"。
- DHW