Pandoc增加了额外的段落

时间:2014-09-20 18:41:43

标签: latex markdown pandoc

我使用pandoc将Markdown转换为Latex。我的问题是pandoc在开始/结束环境中添加了额外的段落中断。

来源:

**First** phrase in a paragraph.
\begin{multline*}
some long formulae
\end{multline*}
Second phrase in a paragraph.

执行pandoc my.md -o my.tex会产生:

\textbf{First} phrase in a paragraph.

\begin{multline*}
some long formulae
\end{multline*}

Second phrase in a paragraph.

显然,这是不恰当的行为,因为当在multline周围看到额外的空白行时,乳胶在生成的PDF中放置了额外的垂直空间。

有没有办法在pandoc的.tex输出中抑制额外的空白行?

2 个答案:

答案 0 :(得分:3)

Proper vertical multline

修饰:

**First** phrase in a paragraph.
\empty{
\begin{multline*}
some long formulae
\end{multline*}
}
Second phrase in a paragraph.

解析

\textbf{First} phrase in a paragraph. \empty{
\begin{multline*}
some long formulae
\end{multline*}
} Second phrase in a paragraph.

答案 1 :(得分:1)

怎么样:

**First** phrase in a paragraph. \begin{multline*}
some long formulae
\end{multline*} Second phrase in a paragraph.
带有上述输入的

pandoc -t latex和pandoc 2.2.1给出:

\textbf{First} phrase in a paragraph. \begin{multline*}
some long formulae
\end{multline*} Second phrase in a paragraph.