toc
toc — A table of contents.
Synopsis
- Sequence of:
- One of:
- Zero or more of:
annotationbridgeheadremarkrevhistory- Indexing inlines
![[+]](figs/web/nav/right.gif)
- Admonition elements
![[+]](figs/web/nav/right.gif)
- Formal elements
![[+]](figs/web/nav/right.gif)
- Graphic elements
![[+]](figs/web/nav/right.gif)
- Informal elements
![[+]](figs/web/nav/right.gif)
- List elements
![[+]](figs/web/nav/right.gif)
- Paragraph elements
![[+]](figs/web/nav/right.gif)
- Publishing elements
![[+]](figs/web/nav/right.gif)
- Synopsis elements
![[+]](figs/web/nav/right.gif)
- Technical elements
![[+]](figs/web/nav/right.gif)
- Verbatim elements
![[+]](figs/web/nav/right.gif)
- Zero or more of:
- One of:
Attributes
Additional Constraints
- If this element is the root element, it 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, tocs are usually generated
automatically by the presentation system and never have to be
represented explicitly in the document source.
Parents
Children
The following elements occur in toc: address, anchor, annotation, bibliolist, blockquote, bridgehead, calloutlist, caution, classsynopsis, cmdsynopsis, constraintdef, constructorsynopsis, destructorsynopsis, epigraph, equation, example, fieldsynopsis, figure, formalpara, funcsynopsis, glosslist, important, indexterm (db.indexterm.endofrange), indexterm (db.indexterm.singular), indexterm (db.indexterm.startofrange), info (db.titleforbidden.info), info (db.titleonly.info), informalequation, informalexample, informalfigure, informaltable (db.cals.informaltable), informaltable (db.html.informaltable), itemizedlist, literallayout, mediaobject, methodsynopsis, msgset, note, orderedlist, para, procedure, productionset, programlisting, programlistingco, qandaset, remark, revhistory, screen, screenco, screenshot, segmentedlist, sidebar, simpara, simplelist, synopsis, table (db.cals.table), table (db.html.table), task, tip, title, titleabbrev, tocdiv, tocentry, variablelist, warning.
Examples
<book xmlns='http://docbook.org/ns/docbook'>
<title>DocBook: The Definitive Guide</title>
<subtitle>TOC Markup Example</subtitle>
<toc>
<title>Table of Contents</title>
<tocdiv>
<title>Preface</title>
<tocentry>Why Read This Book?</tocentry>
<tocentry>This Book's Audience</tocentry>
<!-- ... -->
</tocdiv>
<tocdiv>
<title>Part I. Introduction</title>
<tocdiv>
<title>Chapter 1. Getting Started with DocBook</title>
<tocdiv>
<title>A Short DocBook History</title>
<tocentry>The HaL and O'Reilly era</tocentry>
<tocentry>The Davenport era</tocentry>
<tocentry>The OASIS era</tocentry>
</tocdiv>
<tocdiv>
<title>DocBook V5.0</title>
<tocdiv>
<title>What's New in DocBook V5.0?</title>
<tocentry>Renamed and removed elements</tocentry>
<!-- ... -->
</tocdiv>
</tocdiv>
</tocdiv>
<tocdiv>
<title>Chapter 2. Creating DocBook Documents</title>
<tocdiv>
<title>Making an XML Document</title>
<tocentry>An XML Declaration</tocentry>
<!-- ... -->
</tocdiv>
</tocdiv>
</tocdiv>
</toc>
<preface>
<title>Preface</title>
<para>DocBook provides a system for writing structured documents using
<acronym>XML</acronym>. …</para>
<!-- ... -->
<section>
<title>Why Read This Book?</title>
<para>This book is designed to be the clear, concise, normative reference to
the DocBook schema. This book is the official documentation for DocBook.
</para>
<!-- ... -->
</section>
</preface>
<!-- ... -->
</book>
![[x]](figs/web/nav/delete.gif)
![[-]](figs/web/nav/down.gif)