toc
toc — A table of contents.
Synopsis
- Sequence of:
- One of:
- Zero or more of:
annotation
bridgehead
remark
revhistory
- Indexing inlines
- Admonition elements
- Formal elements
- Graphic elements
- Informal elements
informalequation
informalexample
informalfigure
informaltable
(db.cals.informaltable)informaltable
(db.html.informaltable)
- List elements
- Paragraph elements
- Publishing elements
- Synopsis elements
- Technical elements
- Verbatim elements
- Zero or more of:
- One of:
Attributes
Additional Constraints
- The root element must have a version attribute.
Description
The toc
element defines a table of contents, or
more generally, a list of titles in a document.
Processing expectations
Formatted as a displayed block.
In real life, toc
s are usually generated
automatically by the presentation system and never have to be
represented explicitly in the document source.
This element occurs in 14 elements.
This element contains 65 elements.
Examples
1 <book xmlns='http://docbook.org/ns/docbook'> 2 <title>DocBook: The Definitive Guide</title> <subtitle>TOC Markup Example</subtitle> 4 <toc> 6 <title>Table of Contents</title> <tocdiv> 8 <title>Preface</title> <tocentry>Why Read This Book?</tocentry> 10 <tocentry>This Book's Audience</tocentry> <!-- ... --> 12 </tocdiv> <tocdiv> 14 <title>Part I. Introduction</title> <tocdiv> 16 <title>Chapter 1. Getting Started with DocBook</title> <tocdiv> 18 <title>A Short DocBook History</title> <tocentry>The HaL and O'Reilly era</tocentry> 20 <tocentry>The Davenport era</tocentry> <tocentry>The OASIS era</tocentry> 22 </tocdiv> <tocdiv> 24 <title>DocBook V5.0</title> <tocdiv> 26 <title>What's New in DocBook V5.0?</title> <tocentry>Renamed and removed elements</tocentry> 28 <!-- ... --> </tocdiv> 30 </tocdiv> </tocdiv> 32 <tocdiv> <title>Chapter 2. Creating DocBook Documents</title> 34 <tocdiv> <title>Making an XML Document</title> 36 <tocentry>An XML Declaration</tocentry> <!-- ... --> 38 </tocdiv> </tocdiv> 40 </tocdiv> </toc> 42 <preface> 44 <title>Preface</title> <para>DocBook provides a system for writing structured documents using 46 <acronym>XML</acronym>. …</para> 48 <!-- ... --> 50 <section> <title>Why Read This Book?</title> 52 <para>This book is designed to be the clear, concise, normative reference to 54 the DocBook schema. This book is the official documentation for DocBook. </para> 56 <!-- ... --> 58 </section> </preface> 60 <!-- ... --> 62 </book>