git.iko.soy/typeable/pandoc
on master help sign in
Support `--toc` in `opendocument`/`odt`.
commit6773447c8caf31d3fc0b9390fed79ca64c6d2195 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 26 Jun 2017, 16:30 (9 years ago) parent75f4e41
2 files changed+133−4
MANUAL.txt+4−4 data/templates/default.opendocument+129
MANUAL.txt+4−4
@@ -631,10 +631,10 @@ General writer options
631631`--toc`, `--table-of-contents`
632632
633633: Include an automatically generated table of contents (or, in
634− the case of `latex`, `context`, `docx`, `rst`, or `ms`,
635− an instruction to create one) in the output document. This
636− option has no effect on `man`, `docbook4`, `docbook5`, `jats`,
637− `slidy`, `slideous`, `s5`, or `odt` output.
634+ the case of `latex`, `context`, `docx`, `odt`,
635+ `opendocument`, `rst`, or `ms`, an instruction to create
636+ one) in the output document. This option has no effect on
637+ `man`, `docbook4`, `docbook5`, or `jats` output.
638638
639639`--toc-depth=`*NUMBER*
640640
data/templates/default.opendocument+129
@@ -23,6 +23,135 @@ $endif$
2323$for(include-before)$
2424$include-before$
2525$endfor$
26+$if(toc)$
27+<text:table-of-content>
28+ <text:table-of-content-source text:outline-level="10">
29+ <text:index-title-template text:style-name="Contents_20_Heading">
30+ $toc-title$
31+ </text:index-title-template>
32+ <text:table-of-content-entry-template text:outline-level="1"
33+ text:style-name="Contents_20_1">
34+ <text:index-entry-link-start text:style-name="Internet_20_link" />
35+ <text:index-entry-chapter />
36+ <text:index-entry-text />
37+ <text:index-entry-link-end />
38+ <text:index-entry-tab-stop style:type="right"
39+ style:leader-char="." />
40+ <text:index-entry-link-start text:style-name="Internet_20_link" />
41+ <text:index-entry-page-number />
42+ <text:index-entry-link-end />
43+ </text:table-of-content-entry-template>
44+ <text:table-of-content-entry-template text:outline-level="2"
45+ text:style-name="Contents_20_2">
46+ <text:index-entry-link-start text:style-name="Internet_20_link" />
47+ <text:index-entry-chapter />
48+ <text:index-entry-text />
49+ <text:index-entry-link-end />
50+ <text:index-entry-tab-stop style:type="right"
51+ style:leader-char="." />
52+ <text:index-entry-link-start text:style-name="Internet_20_link" />
53+ <text:index-entry-page-number />
54+ <text:index-entry-link-end />
55+ </text:table-of-content-entry-template>
56+ <text:table-of-content-entry-template text:outline-level="3"
57+ text:style-name="Contents_20_3">
58+ <text:index-entry-link-start text:style-name="Internet_20_link" />
59+ <text:index-entry-chapter />
60+ <text:index-entry-text />
61+ <text:index-entry-link-end />
62+ <text:index-entry-tab-stop style:type="right"
63+ style:leader-char="." />
64+ <text:index-entry-link-start text:style-name="Internet_20_link" />
65+ <text:index-entry-page-number />
66+ <text:index-entry-link-end />
67+ </text:table-of-content-entry-template>
68+ <text:table-of-content-entry-template text:outline-level="4"
69+ text:style-name="Contents_20_4">
70+ <text:index-entry-link-start text:style-name="Internet_20_link" />
71+ <text:index-entry-chapter />
72+ <text:index-entry-text />
73+ <text:index-entry-link-end />
74+ <text:index-entry-tab-stop style:type="right"
75+ style:leader-char="." />
76+ <text:index-entry-link-start text:style-name="Internet_20_link" />
77+ <text:index-entry-page-number />
78+ <text:index-entry-link-end />
79+ </text:table-of-content-entry-template>
80+ <text:table-of-content-entry-template text:outline-level="5"
81+ text:style-name="Contents_20_5">
82+ <text:index-entry-link-start text:style-name="Internet_20_link" />
83+ <text:index-entry-chapter />
84+ <text:index-entry-text />
85+ <text:index-entry-link-end />
86+ <text:index-entry-tab-stop style:type="right"
87+ style:leader-char="." />
88+ <text:index-entry-link-start text:style-name="Internet_20_link" />
89+ <text:index-entry-page-number />
90+ <text:index-entry-link-end />
91+ </text:table-of-content-entry-template>
92+ <text:table-of-content-entry-template text:outline-level="6"
93+ text:style-name="Contents_20_6">
94+ <text:index-entry-link-start text:style-name="Internet_20_link" />
95+ <text:index-entry-chapter />
96+ <text:index-entry-text />
97+ <text:index-entry-link-end />
98+ <text:index-entry-tab-stop style:type="right"
99+ style:leader-char="." />
100+ <text:index-entry-link-start text:style-name="Internet_20_link" />
101+ <text:index-entry-page-number />
102+ <text:index-entry-link-end />
103+ </text:table-of-content-entry-template>
104+ <text:table-of-content-entry-template text:outline-level="7"
105+ text:style-name="Contents_20_7">
106+ <text:index-entry-link-start text:style-name="Internet_20_link" />
107+ <text:index-entry-chapter />
108+ <text:index-entry-text />
109+ <text:index-entry-link-end />
110+ <text:index-entry-tab-stop style:type="right"
111+ style:leader-char="." />
112+ <text:index-entry-link-start text:style-name="Internet_20_link" />
113+ <text:index-entry-page-number />
114+ <text:index-entry-link-end />
115+ </text:table-of-content-entry-template>
116+ <text:table-of-content-entry-template text:outline-level="8"
117+ text:style-name="Contents_20_8">
118+ <text:index-entry-link-start text:style-name="Internet_20_link" />
119+ <text:index-entry-chapter />
120+ <text:index-entry-text />
121+ <text:index-entry-link-end />
122+ <text:index-entry-tab-stop style:type="right"
123+ style:leader-char="." />
124+ <text:index-entry-link-start text:style-name="Internet_20_link" />
125+ <text:index-entry-page-number />
126+ <text:index-entry-link-end />
127+ </text:table-of-content-entry-template>
128+ <text:table-of-content-entry-template text:outline-level="9"
129+ text:style-name="Contents_20_9">
130+ <text:index-entry-link-start text:style-name="Internet_20_link" />
131+ <text:index-entry-chapter />
132+ <text:index-entry-text />
133+ <text:index-entry-link-end />
134+ <text:index-entry-tab-stop style:type="right"
135+ style:leader-char="." />
136+ <text:index-entry-link-start text:style-name="Internet_20_link" />
137+ <text:index-entry-page-number />
138+ <text:index-entry-link-end />
139+ </text:table-of-content-entry-template>
140+ <text:table-of-content-entry-template text:outline-level="10"
141+ text:style-name="Contents_20_10">
142+ <text:index-entry-link-start text:style-name="Internet_20_link" />
143+ <text:index-entry-chapter />
144+ <text:index-entry-text />
145+ <text:index-entry-link-end />
146+ <text:index-entry-tab-stop style:type="right"
147+ style:leader-char="." />
148+ <text:index-entry-link-start text:style-name="Internet_20_link" />
149+ <text:index-entry-page-number />
150+ <text:index-entry-link-end />
151+ </text:table-of-content-entry-template>
152+ </text:table-of-content-source>
153+</text:table-of-content>
154+$endif$
26155$body$
27156$for(include-after)$
28157$include-after$