latex - 如何使用 Pandoc 在段落中插入 block 引用?

标签 latex markdown pandoc

关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。












想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。

7年前关闭。



Improve this question




我正在使用 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?

最佳答案

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

Pandoc 的 markdown 似乎不太可能区分块引用后的连续段落和新段落。最好的解决方案似乎使用\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 中的任何段落计数器仍然会在这里看到三个段落,而不是两个。

关于latex - 如何使用 Pandoc 在段落中插入 block 引用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18719648/

相关文章:

css - R markdown ioslides - 使用 CSS 更改 kable 字体大小

r - 如何在 RMarkdown 文档中添加空格?

reactjs - 从路径显示 Markdown 文件与 typescript react

latex - Pandoc:多个脚注彼此相邻?

fonts - latex:公式中统一字体大小(给定大小的字体),与公式内容无关

Latex 段落间距和页边距

latex IEEE 模板 : Use single column table in multicolumn latex content

latex - 如何减小插入 PDF 中图片的大小(以 MB 为单位)?

html - 使用 pandoc 制作涵盖几个单独输入文件的主目录

docx - pandoc mmd_title_block 似乎无法加载