Let's say I have this list in R Markdown:
1. lorem
1. dolor
1. ipsum
When I compile, the output will be like this:
- lorem
- dolor
- ipsum
I want it to be like this instead:
- lorem
1.1 dolor
- ipsum
The LaTeX output looks like this:
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\tightlist
\item lorem
\begin{enumerate}
\def\labelenumii{\arabic{enumii}.}
\tightlist
\item dolor
\end{enumerate}
\item ipsum
\end{enumerate}
I want it to be like this instead:
\begin{enumerate}
\tightlist
\item lorem
\begin{enumerate}
\tightlist
\item dolor
\end{enumerate}
\item ipsum
\end{enumerate}
In other words, I need it to stop adding \def\labelenumii{\arabic{enumii}.}.
cderv
2
Unfortunately, I don't think this type of list are supported yet by Pandoc which is used for conversion
For now you would need to leverage the fancy_list extension of pandoc which is activated by default
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
Thanks that's exactly what I needed. #. does exactly what I want. As for the decimal nested list, it's easy. All you have to do is this:
\usepackage{enumitem}
\renewcommand{\labelenumii}{\arabic{enumi}.\arabic{enumii}.}