Home | 簡體中文 | 繁體中文 | 雜文 | 知乎專欄 | Github | OSChina 博客 | 雲社區 | 雲棲社區 | Facebook | Linkedin | 視頻教程 | 打賞(Donations) | About
知乎專欄多維度架構 | 微信號 netkiller-ebook | QQ群:128659835 請註明“讀者”

6.2. toc 自定義目錄

	
	
<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>