diff options
| author | John MacFarlane <[email protected]> | 2024-09-07 20:29:04 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2024-09-08 08:29:23 -0700 |
| commit | e589dd62d77d3eb79fcd9428e69c6979c66e733f (patch) | |
| tree | 193a5c2db4a628a08db35459b9ce1e7682850247 | |
| parent | bdcbb67168ce67d341f2ee0f9dfad1330735de48 (diff) | |
Docx writer: Support `--number-offsets`.
| -rw-r--r-- | MANUAL.txt | 2 | ||||
| -rw-r--r-- | src/Text/Pandoc/Writers/Docx.hs | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/MANUAL.txt b/MANUAL.txt index 865fa8cb1..a17ce00ae 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -1117,7 +1117,7 @@ header when requesting a document from a URL: `--number-offset` only directly affects the number of the first section heading in a document; subsequent numbers increment in the normal way. Implies `--number-sections`. - Currently this feature only affects HTML output. + Currently this feature only affects HTML and Docx output. `--listings[=true|false]` diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index ec1c682af..d20142e7f 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -94,7 +94,8 @@ writeDocx :: (PandocMonad m) writeDocx opts doc = do let Pandoc meta blocks = walk fixDisplayMath doc setupTranslations meta - let blocks' = makeSections True Nothing blocks + let blocks' = makeSectionsWithOffsets (writerNumberOffset opts) + True Nothing blocks let doc' = Pandoc meta blocks' username <- P.lookupEnv "USERNAME" |
