【发布时间】:2016-09-16 00:58:43
【问题描述】:
我正在编写带有方程式的 rmarkdown pdf 文档(使用 mac、knitr、pdf-latex)。我遇到的问题是 rmarkdown 会自动在前面的文本和方程式之间创建一个 2-3 行的大空白间隙。我该如何摆脱这个差距?
下面的示例 rmarkdown 文档。
---
title: "No More Gaps"
author: "Llew Mills"
date: "16th of September 2016"
output: pdf_document
header-includes:
- \setlength{\mathindent}{0pt}
linestretch: 1.3
toc: yes
classoption: fleqn
---
Some text to illustrate the gap. I still want there to be a decent line spacing between lines of text, but I would like a much smaller gap between the equations and the preceding text.
\begingroup\Large
\begin{align*}
Y_{ij} &= \pi_{0i} + \pi_{1i}TIME_{ij} + \pi_{2i}(0) + \varepsilon_{ij}\\
&= \pi_{0i} + \pi_{1i}TIME_{ij} + \varepsilon_{ij}
\end{align*}
\endgroup
Can anyone help with this problem?
【问题讨论】:
-
你可以在
\begingroup之前使用\vspace{-.5cm} -
是的。正是我想要的。谢谢!
标签: latex knitr r-markdown