This is an example of a complex document. To see the Org syntax, view the raw version of this file.
This heading itself is excluded from its TOC.
- Document top-level heading
This chapter includes its TOC inline, with text before…
…and after it.
This section is included in the chapter’s TOC.
This subsection is also included.
This section is not included in the chapter’s TOC, but its subsection is (you probably wouldn’t want to do this, but you could).
This subsection is included in the chapter’s TOC even though its parent is excluded.
This chapter has its TOC as a sibling of its sections.
This section is included.
This subsection is included.
This section is included in the TOC.
But its subsection is not.
This chapter has its TOC as a parent of the chapter sections.
This section is included.
This subsection is included.
This section is included.
This subsection is included.
This chapter’s TOC uses :depth 1
to exclude subsections.
This section is included in the chapter’s TOC.
This subsection is excluded.
This section is included in the chapter’s TOC.
This subsection is excluded.
This chapter’s TOC includes descendants only two levels deep by default. However, Section 5b sets :depth 3
(relative to itself) in order to include deeper descendants in its own section TOC. Normally this depth setting would propagate up to the Chapter 5 TOC and cause, e.g. Section 5b1a to be included in the Chapter 5 TOC. However, Section 5b also sets :local depth
, which prevents its depth setting from propagating up the tree, so the sections 5b1a and 5b1b are excluded from the Chapter 5 TOC.
One could also set :force depth
in the chapter 5 TOC to accomplish the same thing. However, doing so would force the depth setting for all subtrees in its TOC. Instead, by using :local depth
on Section 5b, we allow Section 5c to set :depth 3
, which is allowed to propagate up to the chapter 5 TOC. So notice that, although Sections 5b and 5c are structurally identical, the way they are shown in the Chapter 5 TOC differs, because Section 5b sets :local depth
while Section 5c does not.
If this seems complicated, perhaps it is, but it’s optional power that’s available when needed.
This section is included in the Chapter 5 TOC.
This section is included in the Chapter 5 TOC.
This section is included in the Chapter 5 TOC.
This section is included in the Chapter 5 TOC.
This section is not included in the Chapter 5 TOC.
This section is not included in the Chapter 5 TOC.
This section is included in the Chapter 5 TOC.
This section is included in the Chapter 5 TOC.
This section is included in the Chapter 5 TOC.
The appendices have a local TOC, and one of them is a comprehensive TOC of the entire document (unlike the main TOC at the top of the document, which is abridged).
This comprehensive TOC uses :include all :force (depth ignore)
to force all headings to be included, regardless of their local settings.
- Document top-level heading
Possibly vestigial.
Definitely vestigial.