Tom
Tom

Reputation: 223

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

Upvotes: 6

Views: 2276

Answers (1)

Tom
Tom

Reputation: 223

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.

Upvotes: 4

Related Questions