``` % pandoc -f markdown -t html --number-sections ## First section ### Subhead ##### Subhead with gap ## Second section ^D

1 First section

1.1 Subhead

1.1.0.1 Subhead with gap

2 Second section

``` ``` % pandoc -f markdown -t html --number-sections ## First section ### Subhead # Higher-level section ## Sub ^D

0.1 First section

0.1.1 Subhead

1 Higher-level section

1.1 Sub

``` For backwards compatibility, we want it to work the old way, giving numbers like 0.1, when `--number-offset` is used: ``` % pandoc -f markdown -t html --number-sections --number-offset=2,2,2 ## First section ### Subhead ^D

2.3 First section

2.3.3 Subhead

``` ``` % pandoc -f markdown -t html --number-sections --number-offset=0,2,2 ## First section ### Subhead ^D

0.3 First section

0.3.3 Subhead

```