commonmark / cmark

CommonMark parsing and rendering library and program in C
Other
1.6k stars 534 forks source link

Latex export does not set the enumi counter correctly #451

Closed johannesneyer closed 1 year ago

johannesneyer commented 1 year ago

Exporting this:

# a
1. b
2. c
# d
3. e
4. f

to latex results in this:

\section{a}

\begin{enumerate}
\item b

\item c

\end{enumerate}

\section{d}

\begin{enumerate}
\setcounter{enumi}{3}
\item e

\item f

\end{enumerate}

which when wrapped such that it compiles:

\documentclass{article}
\begin{document}
% output from above
\end{document}

turns into this: image

The latex export should say \setcounter{enumi}{2} instead of \setcounter{enumi}{3}

johannesneyer commented 1 year ago

awesome thanks