Wandmalfarbe / pandoc-latex-template

A pandoc LaTeX template to convert markdown files to PDF or LaTeX.
BSD 3-Clause "New" or "Revised" License
6.21k stars 968 forks source link

Incorrect handling of quoted list items #156

Open Benjamin-Lee opened 4 years ago

Benjamin-Lee commented 4 years ago

For example,

1. >This is a quote.
2. This is the second line.

generates:

image

Regular pandoc handles it as:

image

Hope this issue makes sense. Thanks for the great template!

daamien commented 4 years ago

Hello @Benjamin-Lee

My understanding of the markdown syntax is that the correct way to include a blockquote in a list is like this:

*   A list item with a blockquote:

    > This is a blockquote
    > inside a list item.

https://daringfireball.net/projects/markdown/syntax#list

Benjamin-Lee commented 4 years ago

I tried that and am receiving the same error with the template in which the grey bar overlaps the 1. I checked to make sure panda was properly parsing the Markdown and, regardless of whether the > is on its own line, it is still correctly catching that it is <li><blockquote>...</blockquote></li>.

cagix commented 4 years ago

what does pandoc say, i.e. what's the result of pandoc mwe.md -o mwe.pdf?

Benjamin-Lee commented 4 years ago

mwe.md:

1. >This is a quote.
2. This is the second line.
3. A list item with a blockquote:

   > This is a blockquote
   > inside a list item.

Pandoc correctly indents both blockquotes:

image

This template:

image
cagix commented 4 years ago

hmmm, pandoc converts the snippet in https://github.com/Wandmalfarbe/pandoc-latex-template/issues/156#issue-569568418 to

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\item
  \begin{quote}
  This is a quote.
  \end{quote}
\item
  This is the second line.
\end{enumerate}

which seems to be correct. so it must be an issue with the eisvogel template ...