Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a multi-level enumerated list in Pandoc Markdown

I am writing a document in Markdown. I use Pandoc 1.12.2.1 to convert *.md to *.pdf (via xelatex).

I am trying to make an enumerated list of the following type:

1. Item 1
 1.1. Sub-item 1
 1.2. Sub-item 2
2. Item 2
 2.1. Sub-item 1
 2.2. Sub-item 2

Etc. (Rather than 1., (a), i. etc.)

Question How can I change the configuration to accomplish this?

Many thanks, Tom

like image 919
Tom Avatar asked Sep 30 '22 09:09

Tom


1 Answers

I've found a temporary solution, which is just to integrate LaTeX and markdown, and to change the numbering style by redefining \labelnumi etc.

\renewcommand{\labelenumi}{\arabic{enumi}.} 
\renewcommand{\labelenumii}{\arabic{enumi}.\arabic{enumii}}
\renewcommand{\labelenumiii}{\arabic{enumi}.\arabic{enumii}.\arabic{enumii}}

#. Item 1
    #. Sub-item 1.1
    #. Sub-item 1.2
#. Item 2

Etc.

like image 90
Tom Avatar answered Oct 03 '22 04:10

Tom