edemaine / coauthor

Coauthor supercollaboration/discussion forum
MIT License
246 stars 32 forks source link

LaTeX lists have bad paragraph structure #544

Open edemaine opened 3 years ago

edemaine commented 3 years ago

LaTeX lists (\begin/\end {itemize}/{enumerate}) do not generate a paragraph for the first paragraph of a multiparagraph \item. This causes bad formatting; in particular, the first paragraph gets fully justified on the last line.

\begin{itemize}
\item Not a paragraph
\item Also not a paragraph

A paragraph
\end{itemize}

In markdown format, this input converts to the following:

<ul>
<li>Not a paragraph
</li><li>Also not a paragraph<p></p>
<p>A paragraph
</p></li></ul>

In latex format, this input converts to the following:

<ul>
<li>Not a paragraph
</li><li>Also not a paragraph
<p>A paragraph
</p></li></ul>

This renders as:

image

(In Markdown format at least there's a vertical space between "Also not a paragraph" and "A paragraph".)

Ideally, to match Markdown, multiparagraph \items should have paragraph tags for every paragraph, including the first, while single-paragraph \items should stay as they are.