uwdata / living-papers

Authoring tools for scholarly communication. Create interactive web pages or formal research papers from markdown source.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

controlling whether new paragraph starts after list

joshuahhh opened this issue · comments

When writing in LaTeX, I'm accustomed to paying attention to whether or not a list is "inside" a paragraph. This is controlled with newlines after the list.

For example:

Here's a paragraph
\begin{enumerate}
\item with
\item a
\item list inside it.
\end{enumerate}
And the paragraph continues!

Here's another paragraph
\begin{enumerate}
\item with
\item a
\item list inside it.
\end{enumerate}

But this paragraph is new!

renders to

Screen Shot 2022-09-01 at 12 03 28 PM

This doesn't seem possible to control with Markdown. It looks like the generated LaTeX always starts a new paragraph after the list.

Maybe I'm the only person in the world who has ever paid attention to this? But I definitely notice it. It feels weird and choppy to always start a new paragraph after a list, even if the list is part of the flow of the paragraph. E.g., imagine you want a single final sentence of conclusion in the paragraph, after the list.

(Another twist: Ideally I'd want control over this for both LaTeX and HTML output, but it is apparently illegal to put ol/ul inside p tags. So I have no clue what HTML representation is best to use here.)

I don't think this is possible in Markdown, likely in part due to the corresponding HTML behavior you noted. So I don't think there will be a general solution for Living Papers either.

One annoying workaround would be to edit the generated LaTeX source. Another possibility could be to add some latex-specific directive within the Living Papers source to indicate a paragraph continuation, though this does not strike me as a high priority at this point.

Closing issue for now given no clear solution path.