Support --number-sections in RST output...

via the "section-numbering" directive in standalone output.
This commit is contained in:
John MacFarlane 2018-06-02 21:37:15 -07:00
parent d32e866449
commit 6ea706256d
2 changed files with 5 additions and 0 deletions

View file

@ -30,6 +30,10 @@ $if(toc)$
:depth: $toc-depth$
..
$endif$
$if(number-sections)$
.. section-numbering::
$endif$
$for(header-includes)$
$header-includes$

View file

@ -103,6 +103,7 @@ pandocToRST (Pandoc meta blocks) = do
let context = defField "body" main
$ defField "toc" (writerTableOfContents opts)
$ defField "toc-depth" (show $ writerTOCDepth opts)
$ defField "number-sections" (writerNumberSections opts)
$ defField "math" hasMath
$ defField "title" (render Nothing title :: String)
$ defField "math" hasMath