toc

toc — A table of contents.

Synopsis

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, tocs are usually generated automatically by the presentation system and never have to be represented explicitly in the document source.

Parents [+]

This element occurs in 14 elements.

Children [+]

This element contains 65 elements.

See Also

tocdiv, tocentry

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>
Last revised by Norman Walsh on 6 Jun 2011 (git hash: 6ffcc7640bbc5f852a318e452c9f210f03292cb9)