13

我正在使用 pandoc 从 markdown 转换为 LaTeX。我的问题是 Pandoc 似乎将块引用之后的段落文本解释为新段落的开头。虽然这通常是我想要的,但很多时候我想继续引用前面的段落。这在 LaTeX 中很容易实现——我只需将引用环境插入段落中,而不会在引用和周围行之间留下任何空白行,如下所示:

This is the first sentence of paragraph ONE.
\begin{quote}
This is a block quote.
\end{quote}
This is the second sentence of paragraph ONE.

This is the first sentence of paragraph TWO.

但是由于 Pandoc 要求块引号后跟一个空行,所以我可以管理的唯一输出如下所示:

This is the first sentence of paragraph ONE.

\begin{quote}
This is a block quote.
\end{quote}

This is the first sentence of paragraph TWO.

This is the first sentence of paragraph THREE.

我怎样才能让 pandoc 像我的第一个例子一样输出 LaTeX?

4

1 回答 1

10

经过一番搜索,我发现了这个讨论:https ://groups.google.com/forum/#!topic/multimarkdown/iIaBLYI92K0 。

Pandoc 的降价似乎不太可能区分块引号后的连续段落和新段落。最好的解决方案似乎是使用 \noindent,如下所示:

This is the first sentence of paragraph ONE.

> This is a block quote.

\noindent This is the second sentence of paragraph ONE.

This is the first sentence of paragraph TWO.

不幸的是,这个解决方案没有将非缩进的“段落”标记为在语义上连接到第一个,所以我想 LaTeX 中的任何段落计数器仍然会在这里看到三个段落,而不是两个。

于 2013-09-14T02:33:07.943 回答