jgm / pandoc

Universal markup converter
https://pandoc.org
Other
33.21k stars 3.3k forks source link

markdown block quotes with ">" get rendered as "> text" if the ">" isn't preceded by a newline. How to always turn ">" into "\begin{quote}"? #9027

Closed ReaderGuy42 closed 10 months ago

ReaderGuy42 commented 10 months ago

I just switched from pdftex to luatex and now some stuff is working differently.

In my markdown files I use quote blocks with > I'd like to always be converted to \begin{quote}

e.g. my markdown note might look like this

page number 23
> first qoute

further text

> further quote

because there's no newline before the first blockquote, LaTeX or Pandoc instead turn it into \textgreater{} which prints it as page-number 23>abc text

In this case, the pandoc command would be pandoc -r markdown-auto_identifiers -w latex test.md -o test.tex

and then this gets rendered in LaTeX as:

page number 23 \textgreater{} first qoute

further text

\begin{quote}
further quote
\end{quote}

and as PDF as: image

I was told on reddit to post this here as this isn't expected behavior.

How can I achieve always having > be converted to \begin{quote} and \end{quote} (following the block quote)?

Pandoc version?

pandoc 3.1.6.2
Features: +server +lua
Scripting engine: Lua 5.4
ReaderGuy42 commented 10 months ago

This was a misunderstanding on my part. Using markdown-blank_before_blockquote solves this. Thanks!