cderv
June 2, 2022, 9:23am
2
Unfortunately, I don't think this type of list are supported yet by Pandoc which is used for conversion
opened 08:57PM - 15 Sep 14 UTC
enhancement
format:Markdown
reader
This is a request for a markdown extension. I don't believe this is supported in… any other implementation or in CommonMark. However, it seems to make common sense and I believe it is unambiguous. I would like markdown to accept nested decimal lists, like so:
```
1. First item
2. Second Item
2.1. sub-item
2.2. sub-item
```
Right now pandoc doesn't recognize any of the sub-items as list elements.
This would allow nested decimal lists to be readable in both the markdown and the final document. The format of the nested list in the final document would depend on the HTML/LaTeX/etc formatting options, of course, which would only use decimal numbered lists if specified. Pandoc would only need to recognize this as an ordered list, with structure delineated by indentation.
Of course, it is possible to _create_ such lists in markdown now, simply by omitting decimal formatting or using '#.', relying only on indentation to create list structure. However, this makes the markdown LESS readable - one can not easily see the full sub-section identifier in the markdown.
For now you would need to leverage the fancy_list
extension of pandoc which is activated by default
https://pandoc.org/MANUAL.html#extension-fancy_lists
and use #.
as list marker so that you get the default numbering of your format.
#. lorem
#. dolor
#. ipsum
will produce
\begin{enumerate}
\tightlist
\item
lorem
\begin{enumerate}
\tightlist
\item
dolor
\end{enumerate}
\item
ipsum
\end{enumerate}
You can also mixed them as explained in https://pandoc.org/MANUAL.html#extension-startnum
1. lorem
#. dolor
1. ipsum
you could probably change the default numebring for your list using a header preamble for you latex document using header-includes
Hope it helps
1 Like