Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I insert a block quote within a paragraph using Pandoc? [closed]

I am using pandoc to convert from markdown to LaTeX. My problem is that Pandoc seems to interpret paragraph text following a block quote as the start of a new paragraph. While this is often what I want, there are many times that I want to continue the paragraph preceeding the quote. This is achieved easily enough in LaTeX---I simply insert the quote environment into the paragraph without leaving any blank lines between the quote and the surrounding lines, like this:

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.

But since Pandoc requires block quotes be followed by a blank line, the only output I can manage looks like this:

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.

How can I get pandoc to output LaTeX like my first example?

like image 712
user2764840 Avatar asked Sep 10 '13 12:09

user2764840


1 Answers

After some searching I have found this discussion: https://groups.google.com/forum/#!topic/multimarkdown/iIaBLYI92K0.

It seems unlikely that Pandoc's markdown is capable of distinguishing between continued and new paragraphs following block quotes. The best solution seems to use \noindent, like so:

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.

Unfortunately, this solution does not mark the non-indented 'paragraph' as semantically joined to the first, so I imagine that any paragraph counter in LaTeX will still see three paragraphs here, not two.

like image 155
user2764840 Avatar answered Sep 27 '22 23:09

user2764840