From 6773447c8caf31d3fc0b9390fed79ca64c6d2195 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 26 Jun 2017 16:30:03 +0200 Subject: [PATCH] Support `--toc` in `opendocument`/`odt`. --- MANUAL.txt | 8 +- data/templates/default.opendocument | 129 ++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+), 4 deletions(-) diff --git a/MANUAL.txt b/MANUAL.txt index 96fbeb771..6499426e1 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -631,10 +631,10 @@ General writer options `--toc`, `--table-of-contents` : Include an automatically generated table of contents (or, in - the case of `latex`, `context`, `docx`, `rst`, or `ms`, - an instruction to create one) in the output document. This - option has no effect on `man`, `docbook4`, `docbook5`, `jats`, - `slidy`, `slideous`, `s5`, or `odt` output. + the case of `latex`, `context`, `docx`, `odt`, + `opendocument`, `rst`, or `ms`, an instruction to create + one) in the output document. This option has no effect on + `man`, `docbook4`, `docbook5`, or `jats` output. `--toc-depth=`*NUMBER* diff --git a/data/templates/default.opendocument b/data/templates/default.opendocument index bb01d4bbb..e0bc5c1d3 100644 --- a/data/templates/default.opendocument +++ b/data/templates/default.opendocument @@ -23,6 +23,135 @@ $endif$ $for(include-before)$ $include-before$ $endfor$ +$if(toc)$ + + + + $toc-title$ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +$endif$ $body$ $for(include-after)$ $include-after$