1

Markdown will help auto-enumerating the number, for example if I type

1. this is one
   1. this is inner1
   1. this is inner2
1. this is two

It will be shown as

  1. this is one
    1. this is inner1
    2. this is inner2
  2. this is two

Now is it possible to make subsections 1.1, 1.2 etc. using auto-enumerating feature of markdown as follows?

  1. this is one

    1.1 this is inner1

    1.2 this is inner2

  2. this is two
william007
  • 17,375
  • 25
  • 118
  • 194
  • 1
    Markdown is a subset of HTML and this is not possible with HTML alone. Therefore, it is not possible with Markdown alone. You would need some custom CSS and/or JavaScript to accomplish this, which is covered in the answers to [HTML / CSS autonumber headings?](https://stackoverflow.com/q/535334/866026) and [How to add section numbers (1.2, 3.4.1) automatically using CSS?](https://stackoverflow.com/q/10340276/866026). – Waylan Jun 04 '20 at 17:41
  • The questions I previously linked to discuss numbering headings, while this is discussing lists (which is why I didn't flag it as a duplicate). You can find a good example for lists in the MDN web docs under [Using CSS counters > Nesting counters](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Lists_and_Counters/Using_CSS_counters#Nesting_counters). – Waylan Jun 04 '20 at 17:51

1 Answers1

1

This is possible with RMarkdown through a config setting:

Automatically number sections in RMarkdown

It looks like you may not be able to with vanilla Markdown, but there are tools to help:

Are numbered headings in Markdown / Rdiscount possible?