<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
 [ <!ENTITY DB "DocBook">
 ]
>
<article>
  <articleinfo>
    <title>Writing documentation with &DB;-XML 4.3</title>
    <subtitle>A documentation system for print and Web</subtitle>
    <titleabbrev>&DB;-XML 4.3</titleabbrev>
    <authorgroup>
      <author>
        <firstname>John</firstname>
        <surname>Shipman</surname>
      </author>
    </authorgroup>
    <address><email>john@nmt.edu</email>
    </address>
    <revhistory>
      <revision>
        <revnumber>$Revision: 1.11 $</revnumber>
        <date>$Date: 2006/08/12 23:36:24 $</date>
      </revision>
    </revhistory>
  </articleinfo>
  <section id='advantages-section'>
    <title>Advantages of &DB;</title>
    <simpara>
      The &DB; system has these advantages over other methods
      of creating documentation:
    </simpara>
    <itemizedlist spacing="compact">
      <listitem>
        <simpara>
          The same document can be translated mechanically to
          both Web-based and printable
          formats.
        </simpara>
      </listitem>
      <listitem>
        <simpara>
          You as an author can concentrate on the content
          of your document, without worrying about how it will
          appear.
        </simpara>
      </listitem>
    </itemizedlist>
    <simpara>
      The Tech Computer Center supplies a locally-customized
      installation of the &DB; translation software for output to
      PDF or Web form.  You can use our installation, or install and
      customize &DB; yourself (see the
      <ulink url="http://docbook.sourceforge.net/projects/xsl/"
      >&DB; Modular Style Sheets web site</ulink>).
    </simpara>
    <simpara>However, this mechanical translation to various
    formats can be improved and tuned independently of the
    writing process.  These improvements do not at all affect the
    &DB; files you write.
    </simpara>
    <note>
      <simpara>
        This document assumes you are using &DB;-XML revision
        4.3.  If your document was done under the SGML versions,
        see <xref linkend='convert-3-0-section'/> and <xref
        linkend='convert-4-1-section'/> below.
      </simpara>
    </note>
    <section id='this-avail'>
      <title>How to get this publication</title>
      <para>
        This publication is available in <ulink
        url="http://www.nmt.edu/tcc/help/pubs/docbook43/">Web
        form</ulink> and also as a <ulink
        url="http://www.nmt.edu/tcc/help/pubs/docbook43/docbook43.pdf">PDF
        document</ulink>.  Please forward any comments to
        <code >tcc-doc@nmt.edu</code >.
      </para>
    </section> <!--this-avail-->
  </section> <!--advantages-section-->
  <section id='setup-section'>
    <title>Setting up your directory for &DB;</title>
    <para>
      The &DB; software runs only under the Linux operating
      system.  Also, the process of document creation is much,
      <emphasis>much</emphasis> easier with a validating XML
      editor.  For an <application >emacs</application >-based
      validating XML editor, see <ulink
      url='http://www.nmt.edu/tcc/help/pubs/nxml/' ><citetitle
      >XML document authoring with <application
      >emacs</application > <code >nxml-mode</code
      ></citetitle ></ulink >.  If all else fails, you can always
      use a regular text editor, but you will have to type every
      character of every tag yourself.
    </para>
    <para>
      The <application>make</application> system is a great
      timesaver in carrying out the steps of the &DB; document
      development cycle.  Refer to the <code>man</code>
      page for <application>make</application> if you are not
      familiar with this product.
    </para>
    <para>
      Here is the procedure for setting up your directory:
    </para>
    <procedure>
      <step>
        <para>
          Create the directory with <userinput>mkdir</userinput>
          if it does not already exist.
        </para>
      </step>
      <step>
        <para>
          Use the <userinput>cd</userinput> command to move to
          the directory.
        </para>
      </step>
      <step>
        <para>
          Copy this &ldquo;tarball&rdquo; archive into
          the directory:
          <screen>cp /u/www/docs/tcc/doc/docbook43/tcc.tgz .</screen>
        </para>
      </step>
      <step>
        <para>
          Unpack it with this shell command:
        </para>
        <screen>tar -xvzf tcc.tgz</screen>
        <para>
          This adds three necessary files to your directory:
        </para>
        <itemizedlist spacing="compact">
          <listitem>
            <para>
              <filename>Makefile</filename> operates the
              <code>make</code> utility to rebuild your
              output HTML, PostScript, and PDF
              files.
            </para>
          </listitem>
          <listitem>
            <para>
              <filename>model</filename> is a skeletal &DB; XML
              file to serve as the initial contents of your &DB;
              document file.
            </para>
          </listitem>
          <listitem>
            <para>
              <filename>logo.gif</filename> is the TCC logo in
              GIF format, which appears on the top right corner
              of all TCC publications.  Feel free to replace this
              with your own image if you're not writing an
              Official TCC Document.
            </para>
          </listitem>
        </itemizedlist>
      </step>
      <step>
        <para>
          Edit the <filename>Makefile</filename>.  Find the
          line that looks like this:
          <screen
>TARGET = your-document-base-name-here</screen> and replace the
          part after the <code>=</code> with the name
          of the file you will be creating, without its
          <filename>.xml</filename> suffix.  For example, if
          you are writing a manual on stunting trees, you might
          name the source file <filename>bonsai.xml</filename>.
          In that case, you would replace the line above
          with:
        </para>
        <screen>TARGET   =  bonsai</screen>
      </step>
      <step>
        <para>
          Rename the <filename >model</filename > file as your
          starting XML file.  To continue the previous example:
          <screen>mv model bonsai.xml</screen>
        </para>
      </step>
    </procedure>
  </section> <!--setup-section-->
  <section id='create-section'>
    <title>Creating and translating your document</title>
    <section id='what-is-it'>
      <title>What is &DB; and how does it relate to XML?</title>
      <para>
        &DB; is a document type derived from an ISO standard
        called XML (eXtensible Markup Language). (HTML, used to
        write World Wide Web pages, is also a markup language,
        and XML is similar in syntax.)  All XML document types
        use the idea of <firstterm>tags</firstterm> to structure
        a document.
      </para>
      <para>
        A tag always starts with &lt; and ends with &gt;.  Most
        tags are used in pairs.  The <firstterm>start
        tag</firstterm> has the form
        <screen>&lt;<replaceable>tag-name options</replaceable
        >&gt;</screen> and the end tag has the form
        <screen>&lt;/<replaceable>tag-name</replaceable
        >&gt;</screen> where the
        <replaceable>tag-name</replaceable> is some name that
        describes what the tag does.  Some tags may also have
        <replaceable>options</replaceable> that change the way
        the tag works; some tags have no options.
      </para>
      <para>
        For example, major sections of a document are always
        enclosed between <sgmltag
        class="starttag">section</sgmltag> and <sgmltag
        class="endtag">section</sgmltag> tags.
      </para>
      <para>
        Some tags are called &ldquo;empty&rdquo; because they are
        used by themselves, not in pairs.  Empty tags must have a
        forward slash (/) after the tag name.  For example, the
        <sgmltag class="starttag">colspec/</sgmltag> gives
        information on a table column (See Section 10).  There is
        no such thing as a <sgmltag
        class="endtag">colspec</sgmltag> ending tag.
      </para>
    </section> <!--what-is-it-->
    <section id='workflow'>
      <title>The &DB; workflow cycle</title>
      <para>
        Here is the basic workflow for the creation and
        maintenance of a document using &DB;.
      </para>
      <procedure>
        <step>
          <para>
            Use a validating XML editor or other editor to add
            the content of your document to the XML file.
          </para>
        </step>
        <step>
          <para>
            Follow the directions given in comments in the
            skeleton file.  You will need to fill in the
            document's overall title, information on who you (the
            author) are, and so on.
          </para>
        </step>
        <step>
          <para>
            Once the model is filled in, add the title of the
            first section where indicated, and begin writing the
            body of the document.  The writing process mainly
            proceeds by:
            <itemizedlist spacing="compact">
              <listitem>
                <para>
                  Adding XML <firstterm>tags</firstterm> that
                  describe the structure of the document.
                </para>
              </listitem>
              <listitem>
                <para>
                  Placing the content of the document inside these
                  tags.
                </para>
              </listitem>
            </itemizedlist>
          </para>
        </step>
        <step>
          <para>
            To render it into Web form as a group of HTML files, use:
            <screen>make web</screen>
          </para>
          <para>
            To translate your document into one of the final
            forms, use the <application>make</application>
            utility, which is driven by the
            <filename>Makefile</filename> you prepared above in
            <xref linkend="setup-section"/>.
          </para>
          <para>
            To render into print form using PDF (Adobe Page
            Description Format) file, use the Unix command:
            <screen>make pdf</screen>
          </para>
          <para>
            Or just type a <userinput>make</userinput> command by
            itself with no arguments to build both:
            <screen>make</screen>
          </para>
        </step>
      </procedure>
    </section> <!--workflow-->
  </section> <!--create-section-->
  <section id='sectioning'>
    <title>Overall section structure</title>
    <para>
      Here is the <filename >model</filename > file discussed
      in <xref linkend='setup-section'/>:
    </para>
    <programlisting
><![CDATA[<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<article>
  <!-- Replace all fields ### below. Then delete this comment -->
  <articleinfo>
    <title>###
</title>
    <authorgroup>
      <author>
        <firstname>###
</firstname>
        <surname>###
</surname>
      </author>
    </authorgroup>
    <address><email>###
</email>
    </address>
    <revhistory>
      <revision>
        <revnumber>$Revision: 1.11 $</revnumber>
        <date>$Date: 2006/08/12 23:36:24 $</date>
      </revision>
    </revhistory>
  </articleinfo>
  <section>
    <!-- On the next line, place the title of your first section. -->
    <title>
</title>
    <!-- Add the body of your first section here. -->
  </section>
  <!--Place additional sections here with <section>...</section>
   !  tags.
   !-->
</article>]]></programlisting>
    <para>
      Note the last few lines above.  This is the skeleton of
      the first section of your document.  Place the section's
      title inside the <code >&lt;title&gt;</code >
      element, and add the section's content after the closing
      <code >&lt;/title&gt;</code > tag.
    </para>
    <para>
      Each <code >section</code > element is a top-level
      section.  They will be numbered as sections 1, 2, 3, and so
      on.  To add subsections, use a <code >section</code
      > element inside the <code >section</code >
      element.  For example:
    </para>
    <programlisting
        ><![CDATA[  <section>
    <title>Main section title</title>
    <para>Main section content...</para>
    <section>
      <title>First subsection title</title>
      <para>First subsection content...</para>
    </section>
    <section>
      <title>Second subsection title</title>
      <para>Second subsection content...</para>
    </section>
  </section>]]></programlisting>
    <para>
      If the main section were section 3, then the two
      subsections inside it would be numbered 3.1 and 3.2.
    </para>
    <para>
      You can include more <code >section</code > elements for
      sub-sub-sections, and so on.
    </para>
    <section id='titleabbrev'>
      <title>The <code >titleabbrev</code > element: Short title</title>
      <para>
        The <code >title</code > element inside your <code
        >articleinfo</code > group will appear in the running
        footer on every page in the PDF version of the document.
        If your title is too long, it will be folded into two or
        more lines inside the footer.
      </para>
      <para>
        To cure this problem, place a <code >titleabbrev</code >
        element just after the main <code >title</code > element,
        containing a shorter version of the title that will fit
        inside the running footer.  For example:
      </para>
      <programlisting
><![CDATA[<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<article>
  <articleinfo>
    <title>Exegesis of archetypal content and pataphysical normatives
    in <citetitle >Monty Python and the Holy Grail</citetitle ></title>
    <titleabbrev><citetitle >Monty Python</citetitle > and
    pataphysics</titleabbrev>
    <authorgroup>
      ...]]>
</programlisting>
    </section> <!--titleabbrev-->
  </section> <!--sectioning-->
  <section id='prose-section'>
    <title>Ordinary prose paragraphs</title>
    <para>
      For everyday text paragraphs, enclose each paragraph
      in a <sgmltag class="starttag">simpara</sgmltag> element.
      Here's an example from the
      <citetitle>Declaration of Independence</citetitle
      >:
      <screen
>    &lt;simpara&gt;
      He has abdicated Government here, by declaring
      us out of his Protection and waging War against us.
    &lt;/simpara&gt;
    &lt;simpara&gt;
      He has plundered our Seas, ravaged our Coasts, burnt
      our Towns, and destroyed the Lives of our People.
    &lt;/simpara&gt;</screen>
    </para>
    <para>
      For paragraphs which include other complex structures such
      as bullet lists, screen shots, and such, it is necessary to use
      the <sgmltag class="starttag">para</sgmltag> element.
      These will look the same in the final form as a
      <sgmltag class="starttag">simpara</sgmltag> paragraph.
    </para>
  </section> <!--prose-section-->
  <section id='inline-section'>
    <title>Inline markup</title>
    <simpara>
      &DB; has a number of elements that are useful for
      marking up content within a paragraph.  By
      <firstterm>inline markup</firstterm>, we refer to tags that
      appear within a paragraph and do not change or interrupt
      its basic paragraph shape.
    </simpara>
    <variablelist>
      <varlistentry>
        <term>
          <code>&lt;acronym&gt;&#x2026;&lt;/acronym&gt;</code>
        </term>
        <listitem>
          <para>
            An abbreviation, generally made from the initial
            letters of words, and sometimes pronounceable.  For
            example:
            <programlisting
><![CDATA[<acronym>PEBKAC</acronym> stands for: Problem exists
between keyboard and chair
]]></programlisting>
            <acronym>PEBKAC</acronym> stands for: Problem exists
            between keyboard and chair.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>&lt;application&gt;&#x2026;&lt;/application&gt;</code>
        </term>
        <listitem>
          <para>
            Names of packages.  Example:
            <programlisting
><![CDATA[Start <application>emacs</application>.]]>
</programlisting>
            Start <application>emacs</application>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>&lt;citetitle&gt;&#x2026;&lt;/citetitle&gt;</code>
        </term>
        <listitem>
          <para>
            Used for citing works by their title.  Example:
            <programlisting
><![CDATA[Have you read <citetitle>Ringworld</citetitle>?]]>
</programlisting>
            Have you read <citetitle>Ringworld</citetitle>?
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>&lt;code&gt;&#x2026;&lt;/code&gt;</code>
        </term>
        <listitem>
          <para>
            For program source code.  Example:
            <programlisting
><![CDATA[Next we define the <code>panic()</code> function.]]>
</programlisting>
            Next we define the <code>panic()</code>
            function.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>&lt;computeroutput&gt;&#x2026;&lt;/computeroutput&gt;</code>
        </term>
        <listitem>
          <para>
            Computer-generated output.  Example:
            <programlisting
><![CDATA[<computeroutput>OA210I OLD PSW WAS FF04230C 1200234B</computeroutput>]]>
</programlisting>
            <computeroutput>OA210I OLD PSW
            WAS FF04230C 1200234B</computeroutput>
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>&lt;emphasis&gt;&#x2026;&lt;/emphasis&gt;</code>
        </term>
        <listitem>
          <para>
            Used for emphasized text.  Example:
            <programlisting
><![CDATA[Don't <emphasis>do</emphasis> that then.]]>
</programlisting>
            Don't <emphasis>do</emphasis> that then.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>&lt;filename&gt;&#x2026;&lt;/filename&gt;</code>
        </term>
        <listitem>
          <para>
            For file names and path names.  Example:
            <programlisting
><![CDATA[Packages live in <filename>/fs/packages</filename>.]]>
</programlisting>
            Packages live in <filename>/fs/packages</filename>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>&lt;foreignphrase&gt;&#x2026;&lt;/foreignphrase&gt;</code>
        </term>
        <listitem>
          <para>
            Used to set off words in a different language than
            the surrounding text.
            <programlisting
><![CDATA[These sharks are in genus <foreignphrase>Squalus</foreignphrase>.]]>
</programlisting>
            These sharks are in genus <foreignphrase>Squalus</foreignphrase>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>&lt;guibutton&gt;&#x2026;&lt;/guibutton&gt;</code>
        </term>
        <listitem>
          <para>
            Buttons in a graphical user interface.  Example:
            <programlisting
><![CDATA[To exit, click on the <guibutton>Quit</guibutton> button.]]>
</programlisting>
            To exit, click on the <guibutton>Quit</guibutton>
            button.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>&lt;guiicon&gt;&#x2026;&lt;/guiicon&gt;</code>
        </term>
        <listitem>
          <para>
            An icon in a graphical user interface.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>&lt;guilabel&gt;&#x2026;&lt;/guilabel&gt;</code>
        </term>
        <listitem>
          <para>
            A label in a graphical user interface.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>&lt;guimenu&gt;&#x2026;&lt;/guimenu&gt;</code>
        </term>
        <listitem>
          <para>
            A menu in a graphical user interface.  Example:
            <programlisting
><![CDATA[Pull down the <guimenu>Team</guimenu> menu.]]>
</programlisting>
            Pull down the <guimenu>Team</guimenu> menu.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>&lt;keysym&gt;&#x2026;&lt;/keysym&gt;</code>
        </term>
        <listitem>
          <para>
            For names of keys on a keyboard.  Example:
            <programlisting
><![CDATA[Press <keysym>Enter</keysym>.]]>
</programlisting>
            Press <keysym>Enter</keysym>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>&lt;quote&gt;&#x2026;&lt;/quote&gt;</code>
        </term>
        <listitem>
          <para>
            For in-line quotations.  Example:
            <programlisting
><![CDATA[As Carol Schaffer used to say, <quote>common sense isn't</quote>.
]]>
</programlisting>
            As Carol Schaffer used to say, <quote>common sense
            isn't</quote>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>&lt;replaceable&gt;&#x2026;&lt;/replaceable&gt;</code>
        </term>
        <listitem>
          <para>
            Use this tag for parts of a template, pattern, or
            general case that will are to be replaced with specific items in
            practice.  Example:
            <programlisting
><![CDATA[Call your input file <filename><replaceable>f</replaceable
>.tex</filename>, where <filename><replaceable>f</replaceable
></filename> is some name of your choice.]]>
</programlisting>
            Call your input file <filename
            ><replaceable>f</replaceable>.tex</filename>, where
            <filename><replaceable>f</replaceable></filename> is
            some name of your choice.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>&lt;sgmltag&gt;&#x2026;&lt;/sgmltag&gt;</code>
        </term>
        <listitem>
          <para>
            For the display of any XML or SGML tag.  Use the attribute
            <code >class="starttag"</code> for a starting tag,
            and <code>class="endtag"</code> for an ending tag.
            Example:
            <programlisting
><![CDATA[Enclose the page title within <sgmltag class="starttag"
>title</sgmltag>...<sgmltag class="endtag">title</sgmltag> tags.]]>
</programlisting>
            Enclose the page title within <sgmltag
            class="starttag" >title</sgmltag>...<sgmltag
            class="endtag">title</sgmltag> tags.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>&lt;subscript&gt;&#x2026;&lt;/subscript&gt;</code>
        </term>
        <listitem>
          <para>
            Displays the contents below the baseline.  Example:
            <programlisting
><![CDATA[Drink more H<subscript>2</subscript>O.]]>
</programlisting>
          Drink more H<subscript>2</subscript>O.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>&lt;superscript&gt;&#x2026;&lt;/superscript&gt;</code>
        </term>
        <listitem>
          <para>
            Displays the contents above the baseline.  Example:
            <programlisting
><![CDATA[Celebrate the 4<superscript>th</superscript> of July.]]>
</programlisting>
          Celebrate the 4<superscript>th</superscript> of July.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>&lt;userinput&gt;&#x2026;&lt;/userinput&gt;</code>
        </term>
        <listitem>
          <para>
            For commands or other user input.  Example:
            <programlisting
><![CDATA[Type the command <userinput>make trouble</userinput>.]]>
</programlisting>
            Type the command <userinput>make trouble</userinput>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>&lt;varname&gt;&#x2026;&lt;/varname&gt;</code>
        </term>
        <listitem>
          <para>
            For variable names in programs.  Example:
            <programlisting
><![CDATA[Add one to <varname>sheepCount</varname>.]]>
</programlisting>
            Add one to <varname>sheepCount</varname>.
          </para>
        </listitem>
      </varlistentry>
    </variablelist>
  </section> <!--inline-section-->
  <section id='linking'>
    <title>Links: connecting your document to itself and
    elsewhere</title>
    <para>
      The advent of hypertext technology gives us the opportunity
      to make it much easier for the reader to jump around when
      looking for information.  However, &DB;'s ability to create
      both Web pages and paper copy complicates the task of
      linking.  We want the Web versions to be hot-clickable, but
      keep in mind that the paper version must still be useful
      even though we can't click on it.
    </para>
    <para>
      The paper equivalent of a hyperlink is a cross-reference.
      A cross-reference within the same work might say something
      like &ldquo;See the section on frog identification
      below.&rdquo; If you phrase your document in this way and
      use the right tags carefully, this will read normally in
      the print version and the Web version will read the same
      way and also be a link.
    </para>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          For cross-references to other locations in the same
          document, refer to <xref linkend='link-tag-section' />
          and <xref linkend='xref-tag-section' />.
        </para>
      </listitem>
      <listitem>
        <para>
          For references to a Web page outside the document, see
          <xref linkend='ulink-tag-section' />.  the <link
          linkend="ulink-tag-section">section on the <sgmltag
          class="starttag">ulink</sgmltag> tag</link>
          below.
        </para>
      </listitem>
      <listitem>
        <para>
          Both Web and paper documents may refer to external
          works: printed books or documents.  For this kind of
          linking, use the <sgmltag
          class="starttag">citetitle</sgmltag> tag under <xref
          linkend='inline-section' />.
        </para>
      </listitem>
    </itemizedlist>
    <section id='link-tag-section'>
      <title>The <sgmltag class="starttag">link</sgmltag> and
      <sgmltag class="starttag">xref</sgmltag> tags:
      Linking within your document</title>
      <para>To refer to another location in the same document:</para>
      <procedure>
        <step>
          <para>
            Invent a unique identifier name, made from letters,
            numbers, hyphens, and the underscore (<code>_</code>)
            character.  For example, you might use the identifier
            <sgmltag class="attvalue">flute-tuning</sgmltag> for
            a section on how to tune a flute.
          </para>
        </step>
        <step>
          <para>
            Find the start tag for the element to which you want
            to refer, and attach an <code><sgmltag
            class="attribute"
            >id="<replaceable>I</replaceable>"</sgmltag></code>
            attribute to that tag, where <sgmltag
            class="attvalue"><replaceable>I</replaceable></sgmltag>
            is the identifier name you invented in the previous
            step.  Any &DB; start tag can carry an <code><sgmltag
            class="attribute">id=</sgmltag></code> attribute.
            For example, to refer to a main section, add the
            attribute to the <sgmltag
            class="starttag">section</sgmltag> tag.
          </para>
        </step>
        <step>
          <para>At the location where you want to cross-refer, use
            a tag of the form:
          <screen
>    &lt;link linkend="<replaceable>I</replaceable
                >"&gt;<replaceable>T</replaceable>&lt;/link&gt;</screen>
          where <replaceable>I</replaceable> is the identifier
          defined in the previous step and <replaceable>T</replaceable>
          is the text of the link.
          </para>
        </step>
      </procedure>
      <para>
        For example:
      </para>
      <screen
>    &lt;section id="thule-history"&gt;
      &lt;title&gt;The History of Thule&lt;/title&gt;
        ...
    &lt;section&gt;
      ...
      &lt;para&gt;For more amusing folk traditions of Greenland, see
        &lt;link linkend="thule-history"&gt;History of Thule&lt;/link&gt; above.
      &lt;/para&gt;</screen>
      <para>
        In the HTML output, this will produce a clickable link.
        In the PostScript output, the content of the
        <code><sgmltag class="starttag">link</sgmltag></code>
        element will be underlined.
      </para>
      <para>
        You can also use the empty (non-paired) tag
        <code><sgmltag class="starttag"
        >anchor id="<replaceable>I</replaceable>"</sgmltag></code>
        to define a target location, where <replaceable>I</replaceable>
        is the same unique identifier.
      </para>
      <para>
        Cross-references won't be correct the first time you
        build your PostScript file.  Remove your
        <filename>.dvi</filename> file and rebuild it twice, and
        references should be correct the third time.
      </para>
      <para id='xref-tag-section'>
        You may find it easier to use the <sgmltag
        class="starttag">xref</sgmltag> element to link to other
        locations within your document.  This element is empty (has
        no content), since the link text is generated automatically.
      </para>
      <para>
        There are three ways to use this tag.  All three
        require that you assign a unique <sgmltag
        class="attribute">id</sgmltag> attribute to the tag to
        which you are linking:
      </para>
      <itemizedlist>
        <listitem>
          <para>
            Just say <sgmltag class="starttag">xref
            linkend="<replaceable>I</replaceable>"</sgmltag>,
            where <replaceable>I</replaceable> is the target
            identifier.  The link text will depend on the type of
            element.  For example, a reference to a <sgmltag
            class="starttag">chapter</sgmltag> element may
            generate link text containing the chapter number and
            title.
          </para>
        </listitem>
        <listitem>
          <para>
            If there is an element somewhere near the target
            identifier whose content you would like to use as the
            link text, use this construct:
            <screen
>&lt;xref linkend="<replaceable>I</replaceable
                >" endterm="<replaceable>J</replaceable>"&gt;</screen>
            where
            <code><replaceable>I</replaceable></code>
            is the identifier of the element you want to link to,
            and the link text will be taken from the content of
            the element with
            <sgmltag class="attribute">id="<replaceable>J</replaceable
            >"</sgmltag>.
          </para>
          <para>
            For example, suppose a chapter starts like this:
          </para>
          <screen><![CDATA[    <chapter id="ch11">
      <title>The <emphasis id="ch11-abbr">Last
        Chapter<emphasis></title>]]></screen>
          <para>
            Then this reference would use &ldquo;Last Chapter&rdquo; as
            the link text:
          </para>
          <screen
><![CDATA[    <xref linkend="ch11" endterm="ch11-abbr"/>]]></screen>
        </listitem>
        <listitem>
          <para>
            You can specify what link text you want to use
            for a specific target by adding an <sgmltag
            class="attribute">xreflabel</sgmltag> attribute to
            the target element.  Any <sgmltag
            class="starttag">xref</sgmltag> element that refers
            to that target will automatically use that
            attribute's value as its link text.
          </para>
          <para>
            For example, suppose you start a chapter like this:
            <screen
><![CDATA[    <chapter id="ch14" xreflabel="The Silly Chapter">...]]></screen>
            then any reference of the form <sgmltag
            class="starttag">xref id="ch14"</sgmltag> would use
            &ldquo;The Silly Chapter&rdquo; as its link text.
          </para>
        </listitem>
      </itemizedlist>
    </section> <!--link-tag-section-->
    <section id='ulink-tag-section'>
      <title>The <sgmltag class="starttag">ulink</sgmltag> tag:
      Linking outside your document</title>
      <para>
        To refer to a location on a Web page outside the
        current document, use the tag
        <sgmltag class="starttag">ulink url="<replaceable>U</replaceable
        >"</sgmltag> tag, where <replaceable>U</replaceable> is the
        URL (Uniform Resource Locator) of the location to which you
        are referring.
      </para>
      <para>
        In the HTML output this will result in a clickable link.
        In print output, &DB; will include the URL after the
        link text so that readers can find the reference.
      </para>
      <para>
        Example:
        <programlisting
>See the <sgmltag class="starttag"
                >ulink url="http://www.nmt.edu/tcc/"</sgmltag
                >TCC Help System at
<sgmltag class="starttag"
                >code</sgmltag
                >http://www.nmt.edu/tcc/<sgmltag class="endtag"
                >code</sgmltag
                ><sgmltag class="endtag">ulink</sgmltag
                >...&rdquo;</programlisting>
        would display as: &ldquo;See
        <ulink url="http://www.nmt.edu/tcc/">the TCC Help system at
        <code>http://www.nmt.edu/tcc/</code
        ></ulink>...&rdquo;
      </para>
    </section> <!--ulink-tag-section-->
  </section> <!--linking-->
  <section id='para-shapes-section'>
    <title>Special paragraph shapes</title>
    <section id='bullet-shape'>
      <title>Bullet lists: <sgmltag
        class="starttag">itemizedlist</sgmltag></title>
      <para>
        A <firstterm>bullet
        list</firstterm> is a set of narrower paragraphs shown with
        a round dot (the <firstterm>bullet</firstterm>) before each
        one.  Typical uses are lists of features, lists of
        important points, and such.
      </para>
      <para>
        Enclose the entire bullet list inside an
        <sgmltag class="starttag">itemizedlist</sgmltag
        >...<sgmltag class="endtag">itemizedlist</sgmltag> element.
        Each item is then enclosed within a
        <sgmltag class="starttag">listitem</sgmltag
        >...<sgmltag class="endtag">listitem</sgmltag> element
        containing one or more
        <sgmltag class="starttag">para</sgmltag> or
        <sgmltag class="starttag">simpara</sgmltag> elements.
      </para>
      <para>
        For example, this input:
      <programlisting
><![CDATA[    <itemizedlist>
      <listitem>
        <para>Mangos.</para>
      </listitem>
      <listitem>
        <para>Chirimoya.</para>
      </listitem>
    </itemizedlist>]]></programlisting>
        produces this output:
      </para>
      <itemizedlist>
        <listitem>
          <para>
            Mangos.
          </para>
        </listitem>
        <listitem>
          <para>
            Chirimoya.
          </para>
        </listitem>
      </itemizedlist>
      <para>
        Normally, bullet lists have a fairly generous amount of
        space between the bullets.  To reduce this space, add a
        <code>spacing="compact"</code> attribute to the <sgmltag
        class="starttag">itemizedlist</sgmltag> element.  Here is
        the example list again in compact spacing:
      </para>
      <itemizedlist spacing="compact">
        <listitem>
          <para>
            Mangos.
          </para>
        </listitem>
        <listitem>
          <para>
            Chirimoya.
          </para>
        </listitem>
      </itemizedlist>
    </section> <!--bullet-shape-->
    <section id='orderedlist'>
      <title>Numbered lists: <sgmltag
        class="starttag">orderedlist</sgmltag></title>
      <para>
        To produce a numbered list of items, use the <sgmltag
        class="starttag">orderedlist</sgmltag> construct.  Here's
        an example:
      </para>
      <orderedlist>
        <listitem>
          <para>DocBook renders documents in both print and Web
            form.
          </para>
        </listitem>
        <listitem>
          <para>
            It frees the author from most concerns of
            presentation.
          </para>
        </listitem>
      </orderedlist>
      <para>
        Here's how the above list looks in source form:
      </para>
      <programlisting><![CDATA[      <orderedlist>
        <listitem>
          <para>DocBook renders documents in both print and Web
            form.</para></listitem>
        <listitem>
          <para>It frees the author from most concerns of
            presentation.</para></listitem>
      </orderedlist>]]></programlisting>
      <para>
        There are a number of attributes you can add to the
        <sgmltag class="starttag">orderedlist</sgmltag> element
        to change the way the entries are numbered:
      </para>
      <variablelist>
        <varlistentry>
          <term>
            <code>numeration</code>
          </term>
          <listitem>
            <para>
              The default value is
              <code>numeration="arabic"</code>, with entries
              numbered 1., 2., 3., &hellip;.  Other possible
              values include:
            </para>
            <itemizedlist spacing="compact">
              <listitem>
                <para>
                  <code>numeration="loweralpha"</code > for a.,
                  b., &hellip;
                </para>
              </listitem>
              <listitem>
                <para>
                  <code>numeration="lowerroman"</code
                  > for i., ii., iii., &hellip;
                </para>
              </listitem>
              <listitem>
                <para>
                  <code>numeration="upperalpha"</code
                  > for A., B., C., &hellip;
                </para>
              </listitem>
              <listitem>
                <para>
                  <code>numeration="upperroman"</code
                  > for I., II., III., &hellip;
                </para>
              </listitem>
            </itemizedlist>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>
            <code>inheritnum="inherit"</code>
          </term>
          <listitem>
            <para>
              Normally, when you use an ordered list inside
              another ordered list, the inner list has its own
              numbering.  However, if you specify
              <code>inheritnum="inherit"</code>, each item number
              in the inner list will have the item number from
              the next outer list prepended to it.
            </para>
            <para>
              For example, if an inner list is under an
              outer-list item numbered 17, and the inner list had
              the <code>inheritnum="inherit"</code>
              attribute, its items would be numbered 17.1, 17.2,
              17.3, &hellip;.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>
            <code>spacing="compact"</code>
          </term>
          <listitem>
            <para>
              Normally the items of an ordered list are separated
              by generous amounts of space.  Use the
              <code>spacing="compact"</code> attribute to squeeze
              out most of the space between the items.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>
            <code>continuation="continues"</code>
          </term>
          <listitem>
            <para>
              Sometimes you have to break an ordered list into
              multiple pieces, with text paragraphs or other
              material between the pieces.  This attribute allows
              you to start the numbering of a new list where the
              old one left off.
            </para>
            <para>
              For example, suppose the first chunk of an ordered
              list ended with item XIV, and another ordered list
              followed it starting with:
              <programlisting
><![CDATA[    <orderedlist numeration="upperroman" continuation="continues">]]></programlisting>
              That second list would start with item XV.
            </para>
          </listitem>
        </varlistentry>
      </variablelist>
    </section> <!--orderedlist-->
    <section id='procedure-shape'>
      <title>Procedures</title>
      <para>
        A step-by-step procedure is generally presented in a form
        similar to the bullet list, but with step numbers taking
        the place of bullets.
      </para>
      <para>
        Enclose the entire procedure within a
        <sgmltag class="starttag">procedure</sgmltag
        >...<sgmltag class="endtag">procedure</sgmltag> element.
        Each step is enclosed within a
        <sgmltag class="starttag">step</sgmltag
        >...<sgmltag class="endtag">step</sgmltag> element
        containing one or more
        <sgmltag class="starttag">para</sgmltag> or
        <sgmltag class="starttag">simpara</sgmltag> elements.
      </para>
      <para>
        For example, this input:
      <programlisting><![CDATA[    <procedure>
      <step>
        <para>
          Throw the football.
        </para>
      </step>
      <step>
        <para>
          Pick it up first.
        </para>
      </step>
    </procedure>]]></programlisting>
        produces this output:
      </para>
      <procedure>
        <step>
          <para>
            Throw the football.
          </para>
        </step>
        <step>
          <para>
            Pick it up first.
          </para>
        </step>
      </procedure>
      <para>
        If the steps of your procedure refer to other steps,
        you can get &DB; to insert the step number into each reference
        automatically.  To do this:
      </para>
      <procedure>
        <step>
          <para>
            Invent a name <replaceable>I</replaceable> for each
            step, and add an attribute <code><sgmltag
            class="attribute"
            >id=<replaceable>I</replaceable></sgmltag></code> to
            the corresponding <sgmltag
            class="starttag">step</sgmltag> tag.
          </para>
        </step>
        <step>
          <para>
            Wherever you want to refer to a step, use this tag:
            <sgmltag class="starttag" >xref
            linkend=<replaceable>I</replaceable></sgmltag> where
            <replaceable>I</replaceable> is the name from the
            step you are referring to.  This tag will be replaced
            by the text &ldquo;step N&rdquo; where N is the step
            number.
          </para>
        </step>
      </procedure>
      <para>
        Here's an example.  This is a (facetious) solution
        to the famous Halting Problem.  First, in output form:
      </para>
      <procedure>
        <step id='start-step'>
          <para>
            Has the program halted?  If so, go to <xref
            linkend='done-step'/>.
          </para>
        </step>
        <step id='loop-step'>
          <para>
            Go to <xref linkend='start-step'/>.
          </para>
        </step>
        <step id='done-step'>
          <para>
            Done: we now know that the program halts.
          </para>
        </step>
      </procedure>
      <para>
        And now the source for the above:
      </para>
      <programlisting
><![CDATA[      <procedure>
        <step id="start-step">
          <para>
            Has the program halted?  If so, go to
            <xref linkend="done-step"/>.
          </para>
        </step>
        <step id="loop-step">
          <para>
            Go to <xref linkend="start-step"/>.
          </para>
        </step>
        <step id="done-step">
          <para>
            Done: we now know that the program halts.
          </para>
        </step>
      </procedure>]]></programlisting>
    </section> <!--procedure-shape-->
    <section id='q-and-a'>
      <title>Question-and-answer sets</title>
      <para>
        &DB; supports sets of questions and answers, such as
        Frequently Asked QUestions (FAQ) documents.
      </para>
      <para>
        The top-level element for a set of questions and answers
        is <code >qandaset</code >.  Here is a very simple set of
        two Q&amp;A pairs:
      </para>
      <qandaset defaultlabel='qanda'>
        <title>At the Bridge of Death</title>
        <qandaentry>
          <question>
            <para>
              What is your favorite color?
            </para>
          </question>
          <answer>
            <para>
              Blue.
            </para>
          </answer>
        </qandaentry>
        <qandaentry>
          <question>
            <para>
              What is the air-speed velocity of an unladen swallow?
            </para>
          </question>
          <answer>
            <para>
              What do you mean?  An African or European swallow?
            </para>
          </answer>
        </qandaentry>
      </qandaset>
      <para>
        Here's how that list is encoded:
      </para>
      <programlisting
><![CDATA[      <qandaset defaultlabel='qanda'>
        <title>At the Bridge of Death</title>
        <qandaentry>
          <question>
            <para>
              What is your favorite color?
            </para>
          </question>
          <answer>
            <para>
              Blue.
            </para>
          </answer>
        </qandaentry>
        <qandaentry>
          <question>
            <para>
              What is the air-speed velocity of an unladen swallow?
            </para>
          </question>
          <answer>
            <para>
              What do you mean?  An African or European swallow?
            </para>
          </answer>
        </qandaentry>
      </qandaset>
]]>
</programlisting>
      <itemizedlist>
        <listitem>
          <para>
            To specify the format, in the <code >qandaset</code >
            start tag, include a <code >defaultlabel</code >
            attribute with one of these values:
          </para>
          <informaltable>
            <tgroup cols="2">
              <colspec colwidth="14em" align="left"/>
              <colspec colwidth="1*" align="left"/>
              <tbody>
                <row>
                  <entry valign="top">
                    <code>defaultlabel='qanda'</code>
                  </entry>
                  <entry valign="top">
                    Label the questions with &ldquo;Q:&rdquo; and
                    the answers with &ldquo;A:&rdquo;.
                  </entry>
                </row>
                <row>
                  <entry valign="top">
                    <code>defaultlabel='number'</code>
                  </entry>
                  <entry valign="top">
                    Number the entries.
                  </entry>
                </row>
                <row>
                  <entry valign="top">
                    <code>defaultlabel='label'</code>
                  </entry>
                  <entry valign="top">
                    Each <code >question</code > element and each
                    <code >answer</code > element must have a
                    <code >label</code > attribute containing the
                    string to be used as a label.
                  </entry>
                </row>
              </tbody>
            </tgroup>
          </informaltable>
        </listitem>
        <listitem>
          <para>
            For a simple list of questions and answers, enclose
            each item in a <code >qandaentry</code > element.
          </para>
        </listitem>
        <listitem>
          <para>
            Inside the <code >qandaentry</code >, enclose each
            question in a <code >question</code > element and
            each answer in an <code >answer</code > element.
          </para>
          <para>
            You can have any number of <code >question</code >
            elements in a <code >qandaentry</code > element.
          </para>
          <para>
            You can have any number of <code >answer</code >
            elements in a <code >qandaentry</code > element,
            even none at all (for questions with no answer).
          </para>
        </listitem>
      </itemizedlist>
      <para>
        If you want to structure your Q&amp;A set into sections,
        you can use a <code >qandadiv</code > element inside your
        <code >qandaset</code > element, with one or more <code
        >qandaentry</code > elements inside that.
      </para>
      <para>
        To give the section a title, use a <code >title</code >
        element after the <code >qandadiv</code > element.
      </para>
      <para>
        Here's a partial example:
      </para>
      <programlisting
><![CDATA[    <qandaset defaultlabel='qanda'>
      <title>Frequently axed questors</title>
      <qandadiv>
        <title>Trolls I have put down</title>
        <qandaentry>
          ...
        </qandaentry>
        ...
      </qandadiv>
      <qandadiv>
        <title>Castle Anthrax</title>
        <qandaentry>
          ...
        </qandaentry>
        ...
      </qandadiv>
    </qandaset>
]]></programlisting>
      <para>
        You can even use <code >qandadiv</code > elements inside
        other <code >qandadiv</code > elements to divide your
        list into sublists, sub-sublists, and so on.
      </para>
    </section> <!--q-and-a-->
    <section id='def-lists'>
      <title>Definition lists: <sgmltag
      class="starttag">variablelist</sgmltag></title>
      <para>
        Another commonly used special paragraph shape is to
        display a list of terms to be defined, each followed by
        an indented paragraph containing the description.
      </para>
      <para>
        For this shape, enclose the entire list in a <sgmltag
        class="starttag">variablelist</sgmltag> tag.  Each
        term-definition pair is enclosed in a <sgmltag
        class="starttag">varlistentry</sgmltag> element.  Inside
        that element, enclose the term to be defined inside a
        <sgmltag class="starttag">term</sgmltag> element, and
        enclose the paragraph or paragraphs defining the term
        inside a <sgmltag class="starttag">listitem</sgmltag>
        element.
      </para>
      <para>
        Here is an example of a list containing two terms:
      </para>
      <screen><![CDATA[      <variablelist>
        <varlistentry>
          <term>
            <code>.__abs__(self)</code>
          </term>
          <listitem>
            <para>
              Defines the behavior of the <code>abs()</code> function
              when applied to an object of your class.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>
            <code>.__add__(self,<replaceable >other</replaceable
            >)</code>
          </term>
          <listitem>
            <para>
              Defines the behavior of this class for <code
              >self+<replaceable>other</replaceable ></code>.
            </para>
          </listitem>
        </varlistentry>
      </variablelist>]]></screen>
      <para>
        And here is how that looks when formatted:
      </para>
      <variablelist termlength="1.25in">
        <varlistentry>
          <term>
            <code>.__abs__(self)</code>
          </term>
          <listitem>
            <para>
              Defines the behavior of the
              <code>abs()</code> function when
              applied to an object of your class.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>
            <code>.__add__(self,<replaceable
            >other</replaceable>)</code>
          </term>
          <listitem>
            <para>
              Defines the behavior of this class for
              <code>self+<replaceable>other</replaceable
              ></code>.
            </para>
          </listitem>
        </varlistentry>
      </variablelist>
    </section> <!--def-lists-->
    <section id='notes-etc'>
      <title>Notes, warnings, cautions, etc.</title>
      <para>
        Sometimes you need to make some text stand out against
        the background.  &DB; has several tags for such purposes:
      </para>
      <itemizedlist spacing="compact">
        <listitem>
          <para>
            <sgmltag class="starttag">note</sgmltag>
          </para>
        </listitem>
        <listitem>
          <para>
            <sgmltag class="starttag">warning</sgmltag>
          </para>
        </listitem>
        <listitem>
          <para>
            <sgmltag class="starttag">important</sgmltag>
          </para>
        </listitem>
        <listitem>
          <para>
            <sgmltag class="starttag">caution</sgmltag>
          </para>
        </listitem>
        <listitem>
          <para>
            <sgmltag class="starttag">tip</sgmltag>
          </para>
        </listitem>
      </itemizedlist>
      <para>
        Typically you will put one or more regular paragraphs
        (using the <sgmltag class="starttag">para</sgmltag> tag)
        inside such elements.  Here's an example:
      </para>
      <warning>
        <para>
          Do not touch the electric fence!
        </para>
      </warning>
      <para>
        And here's that warning in source form:
      </para>
    <programlisting
><![CDATA[    <warning>
      <para>
        Do not touch the electric fence!
      </para>
    </warning>]]></programlisting>
    </section> <!--notes-etc-->
    <section id='blockquote'>
      <title>Block quotations</title>
      <para>
        Two different elements are used to present quotations set
        off in separate blocks:
      </para>
      <itemizedlist>
        <listitem>
          <para>
            Use <sgmltag class="starttag">epigraph</sgmltag> when
            the quotation starts a new chapter or section.
          </para>
        </listitem>
        <listitem>
          <para>
            Use <sgmltag class="starttag">blockquote</sgmltag>
            for quotations elsewhere.
          </para>
        </listitem>
      </itemizedlist>
      <para>
        In either case, the content of the element consists of an
        optional <sgmltag class="starttag">attribution</sgmltag>
        element that tells the reader who said this.  The actual
        quotation follows, typically wrapped in one or more
        <sgmltag class="starttag">para</sgmltag> elements.
        Generally the attribution will be presented
        <emphasis>after</emphasis> the quotation.
      </para>
      <para>
        Here's an example:
      </para>
      <blockquote>
        <attribution>C. A. R. Hoare</attribution>
        <para>
          There are two ways of constructing a software
          design. One way is to make it so simple that there are
          obviously no deficiencies. And the other way is to make
          it so complicated that there are no obvious
          deficiencies.
        </para>
      </blockquote>
      <para>
        The source for the quote looks like this:
      </para>
      <programlisting
><![CDATA[      <blockquote>
        <attribution>C. A. R. Hoare</attribution>
        <para>
          There are two ways of constructing a software
          design. One way is to make it so simple that there are
          obviously no deficiencies. And the other way is to make
          it so complicated that there are no obvious
          deficiencies.
        </para>
      </blockquote>]]></programlisting>
    </section> <!--blockquote-->
  </section> <!--para-shapes-section-->
  <section id='verbatim-displays'>
    <title>Verbatim displays</title>
    <para>
      By <firstterm>displays</firstterm> we mean the presentation
      of information in some form other than a paragraph: illustrations,
      representations of computer screens, and so on.
    </para>
    <para>
      To present one or more lines in a monospaced (fixed-width)
      font, as in a computer program, enclose the lines within
      <sgmltag class="starttag">programlisting</sgmltag
      >...<sgmltag class="endtag">programlisting</sgmltag>.
    </para>
    <para>
      For example, this input:
      <programlisting
>&lt;programlisting&gt;
    10 PRINT "BASIC IS OVER 40 YEARS OLD"
    20 GOTO 10
    30 END
&lt;/programlisting&gt;</programlisting>
      produces this output:
    </para>
    <programlisting
>    10 PRINT "BASIC IS OVER 40 YEARS OLD"
    20 GOTO 10
    30 END</programlisting>
    <para>
      You can also use the element <sgmltag
      class="starttag">screen</sgmltag >...<sgmltag
      class="endtag">screen</sgmltag> to display something that
      appears on a screen.  The formatting is the same as for the
      <sgmltag class="starttag">programlisting</sgmltag> element.
    </para>
    <para>
      Line breaks are preserved starting immediately after the
      opening <sgmltag class="starttag">screen</sgmltag> or
      <sgmltag class="starttag">programlisting</sgmltag> tag; so,
      if you start your code display on the line following that
      tag, the display will start with a blank line.
    </para>
    <section id='callouts'>
      <title>Callouts in verbatim displays</title>
      <para>
        Sometimes you want to present a program listing or screen
        shot with <firstterm>callouts</firstterm>, little
        numbered graphic tags that appear within the display.
        Then, following the display, you present textual
        discussions for each callout.  Here's an example:
      </para>
      <programlisting
>    AWAKE! for Morning in the Bowl of Night <co id="khay1"/>
    Has flung the Stone that puts the Stars to Flight:
    And Lo! the Hunter of the East has caught
    The Sultan's Turret in a Noose of Light. <co id="khay2"/></programlisting>
      <calloutlist>
        <callout arearefs="khay1">
          <simpara>
            Note the gratuitous capitalization.
          </simpara>
        </callout>
        <callout arearefs="khay2">
          <simpara>
            It appears that someone has struck the Sultan on the
            turret with an alarm clock.
          </simpara>
        </callout>
      </calloutlist>
      <para>
        In order to use callouts, you must have a subdirectory
        named <filename>callouts</filename> in the same directory
        as your document, containing the actual callout images in
        two formats (PNG for web pages, PDF for print
        presentation).  There are two ways to make these callouts
        available under Linux.
      </para>
      <orderedlist>
        <listitem>
          <para>
            Make a soft link from your directory:
          <programlisting
>ln -s /u/www/docs/tcc/help/image/callouts .</programlisting>
          </para>
        </listitem>
        <listitem>
          <para>
            Or, copy an archive file containing that whole
            directory and unpack it in your directory:
            <programlisting
>cp /u/www/docs/tcc/help/image/callouts.tgz .
    tar -xvzf callouts.tgz</programlisting>
          </para>
        </listitem>
      </orderedlist>
      <para>
        That directory currently contains graphics for twenty
        callouts numbered 1 to 20.  If you don't like their
        appearance or need more than 20, see the
        <filename>README</filename> in that directory to see how
        to create your own.
      </para>
      <para>
        Once you have installed the callout graphic files,
        to use callouts in your <sgmltag
        class="starttag">screen</sgmltag> or <sgmltag
        class="starttag">programlisting</sgmltag> element:
      </para>
      <procedure>
        <step>
          <para>
            Add an element of the form <code>&lt;co
            id="<replaceable>I</replaceable>"&gt;</code> within
            the display where you want a callout to appear.
            Invent a unique identifier
            <code><replaceable>I</replaceable></code> to be used
            later.
          </para>
        </step>
        <step>
          <para>
            When you have decorated your display with <sgmltag
            class="starttag">co</sgmltag> elements, add a
            <sgmltag class="starttag">calloutlist</sgmltag>
            element after the end of the display.
          </para>
        </step>
        <step>
          <para>
            Within that <sgmltag class="starttag"
            >calloutlist</sgmltag > element, for each callout
            that you used in the display, add one element of the
            form <code>&lt;callout arearefs="<replaceable
            >I</replaceable >"&gt;</code> for each callout you
            used above.  Add your textual description (or
            graphics or whatever) within the <sgmltag
            class="starttag">callout</sgmltag> element.  If you
            need to put anything other than ordinary text inside
            the <sgmltag class="starttag">callout</sgmltag>
            element, wrap it inside a <sgmltag
            class="starttag">para</sgmltag> element.
          </para>
        </step>
      </procedure>
      <para>Here's how the above example looks in source form:</para>
      <programlisting
><![CDATA[  <screen>    AWAKE! for Morning in the Bowl of Night <co id="khay1"/>
    Has flung the Stone that puts the Stars to Flight:
    And Lo! the Hunter of the East has caught
    The Sultan's Turret in a Noose of Light. <co id="khay2"/></screen>
  <calloutlist>
    <callout arearefs="khay1">
      Note the gratuitous capitalization.
    </callout>
    <callout arearefs="khay2">
      It appears that someone has struck the Sultan on the
      turret with an alarm clock.
    </callout>
  </calloutlist>]]></programlisting>
    </section> <!--callouts-->
    <section id='poetry'>
      <title>Poetry</title>
      <para>
        When formatting poetry and similar text, use the <sgmltag
        class="starttag" >literallayout</sgmltag > tag.  Like the
        <sgmltag class="starttag">programlisting</sgmltag>
        element, it presents the content with all whitespace and
        line breaks intact, but it uses a regular text font.
        Here's an example from Piet Hein:
      </para>
      <literallayout>Problems worthy
    Of attack
Prove their worth
    By hitting back.</literallayout>
    </section> <!--poetry-->
  </section> <!--verbatim-displays-->
  <section id='image-section'>
    <title>Including graphic images</title>
    <para>
      You can easily include images in a &DB; document.
      However, you may have to produce two different versions of
      some images so that they will look decent in both print
      and Web presentation.
    </para>
    <section id='figures'>
      <title>Formal and informal figures</title>
      <para>
        A <firstterm>formal figure</firstterm> is a graphic
        image presented with a title.  For example, suppose you
        have scanned a photo and called the result
        <filename>lanai.jpg</filename>.  Here is how you would
        include that photo as a formal figure:
      </para>
      <programlisting
><![CDATA[<figure>
  <title>Lanai from the air</title>
  <mediaobject>
    <imageobject>
      <imagedata fileref="lanai.jpg"/>
    </imageobject>
  </mediaobject>
</figure>]]></programlisting>
      <para>
        An <firstterm>informal figure</firstterm> is just a
        figure without the title.  To present the same graphic as
        an informal figure:
      </para>
      <programlisting
><![CDATA[<informalfigure>
  <mediaobject>
    <imageobject>
      <imagedata fileref="lanai.jpg"/>
    </imageobject>
  </mediaobject>
</informalfigure>]]></programlisting>
      <para>
        If you want to <emphasis>change the displayed
        size</emphasis> of the image, add an attributes
        <code>scale="<replaceable>P</replaceable>"</code> to the
        <sgmltag class="starttag">imagedata</sgmltag> element,
        where <code><replaceable>P</replaceable ></code> is the
        percentage size, e.g., 33 for one-third size.
      </para>
      <para>
        Here is an example of a 500x100-pixel panel from <ulink
        url="http://yellow5.com/pokey/">Pokey the Penguin</ulink>
        shown first at half size (<code>scale="50"</code>), then
        at one-quarter size (<code>scale="25"</code>).
      </para>
      <informalfigure>
        <mediaobject>
          <imageobject>
            <imagedata scale="50" fileref="pokey.gif"></imagedata>
          </imageobject>
        </mediaobject>
      </informalfigure>
      <informalfigure>
        <mediaobject>
          <imageobject>
            <imagedata scale="25" fileref="pokey.gif"></imagedata>
          </imageobject>
        </mediaobject>
      </informalfigure>
    </section> <!--figures-->
    <section id='role-graphics'>
      <title>Tuning graphics for different roles</title>
      <para>
        For some types of graphics, such as photos or
        screenshots, the technique above will work fine.
      </para>
      <para>
        However, due to the different resolutions of screens and
        printers, some types of graphics&mdash;especially
        diagrams and other vector-type drawings&mdash;will not
        look right both in Web and print presentation.
      </para>
      <para>
        Consider the case of a graphic prepared using a drawing
        program such as <application>xfig</application>.  If the
        graphic is exported as a JPEG or GIF image, it must be
        rasterized.  If it rasterized at its design size, it
        might look okay on a screen, but in print it is likely to
        suffer from <firstterm>aliasing</firstterm>, the
        &ldquo;stairstep&rdquo; effects caused by not enough
        dots.
      </para>
      <para>
        A solution that works for print presentation is to export
        the figure at some large magnification, like 200% or
        400%, and then use <code>scale="50"</code> or
        <code>scale="25"</code> to shrink it down so it fits into
        the right space on the printed page.
      </para>
      <para>
        However, the problem with that approach is that the
        graphic will now be two or four times too large in its
        Web form.
      </para>
      <para>
        The solution is to prepare two different forms of the
        original graphic, one optimized for print presentation
        and one for Web use.
      </para>
      <itemizedlist>
        <listitem>
          <para>
            For Web presentation, prepare the graphic as one
            of the common rasterized formats: JPEG, PNG, or
            GIF.
          </para>
        </listitem>
        <listitem>
          <para>
            If possible, use PDF format for print presentation.
            PDF format is a scalable vector representation that
            allows the graphic to be scaled in a way optimized
            for the specific printer being used to render
            it.
          </para>
        </listitem>
      </itemizedlist>
      <para>
        Once you have prepared the two forms, you can then
        include them in the same document as two different
        <sgmltag class="starttag">imageobject</sgmltag> elements
        within the same <sgmltag
        class="starttag">mediaobject</sgmltag> element.  Tag the
        <sgmltag class="starttag">mediaobject</sgmltag> element
        with the Web version with an attribute
        <code>role="html"</code>, and tag the print <sgmltag
        class="starttag">mediaobject</sgmltag> with an attribute
        <code>role="fo"</code>.
      </para>
      <para>
        For example, suppose you have produced a diagram in the
        <application>xfig</application> drawing program and
        called it <filename>flow.fig</filename>.  For HTML,
        export it as in PNG format as
        <filename>flow.png</filename>; then export it in PDF
        format as <filename>flow.pdf</filename>.  To include both
        figures, you might use this construct:
      </para>
      <programlisting
><![CDATA[<figure>
  <title>Mill flow diagram</title>
  <mediaobject>
    <imageobject role="html">
      <imagedata fileref="flow.png"/>
    </imageobject>        
    <imageobject role="fo">
      <imagedata fileref="flow.pdf"/>
    </imageobject>        
  </mediaobject>
</figure>]]></programlisting>
      <para>
        Once you have this dual presentation in place, you can
        adjust the size of each figure independently by using
        <code>scale="&hellip;"</code> attributes on the <sgmltag
        class="starttag">imagedata</sgmltag> elements.
      </para>
    </section> <!--role-graphics-->
    <section id='figure-scaling'>
      <title>Scaling a figure</title>
      <para>
        When sizing a figure for presentation, there are two
        different areas involved:
      </para>
      <itemizedlist spacing="compact">
        <listitem>
          <para>
            The <firstterm>image size</firstterm> is the size of
            the image itself.
          </para>
        </listitem>
        <listitem>
          <para>
            The <firstterm>viewport</firstterm> is the area
            in which the figure is supposed to be
            presented.
          </para>
        </listitem>
      </itemizedlist>
      <para>
        If one dimension of the image is smaller than that
        dimension of the viewport, the result will be empty space
        around the figure.  But what if the viewport is smaller than
        the image?  In print presentation, the image will be
        cropped; but in Web presentation the image will not be cropped.
      </para>
      <para>
        In general there are six different attributes of <sgmltag
        class="starttag">imagedata</sgmltag> that affect scaling:
      </para>
      <variablelist>
        <varlistentry>
          <term>
            <code>contentwidth</code> and <code>contentdepth</code>
          </term>
          <listitem>
            <para>
              These attributes set the desired image size.
              The attribute value must be a number, optionally
              followed by one of the dimension codes
              <code>px</code> (pixels, the default),
              <code>pt</code> (points),
              <code>cm</code> (centimeters),
              <code>mm</code> (millimeters),
              <code>pc</code> (picas),
              <code>in</code> (inches),
              <code>em</code> (ems), or
              <code>%</code> (percent, relative to the
              page width for horizontal dimensions).
            </para>
            <para>
              For example, if you want the image to be
              125mm&times;75mm, use:
            </para>
            <programlisting
><![CDATA[    <imagedata contentwidth="125mm" contentdepth="75mm" ...>]]></programlisting>
            <para>
              You need only specify one of these two attributes;
              if only one dimension is specified, the other
              dimension will be scaled to preserve the
              <firstterm>aspect ratio</firstterm> (ratio of
              height to width).
            </para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>
            <code>width</code> and <code>depth</code>
          </term>
          <listitem>
            <para>
              These attributes size the viewport.  If you
              specify the width as a percentage
              (<code>%</code>), it will be treated as a
              percentage of the available page width.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>
            <code>scale</code>
          </term>
          <listitem>
            <para>
              Resizes the graphic as a percentage of the
              original; omit the <code>%</code> symbol from the
              attribute value.  For example, to render a graphic
              half-size, use <code>scale="50"</code>.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>
            <code>scalefit</code>
          </term>
          <listitem>
            <para>
              If you specify <code>scalefit="1"</code>, the
              graphic will be scaled to fit the available
              area&mdash;either the graphic size or the viewport
              size, whichever is filled first.  If you specified
              no other sizing attributes, the graphic will be
              scaled to fit the page width.
            </para>
          </listitem>
        </varlistentry>
      </variablelist>
    </section> <!--figure-scaling-->
    <section id='inline-graphics'>
      <title>Inline graphics</title>
      <para>
        To include an inline figure in the middle of a paragraph,
        use the <sgmltag
        class="starttag">inlinemediaobject</sgmltag> element.
        Inside this element, place an <sgmltag
        class="starttag">imageobject</sgmltag> as above to
        specify the image, and also include a <sgmltag
        class="starttag">textobject</sgmltag> element with the
        text that should appear in situations where the image
        cannot be displayed, such as browsers for the visually
        impaired.
      </para>
      <para>Here is an example:</para>
      <para>Use this icon
        <inlinemediaobject>
          <imageobject>
            <imagedata fileref="circle-2.jpg"></imagedata>
          </imageobject>
          <textobject><phrase>Icon for circle by diameter</phrase>
          </textobject>
        </inlinemediaobject>
        to create a circle by specifying its diameter.</para>
      <para>And here is the source for this paragraph:</para>
      <screen><![CDATA[    <para>
      Use this icon
      <inlinemediaobject>
        <imageobject>
          <imagedata fileref="circle-2.jpg"/>
        </imageobject>
        <textobject><phrase>Icon for circle by diameter</phrase>
        </textobject>
      </inlinemediaobject>
      to create a circle by specifying its diameter.
    </para>]]></screen>
    </section> <!--inline-graphics-->
    <section id='screen-shots'>
      <title>How to get screen shots (Windows, MacOS, and Linux)</title>
      <para>
        To capture an image from your screen, follow the
        procedure below for your operating system.
      </para>
      <section id='ms-screen-shot'>
        <title>How to get a Windows screen shot</title>
        <para>
          On Windows 2000 and later systems, press the
          <keysym>PrintScrn</keysym> button.  This will take a
          shot of the entire screen.  You can then use the paste
          function in your favorite photo editor to make a copy
          of this screen shot, crop out the part you want, and so
          forth.
        </para>
      </section> <!--ms-screen-shot-->
      <section id='mac-screen-shot'>
        <title>How to get a MacOS screen shot</title>
        <para>
          To capture an image of a <emphasis>specific rectangular
          area</emphasis>, press <keysym >Apple-shift-4</keysym >
          (that is, while holding down the <keysym
          >Apple</keysym> and <keysym>shift</keysym > keys, press
          4).  The cursor will turn into a crosshair symbol.
          Move the mouse to one corner of the desired area, press
          and hold the left button, drag the mouse to the
          opposite corner of the area, and release the button.
          An icon named &ldquo;Picture 1&rdquo; (or other number)
          will appear in your desktop; this will contain the
          image of the selected area in PNG (Portable Network
          Graphics) format.
        </para>
        <para>
          To capture an image of <emphasis>one window</emphasis>,
          press <keysym >Apple-shift-4</keysym >, and when the
          cursor turns into a crosshair symbol, press the <keysym
          >space</keysym > bar.  The cursor turns into a picture
          of a camera.  Move the mouse into the window you want
          to photograph, and that window will turn slightly
          gray.  Click the left button and the image icon will
          appear on your desktop.
        </para>
        <para>
          To capture an image of the <emphasis>entire
          screen</emphasis>, use <keysym >Apple-shift-3</keysym >.
        </para>
      </section> <!--mac-screen-shot-->
      <section id='linux-screen-shot'>
        <title>How to get a screen shot under Linux</title>
        <para>
          Gimp, a public-domain package similar to Photoshop,
          makes it easy to get a screen shot.
        </para>
        <procedure>
          <step>
            <para>
              Bring up Gimp.  From the <guimenu >Start</guimenu >
              menu, select <guimenu >Graphics</guimenu >, then
              <guimenu >GIMP Image Editor</guimenu >.
            </para>
          </step>
          <step>
            <para>
              From the Gimp menu, select <guimenu >File</guimenu
              >, then <guimenu >Acquire</guimenu >, then <guimenu
              >Screen Shot...</guimenu >.
            </para>
          </step>
          <step>
            <para>
              To capture an image of one window, select the
              radiobutton for <guibutton >a Single
              Window</guibutton >, increase the delay time under
              <guibutton >Select Window After...Seconds
              Delay</guibutton >, and click <guibutton
              >OK</guibutton >.  After the delay you have
              specified, the cursor will turn into a crosshair
              symbol.  Move the cursor into the desired window
              and click the left mouse button.
            </para>
            <para>
              To capture an image of the entire screen, select
              the radiobutton for <guibutton >the Whole
              Screen</guibutton >, increase the delay time under
              <guibutton >Grab After ... Seconds Delay</guibutton
              >, and click OK.  After the delay you have
              specified, Gimp will take a snapshot of the whole
              screen.
            </para>
          </step>
          <step>
            <para>
              A window containing your snapshot will appear on
              your screen.  You can use Gimp to crop the image,
              adjust color and contrast, and the other usual
              photo processing options.  Most operations start
              by right-clicking on the image.
            </para>
          </step>
          <step>
            <para>
              To save the image to a file, move the mouse into
              the image window and right-click.  Then select
              <guimenu >File</guimenu >, then <guimenu >Save</guimenu >.
            </para>
            <para>
              You can navigate to any directory by clicking in
              the <guilabel >Folder</guilabel > window.  Click on
              &ldquo;<filename >../</filename >&rdquo; to go up
              one directory; to move down into a directory, click
              on that directory's name in the <guilabel
              >Folder</guilabel > window.
            </para>
            <para>
              Once you are in the right directory, type the name
              you want to give the graphics file in the <guilabel
              >Selection</guilabel > field, including the file
              type suffix such as <filename >.png</filename > or
              <filename >.jpg</filename >, and press <keysym
              >Enter</keysym >.
            </para>
          </step>
        </procedure>
      </section> <!--linux-screen-shot-->
    </section> <!--screen-shots-->
  </section> <!--image-section-->
  <section id='tables-section'>
    <title>Tables</title>
    <para>&DB; has extensive features that help you present data
      in a tabular form.  Here is an example of a small table:</para>
    <table frame="topbot" pgwide="0" id='free-throw-table'>
      <title>All-time NBA free throw percentages</title>
      <tgroup cols="4">
        <colspec colwidth="3*" align="left"  colnum="1" colname="player"/>
        <colspec colwidth="*"  align="right" colnum="2" colname="fta"/>
        <colspec colwidth="*"  align="right" colnum="3" colname="ftm"/>
        <colspec colwidth="*"  align="right" colnum="4" colname="pct"/>
        <thead>
          <row rowsep="1">
            <entry>Player</entry>
            <entry>FTA</entry>
            <entry>FTM</entry>
            <entry>Pct.</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry>Rick Barry</entry>
            <entry>4,243</entry>
            <entry>3,818</entry>
            <entry>.900</entry>
          </row>
          <row>
            <entry>Calvin Murphy</entry>
            <entry>3,864</entry>
            <entry>3,445</entry>
            <entry>.892</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
    <para>Here is how the XML source for the table
      looks:</para>
      <programlisting
><![CDATA[    <table frame="topbot" pgwide="0">
      <title>All-time NBA free throw percentages</title>
      <tgroup cols="4">
        <colspec colwidth="3*" align="left"  colnum="1" colname="player"/>
        <colspec colwidth="*"  align="right" colnum="2" colname="fta"/>
        <colspec colwidth="*"  align="right" colnum="3" colname="ftm"/>
        <colspec colwidth="*"  align="right" colnum="4" colname="pct"/>
        <thead>
          <row rowsep="1">
            <entry>Player</entry>
            <entry>FTA</entry>
            <entry>FTM</entry>
            <entry>Pct.</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry>Rick Barry</entry>
            <entry>4,243</entry>
            <entry>3,818</entry>
            <entry>.900</entry>
          </row>
          <row>
            <entry>Calvin Murphy</entry>
            <entry>3,864</entry>
            <entry>3,445</entry>
            <entry>.892</entry>
          </row>
        </tbody>
      </tgroup>
    </table>]]></programlisting>
    <para>
      Let's look at these tags and their attributes in detail:
    </para>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          The <sgmltag class="starttag">table</sgmltag> element
          encloses the entire table.  The attribute
          <code><sgmltag class="attribute"
          >frame="topbot"</sgmltag></code> specifies that ruled
          lines be placed over the top and bottom of the table as
          a while.  The attribute <code><sgmltag
          class="attribute" >pgwide="0"</sgmltag></code> tells
          &DB; to place the table within the current paragraph
          width.
        </para>
        <para>
          If a page break falls in the middle of a table, the
          heading will be repeated on the new page.
        </para>
      </listitem>
      <listitem>
        <para>
          Every table must be titled, so the next thing after the
          <sgmltag class="starttag">table</sgmltag> opening tag
          should be a <sgmltag class="starttag">title</sgmltag
          >...<sgmltag class="endtag">title</sgmltag> element.
        </para>
      </listitem>
      <listitem>
        <para>
          The <sgmltag class="starttag">tgroup</sgmltag> element
          encloses the entire rest of the table.  Its
          <code><sgmltag class="attribute"
          >cols=</sgmltag></code> attribute gives the number of
          columns for the table as a whole.
        </para>
      </listitem>
      <listitem>
        <para>
          There is a <sgmltag class="starttag">colspec</sgmltag>
          element for each column of the table that specifies how
          the column is to be presented.  The
          <code><sgmltag class="attribute"
          >colwidth</sgmltag></code> attribute specifies the
          width of the column.  In this example, we want the first
          column to be three times as wide as the other columns, so
          we use a value of
          <code><sgmltag class="attvalue"
          >"3*"</sgmltag></code> for the first column and
          <code><sgmltag class="attvalue"
          >"*"</sgmltag></code> for the rest.  The
          <code><sgmltag class="attribute"
          >align</sgmltag></code> attribute specifies whether
          the contents of each column are to be positioned to the
          left or right side.
        </para>
      </listitem>
      <listitem>
        <para>
          The <sgmltag class="starttag">thead</sgmltag> element
          encloses the heading section of the table.  The heading
          consists of a <sgmltag class="starttag">row</sgmltag>
          element containing one <sgmltag
          class="starttag">entry</sgmltag> element for each
          heading.  Note that the <sgmltag
          class="starttag">row</sgmltag> tag has an attribute
          <code><sgmltag class="attribute"
          >rowsep="1"</sgmltag></code> that places a ruled line
          after that row.  The rows in the table body do not have
          that attribute and are not separated by rules.
        </para>
      </listitem>
      <listitem>
        <para>
          The <sgmltag class="starttag">tbody</sgmltag> element
          comes after the last <sgmltag class="starttag">colspec</sgmltag>
          element, and encloses the actual body of the table.
        </para>
      </listitem>
      <listitem>
        <para>
          Each row of the table is enclosed in a <sgmltag
          class="starttag">row</sgmltag> element.
        </para>
      </listitem>
      <listitem>
        <para>
          Each cell in the table is enclosed within an
          <sgmltag class="starttag">entry</sgmltag> element.
        </para>
      </listitem>
    </itemizedlist>
    <para>
      The sections below discuss a number of ways you can control
      the appearance of your table, but not all details of table
      construction are covered.  For the full gory details, see
      the <ulink
      url="http://www.oasis-open.org/cover/tr9502.html"
      ><citetitle >CALS table model Document Type
      Definition</citetitle ></ulink>.
    </para>
    <section id='table-rules'>
      <title>Ruled lines in tables</title>
      <para>
        The default table appearance is to have
        <firstterm>rules</firstterm> (ruled lines) around the
        outside of the table and between all rows and columns.
      </para>
      <para>
        You can control where rules appear by adding attributes
        to the various start tags in your table.  There is a
        hierarchy of tags: attributes of the <sgmltag
        class="starttag">table</sgmltag> tag set values for the
        table as a whole.  Attributes of <sgmltag
        class="emptytag">colspec</sgmltag> set values for all
        entries in a column, and may override values set in the
        <sgmltag class="starttag">table</sgmltag> tag.
        Attributes of the <sgmltag class="starttag">row</sgmltag>
        and <sgmltag class="starttag">entry</sgmltag> tag can in
        turn override those values.
      </para>
      <para>
        The example table above shows this process.  The
        <code><sgmltag class="attribute"
        >frame="topbot"</sgmltag></code> attribute of the
        <sgmltag class="starttag">table</sgmltag> tag specifies
        that rules appear only above and below the table as a
        whole.  But the <code><sgmltag class="attribute"
        >rowsep="1"</sgmltag></code> attribute of the
        <sgmltag>row</sgmltag> tag for the first row overrides
        that specification, forcing a rule to appear below the
        first row.
      </para>
      <para>
        Here are the tags and attributes that affect ruled
        lines:
      </para>
      <itemizedlist spacing="compact">
        <listitem>
          <para>
            In the <sgmltag class="starttag">table</sgmltag> tag,
            the <code><sgmltag class="attribute"
            >frame=</sgmltag></code> attribute can have any of
            these values:
            <informaltable>
              <tgroup cols="2" align="left">
                <colspec colwidth="1*"/>
                <colspec colwidth="5*"/>
                <thead>
                  <row>
                    <entry>Value</entry>
                    <entry>Meaning</entry>
                  </row>
                </thead>
                <tbody>
                  <row>
                    <entry><code >all</code></entry>
                    <entry>Rules are placed above and below the table,
                      on the left and right sides, between
                      columns, and between rows.</entry>
				  </row>
				  <row>
					<entry>
                      <code>none</code>
                    </entry>
					<entry>
                      No rules are used in the table.
                    </entry>
				  </row>
                  <row>
                    <entry>
                      <code>sides</code>
                    </entry>
                    <entry>
                      Rules are placed only at the left and right
                      sides of the table.
                    </entry>
                  </row>
                  <row>
                    <entry>
                      <code>top</code>
                    </entry>
                    <entry>
                      A rule is placed only above the table.
                    </entry>
                  </row>
                  <row>
                    <entry>
                      <code>bottom</code >
                    </entry>
                    <entry>
                      A rule is placed only below the table.
                    </entry>
                  </row>
                  <row>
                    <entry>
                      <code>topbot</code>
                    </entry>
                    <entry>
                      Rules are placed above and below the table.
                    </entry>
                  </row>
                </tbody>
              </tgroup>
            </informaltable>
          </para>
        </listitem>
        <listitem>
          <para>
            Any of the tags
            <sgmltag class="starttag">table</sgmltag>,
            <sgmltag class="starttag">tgroup</sgmltag>,
            <sgmltag class="emptytag">colspec</sgmltag>, and
            <sgmltag class="starttag">entry</sgmltag> can have a
            <code><sgmltag class="attribute"
            >colsep="..."</sgmltag></code> attribute.
          </para>
          <para>
            Use <code><sgmltag class="attribute"
            >colsep=0</sgmltag></code> to suppress rules to the
            right of a column, or <code><sgmltag
            >colsep="1"</sgmltag></code> to place rules to the
            right of a column.
          </para>
          <para>
            The attribute for <sgmltag
            class="starttag">table</sgmltag> sets the default for
            the table as a whole; the attribute for <sgmltag
            class="starttag">tgroup</sgmltag> overrides the value
            for <sgmltag class="starttag">table</sgmltag>; and so
            forth, with the value for deeper elements overriding
            the values of all shallower elements.
          </para>
        </listitem>
        <listitem>
          <para>
            Any of the tags
            <sgmltag class="starttag">table</sgmltag>,
            <sgmltag class="starttag">tgroup</sgmltag>,
            <sgmltag class="starttag">row</sgmltag>, and
            <sgmltag class="starttag">entry</sgmltag> can have a
            <code><sgmltag class="attribute"
            >rowsep="..."</sgmltag></code> attribute.
          </para>
          <para>
            Use <code><sgmltag class="attribute"
            >rowsep=0</sgmltag></code> to suppress the rule below
            the row (or cell, for <sgmltag
            class="starttag">entry</sgmltag>).  Use
            <code><sgmltag >rowsep="1"</sgmltag></code> to place
            a rule below the row (or cell).
          </para>
          <para>
            As with the <code><sgmltag class="attribute"
            >colsep</sgmltag></code> attribute, values of this
            attribute for deeper elements override values in
            shallower elements.
          </para>
        </listitem>
      </itemizedlist>
    </section> <!--table-rules-->
    <section id='table-dims'>
      <title>Controlling table dimensions</title>
      <para>
        Normally, your table will be fit into the page width
        remaining after the current indentation level is
        subtracted from the total page width.  However, if you
        need more width, use a <code><sgmltag class="attribute"
        >pgwide="1"</sgmltag></code> attribute in your <sgmltag
        class="starttag">table</sgmltag> tag.  This will give you
        the whole width of the page to work with.
      </para>
      <para>
        Your other job is to distribute this width among the
        columns of the table.  You can do this in two ways:
      </para>
      <itemizedlist spacing="compact">
        <listitem>
          <para>
            You can assign a specific width to each column of the
            table.  However, this can make life more difficult
            for people reading the Web version of your document
            if their window is too narrow for your table.
          </para>
        </listitem>
        <listitem>
          <para>
            A better way is to specify the relative width of the
            columns.  The advantage of this method is that in Web
            form your table can be resized to conform to the
            width of the browser window.
          </para>
        </listitem>
      </itemizedlist>
      <para>
        Regardless of which method you use, the width of each
        column is specified in the <sgmltag
        class="emptytag">colspec colwidth="..."</sgmltag>
        attribute, which can take these values:
      </para>
      <itemizedlist spacing="compact">
        <listitem>
          <para>
            A number followed by a unit of measure.  Units
            include: <code>pt</code> (printer's points, about
            1/72 inch), <code>pi</code> (picas, about 1/6 inch),
            <code>mm</code> (millimeters), <code>cm</code>
            (centimeters), or <code>in</code> (inches).  For
            example, <code><sgmltag class="attribute"
            >colwidth="5.5cm"</sgmltag></code> would specify a
            width of 5.5 centimeters.
          </para>
        </listitem>
        <listitem>
          <para>
            A number followed by an asterisk.  This allows you to
            specify relative column widths.  With this method,
            all the numbers are added up, and the space is
            divided according to the coefficients.  The numbers
            can be integers or fixed-point constants such as
            <code >5.25</code>.
          </para>
          <para>
            For example, suppose your table has four columns and
            the values of the <code><sgmltag class="attribute"
            >colwidth</sgmltag></code> attribute are
            <code>"3*"</code>, <code>"*"</code>,
            <code>"2*"</code>, and <code>"2*"</code>.  The sum of
            these coefficients (the second value is the same as
            <code>"1*"</code>) is 8.  The resulting table would
            allocate 3/8 of the width to the first column, 1/8 of
            the width to the second column, and 1/4 of the width
            to each of the third and fourth columns.
          </para>
        </listitem>
      </itemizedlist>
    </section> <!--table-dims-->
    <section id='table-align'>
      <title>Controlling alignment in tables</title>
      <para>
        By <firstterm>alignment</firstterm>, we mean the
        positioning of elements within the cells of a table.
        Since most cells will not be filled exactly, we need ways
        of controlling where the content is placed within the
        cell, both horizontally and vertically.
      </para>
      <para>
        Horizontal alignment is controlled by the <code><sgmltag
        class="attribute" >align="..."</sgmltag></code>
        attribute.  This attribute can be used:
        <itemizedlist spacing="compact">
          <listitem>
            <para>
              in a <sgmltag class="starttag">tgroup</sgmltag> tag
              to set the default alignment for the table as a
              whole;
            </para>
          </listitem>
          <listitem>
            <para>
              in a <sgmltag class="emptytag">colspec</sgmltag>
              tag to set the default alignment for one column; or
            </para>
          </listitem>
          <listitem>
            <para>
              in an <sgmltag class="starttag">entry</sgmltag> tag
              to set the alignment for a specific cell.
            </para>
          </listitem>
        </itemizedlist>
        Attribute values for deeper elements override those for
        shallower elements.
      </para>
      <para>
        The value of the <code><sgmltag class="attribute"
        >align</sgmltag></code> attribute can be any of the
        following:
        <informaltable>
          <tgroup cols="2" align="left">
            <colspec colwidth="1*"/>
            <colspec colwidth="5*"/>
            <thead>
              <row>
                <entry>Value</entry>
                <entry>Meaning</entry>
              </row>
            </thead>
            <tbody>
              <row>
                <entry>
                  <code>left</code>
                </entry>
                <entry>
                  Content is aligned to the left side of each cell.
                </entry>
              </row>
              <row>
                <entry>
                  <code>right</code>
                </entry>
                <entry>
                  Content is aligned to the right side.
                </entry>
              </row>
              <row>
                <entry>
                  <code>center</code >
                </entry>
                <entry>
                  Content is centered.
                </entry>
              </row>
              <row>
                <entry>
                  <code>justify</code>
                </entry>
                <entry>
                  Text is shown as a justified paragraph, stretched
                  to the full width of the cell.
                </entry>
              </row>
            </tbody>
          </tgroup>
        </informaltable>
      </para>
      <para>
        Vertical alignment is controlled by the <code><sgmltag
        class="attribute" >valign="..."</sgmltag></code>
        attribute.  This attribute can be used:
        <itemizedlist spacing="compact">
          <listitem>
            <para>
              in a <sgmltag class="starttag">row</sgmltag> tag to
              set the default alignment for that row; or
            </para>
          </listitem>
          <listitem>
            <para>
              in an <sgmltag class="starttag">entry</sgmltag> tag
              to change the alignment of a single cell.
            </para>
          </listitem>
        </itemizedlist>
      </para>
      <para>
        The value of the <code><sgmltag class="attribute"
        >valign</sgmltag></code> attribute can be any of these:
        <informaltable>
          <tgroup cols="2" align="left">
            <colspec colwidth="1*"/>
            <colspec colwidth="5*"/>
            <thead>
              <row>
                <entry>Value</entry>
                <entry>Meaning</entry>
              </row>
            </thead>
            <tbody>
              <row>
                <entry>
                  <code>top</code>
                </entry>
                <entry>
                  Content is aligned to the top side of each
                  cell.
                </entry>
              </row>
              <row>
                <entry>
                  <code>middle</code>
                </entry>
                <entry>
                  Content is centered vertically in the cell.
                </entry>
              </row>
              <row>
                <entry>
                  <code>bottom</code >
                </entry>
                <entry>
                  Content is aligned to the bottom of the cell.
                </entry>
              </row>
            </tbody>
          </tgroup>
        </informaltable>
      </para>
    </section> <!--table-align-->
    <section id='table-span'>
      <title>Spanning in tables</title>
      <para>
        So far we have talked only about tables with a cell at the
        intersection of each row and column.  In the real world, though,
        we often need to <firstterm>span</firstterm> cells, that is,
        to combine two or more cells into a larger area that holds a
        single item.
      </para>
      <para>
        Here is a small table that demonstrates spanning.
        Note that the last two column headings are each centered over
        two columns:
      </para>
      <table id='venus-table'>
        <title>Rising and setting of Venus, 1994</title>
        <tgroup cols="6" align="right">
          <colspec align="left" colname="month"/>
          <colspec colname="day"/>
          <colspec colname="rise-20"/>
          <colspec colname="set-20"/>
          <colspec colname="rise-30"/>
          <colspec colname="set-30"/>
          <thead>
            <row>
              <entry namest="month" nameend="day"/>
              <entry namest="rise-20" nameend="set-20" align="center">
                20 degrees N. Lat.
              </entry>
              <entry namest="rise-30" nameend="set-30" align="center">
                30 degrees; N. Lat.
              </entry>
            </row>
            <row>
              <entry namest="month" nameend="day"/>
              <entry>Rise</entry>
              <entry>Set</entry>
              <entry>Rise</entry>
              <entry>Set</entry>
            </row>
          </thead>
          <tbody>
            <row>
              <entry>Jan.</entry>
              <entry>1</entry>
              <entry>6:21</entry>
              <entry>17:14</entry>
              <entry>6:43</entry>
              <entry>16:52</entry>
            </row>
            <row>
              <entry colname="day">11</entry>
              <entry>6:35</entry>
              <entry>17:31</entry>
              <entry>6:56</entry>
              <entry>17:10</entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      <para>Here's the source for the first part of this
        table:</para>
      <programlisting
><![CDATA[      <table>
        <title>Rising and setting of Venus, 1994</title>
        <tgroup cols="6" align="right">
          <colspec align="left" colname="month"/>
          <colspec colname="day"/>
          <colspec colname="rise-20"/>
          <colspec colname="set-20"/>
          <colspec colname="rise-30"/>
          <colspec colname="set-30"/>
          <thead>
            <row>
              <entry namest="month" nameend="day"/>
              <entry namest="rise-20" nameend="set-20" align="center">
                20 degrees N. Lat.
              </entry>
              <entry namest="rise-30" nameend="set-30" align="center">
                30 degrees; N. Lat.
              </entry>
            </row>]]></programlisting>
      <para>
        Note the additional <code><sgmltag
        class="attribute">colname</sgmltag ></code> attributes
        within the <sgmltag class="emptytag">colspec</sgmltag>
        tags.  These attributes give names to the columns of the
        table.  The spanned elements refer to these names in
        order to specify where the spanning starts and ends.  The
        <sgmltag class="starttag">entry</sgmltag> tags for a
        spanned element have attributes <code><sgmltag
        class="attribute"
        >namest="<replaceable>A</replaceable>"</sgmltag></code>
        and <code><sgmltag class="attribute"
        >nameend="<replaceable>B</replaceable>"</sgmltag></code>,
        where <replaceable>A</replaceable> is the column name
        where the span starts and <replaceable>B</replaceable> is
        the column name where the span ends.
      </para>
    </section> <!--table-span-->
  </section> <!--tables-section-->
  <section id='user-entities'>
    <title>User-defined entities</title>
    <para>
      You may wish to abbreviate a frequently-used word or phrase
      as an <firstterm>entity</firstterm> in your document.  This
      allows you to substitute a short string of the form
      <code>&amp;<replaceable>n</replaceable>;</code> wherever
      that word or phrase is used, and the full text will be
      substituted automatically.
    </para>
    <para>
      The entity's name part
      <code><replaceable>n</replaceable></code> is a symbolic
      name following the usual XML conventions (starting with a
      letter, and containing only letters, digits, underbars
      &ldquo;<code>_</code>&rdquo;, and hyphens
      &ldquo;<code>-</code>&rdquo;).
    </para>
    <para>
      Place your entity definitions in the
      <code>&lt;!DOCTYPE&gt;</code> declaration at
      the top of your document, enclosed in square brackets and
      just before the closing &ldquo;&gt;&rdquo;.  Each
      declaration looks like this:
      <screen
>    &lt;!ENTITY <replaceable
                >n</replaceable> "<replaceable>T</replaceable
                >"&gt;</screen>
      where <code><replaceable>n</replaceable></code>
      is the entity's name and <code><replaceable
      >T</replaceable></code> is the replacement text.
    </para>
    <para>
      For example, suppose you are developing a product under the
      internal code name Daisy, and you want to write the manual
      without having to know the final, public name of the
      product would be.  You can define an entity
      <code>&amp;Daisy;</code> as the text
      &ldquo;DaisyMatic&rdquo; by changing your document type
      declaration to look like this:
    </para>
    <programlisting
><![CDATA[<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
 [ <!ENTITY Daisy "DaisyMatic">
 ]
>]]></programlisting>
    <para>
      Then, when the marketing department decides that the
       external product name is going to be
      &ldquo;MegaMonsterMatic-3000&rdquo;, just change the replacement
      text and rebuild your document, and the new product name will
      appear everywhere:
    </para>
    <programlisting
><![CDATA[<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
 [ <!ENTITY Daisy "MegaMonsterMatic-3000">
 ]
>
]]></programlisting>
    <para>
      You can have any number of entity declarations between the
      square brackets &ldquo;<code>[...]</code>&rdquo;.
    </para>
  </section> <!--user-entities-->
  <section id='multiple-files'>
    <title>Breaking your document into multiple files</title>
    <para>
      For larger documents, it is often convenient to break
      the document into more than one file, so you can work on a
      specific chapter or section by itself.
    </para>
    <para>
      This is easy to do because of another type of entity
      declaration that you can put inside your
      <code>DOCTYPE</code>.  Here's the general form:
    </para>
    <programlisting
>    &lt;!ENTITY <replaceable
                >new-name</replaceable
                > SYSTEM "<replaceable
                >filename</replaceable>"&gt;</programlisting>
    <para>
      This defines a new entity named
      &ldquo;<code>&amp;<replaceable
      >new-name</replaceable>;</code>&rdquo;.  If this entity
      appears in your document, the effect is to insert the
      contents of file
      <filename><replaceable>filename</replaceable></filename> at
      that point.
    </para>
    <para>
      Here's an example.  Suppose you want to break your document
      up into four files&mdash;a top-level file named
      <filename>mydoc.xml</filename> and three subsidiary files
      named <filename>head.xml</filename>,
      <filename>body.xml</filename>, and
      <filename>tergum.xml</filename>.  File
      <filename>mydoc.xml</filename> might look like this:
    </para>
      <programlisting
>&lt;!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
  "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
  [ &lt;!ENTITY head SYSTEM "head.xml"&gt;
    &lt;!ENTITY body SYSTEM "body.xml"&gt;
    &lt;!ENTITY tail SYSTEM "tergum.xml"&gt;
  ]
&gt;
&lt;article&gt;
  &lt;articleinfo&gt;
    &hellip;  &lt;!-- Usual article info content here --&gt;
  &lt;/articleinfo&gt;
  &amp;head;
  &amp;body;
  &amp;tail;
&lt;/article&gt;</programlisting>
    <para>
      There is one drawback to this method.  If you are using
      special character entities such as <code>&amp;deg;</code>
      (the degree symbol, &deg;), your HTML and PDF output files
      will still build normally, but some editing tools (such as
      <ulink url="http://www.nmt.edu/tcc/help/pubs/nxml"
      ><application>emacs</application>
      <code>nxml-mode</code></ulink>) will no longer validate
      these character entities, because they see only the current
      file, and in the subsidiary files there is no
      <code>&lt;!DOCTYPE&gt;</code> declaration to tell them
      where the entities are defined.
    </para>
    <para>
      The workaround for this problem is to use the alternate
      form for each entity that uses the hexadecimal Unicode
      character value.  For example, the degree symbol entity
      &ldquo;<code>&amp;deg;</code>&rdquo; can also be expressed
      as &ldquo;<code>&amp;#x00b0;</code >&rdquo;.  For a
      complete list of all special character entities in both
      name and numeric form, see <xref linkend="special-chars"/>.
    </para>
  </section> <!--multiple-files-->
  <section id='special-chars'>
    <title>Special characters</title>
    <para>
      Entities for these five special characters are always
      available:
    </para>
    <informaltable>
      <tgroup cols="2">
        <colspec colwidth="5em" align="left"></colspec>
        <colspec colwidth="2em" align="center"></colspec>
        <tbody>
          <row>
            <entry valign="top"><code>&amp;lt;</code></entry>
            <entry valign="top">&lt;</entry>
          </row>
          <row>
            <entry valign="top"><code>&amp;gt;</code></entry>
            <entry valign="top">&gt;</entry>
          </row>
          <row>
            <entry valign="top"><code>&amp;amp;</code></entry>
            <entry valign="top">&amp;</entry>
          </row>
          <row>
            <entry valign="top"><code>&amp;apos;</code></entry>
            <entry valign="top">&apos;</entry>
          </row>
          <row>
            <entry valign="top"><code>&amp;quot;</code></entry>
            <entry valign="top">&quot;</entry>
          </row>
        </tbody>
      </tgroup>
    </informaltable>
    <para>DocBook supports a modest set of letters with
      diacritical marks.  Use the <firstterm>entity
      name</firstterm> shown in the first column to get the
      character shown in the second column.  The third column
      shows an alternative form using a numeric value; such
      entities are less user-friendly but may be necessary in
      some circumstances.</para>
    <informaltable>
      <tgroup cols="3">
        <colspec colwidth="7em" align="left"></colspec>
        <colspec colwidth="7em" align="center"></colspec>
        <colspec colwidth="7em" align="left"></colspec>
        <thead>
          <row>
            <entry>Entity</entry>
            <entry>Character</entry>
            <entry>Equivalent</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry><code>&amp;aacute;</code></entry>
            <entry>&aacute;</entry>
            <entry><code>&amp;#x00e1;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Aacute;</code></entry>
            <entry>&Aacute;</entry>
            <entry><code>&amp;#x00c1;</code></entry>
          </row>
          <row>
            <entry><code>&amp;acirc;</code></entry>
            <entry>&acirc;</entry>
            <entry><code>&amp;#x00e2;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Acirc;</code></entry>
            <entry>&Acirc;</entry>
            <entry><code>&amp;#x00c2;</code></entry>
          </row>
          <row>
            <entry><code>&amp;agrave;</code></entry>
            <entry>&agrave;</entry>
            <entry><code>&amp;#x00e0;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Agrave;</code></entry>
            <entry>&Agrave;</entry>
            <entry><code>&amp;#x00c0;</code></entry>
          </row>
          <row>
            <entry><code>&amp;aring;</code></entry>
            <entry>&aring;</entry>
            <entry><code>&amp;#x00e5;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Aring;</code></entry>
            <entry>&Aring;</entry>
            <entry><code>&amp;#x00c5;</code></entry>
          </row>
          <row>
            <entry><code>&amp;atilde;</code></entry>
            <entry>&atilde;</entry>
            <entry><code>&amp;#x00e3;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Atilde;</code></entry>
            <entry>&Atilde;</entry>
            <entry><code>&amp;#x00c3;</code></entry>
          </row>
          <row>
            <entry><code>&amp;auml;</code></entry>
            <entry>&auml;</entry>
            <entry><code>&amp;#x00e4;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Auml;</code></entry>
            <entry>&Auml;</entry>
            <entry><code>&amp;#x00c4;</code></entry>
          </row>
          <row>
            <entry><code>&amp;aelig;</code></entry>
            <entry>&aelig;</entry>
            <entry><code>&amp;#x00e6;</code></entry>
          </row>
          <row>
            <entry><code>&amp;AElig;</code></entry>
            <entry>&AElig;</entry>
            <entry><code>&amp;#x00c6;</code></entry>
          </row>
          <row>
            <entry><code>&amp;ccedil;</code></entry>
            <entry>&ccedil;</entry>
            <entry><code>&amp;#x00e7;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Ccedil;</code></entry>
            <entry>&Ccedil;</entry>
            <entry><code>&amp;#x00c7;</code></entry>
          </row>
          <row>
            <entry><code>&amp;eth;</code></entry>
            <entry>&eth;</entry>
            <entry><code>&amp;#x00f0;</code></entry>
          </row>
          <row>
            <entry><code>&amp;ETH;</code></entry>
            <entry>&ETH;</entry>
            <entry><code>&amp;#x00e9;</code></entry>
          </row>
          <row>
            <entry><code>&amp;eacute;</code></entry>
            <entry>&eacute;</entry>
            <entry><code>&amp;#x00e9;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Eacute;</code></entry>
            <entry>&Eacute;</entry>
            <entry><code>&amp;#x00c9;</code></entry>
          </row>
          <row>
            <entry><code>&amp;ecirc;</code></entry>
            <entry>&ecirc;</entry>
            <entry><code>&amp;#x00ea;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Ecirc;</code></entry>
            <entry>&Ecirc;</entry>
            <entry><code>&amp;#x00ca;</code></entry>
          </row>
          <row>
            <entry><code>&amp;egrave;</code></entry>
            <entry>&egrave;</entry>
            <entry><code>&amp;#x00e8;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Egrave;</code></entry>
            <entry>&Egrave;</entry>
            <entry><code>&amp;#x00c8;</code></entry>
          </row>
          <row>
            <entry><code>&amp;euml;</code></entry>
            <entry>&euml;</entry>
            <entry><code>&amp;#x00eb;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Euml;</code></entry>
            <entry>&Euml;</entry>
            <entry><code>&amp;#x00cb;</code></entry>
          </row>
          <row>
            <entry><code>&amp;iacute;</code></entry>
            <entry>&iacute;</entry>
            <entry><code>&amp;#x00ed;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Iacute;</code></entry>
            <entry>&Iacute;</entry>
            <entry><code>&amp;#x00cd;</code></entry>
          </row>
          <row>
            <entry><code>&amp;icirc;</code></entry>
            <entry>&icirc;</entry>
            <entry><code>&amp;#x00ee;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Icirc;</code></entry>
            <entry>&Icirc;</entry>
            <entry><code>&amp;#x00ce;</code></entry>
          </row>
          <row>
            <entry><code>&amp;igrave;</code></entry>
            <entry>&igrave;</entry>
            <entry><code>&amp;#x00ec;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Igrave;</code></entry>
            <entry>&Igrave;</entry>
            <entry><code>&amp;#x00cc;</code></entry>
          </row>
          <row>
            <entry><code>&amp;iuml;</code></entry>
            <entry>&iuml;</entry>
            <entry><code>&amp;#x00ef;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Iuml;</code></entry>
            <entry>&Iuml;</entry>
            <entry><code>&amp;#x00cf;</code></entry>
          </row>
          <row>
            <entry><code>&amp;ntilde;</code></entry>
            <entry>&ntilde;</entry>
            <entry><code>&amp;#x00f1;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Ntilde;</code></entry>
            <entry>&Ntilde;</entry>
            <entry><code>&amp;#x00d1;</code></entry>
          </row>
          <row>
            <entry><code>&amp;oacute;</code></entry>
            <entry>&oacute;</entry>
            <entry><code>&amp;#x00f3;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Oacute;</code></entry>
            <entry>&Oacute;</entry>
            <entry><code>&amp;#x00d3;</code></entry>
          </row>
          <row>
            <entry><code>&amp;ocirc;</code></entry>
            <entry>&ocirc;</entry>
            <entry><code>&amp;#x00f4;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Ocirc;</code></entry>
            <entry>&Ocirc;</entry>
            <entry><code>&amp;#x00d4;</code></entry>
          </row>
          <row>
            <entry><code>&amp;ograve;</code></entry>
            <entry>&ograve;</entry>
            <entry><code>&amp;#x00f2;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Ograve;</code></entry>
            <entry>&Ograve;</entry>
            <entry><code>&amp;#x00d2;</code></entry>
          </row>
          <row>
            <entry><code>&amp;oslash;</code></entry>
            <entry>&oslash;</entry>
            <entry><code>&amp;#x00f8;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Oslash;</code></entry>
            <entry>&Oslash;</entry>
            <entry><code>&amp;#x00d8;</code></entry>
          </row>
          <row>
            <entry><code>&amp;otilde;</code></entry>
            <entry>&otilde;</entry>
            <entry><code>&amp;#x00f5;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Otilde;</code></entry>
            <entry>&Otilde;</entry>
            <entry><code>&amp;#x00d5;</code></entry>
          </row>
          <row>
            <entry><code>&amp;ouml;</code></entry>
            <entry>&ouml;</entry>
            <entry><code>&amp;#x00f6;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Ouml;</code></entry>
            <entry>&Ouml;</entry>
            <entry><code>&amp;#x00d6;</code></entry>
          </row>
          <row>
            <entry><code>&amp;szlig;</code></entry>
            <entry>&szlig;</entry>
            <entry><code>&amp;#x00df;</code></entry>
          </row>
          <row>
            <entry><code>&amp;thorn;</code></entry>
            <entry>&thorn;</entry>
            <entry><code>&amp;#x00fe;</code></entry>
          </row>
          <row>
            <entry><code>&amp;THORN;</code></entry>
            <entry>&THORN;</entry>
            <entry><code>&amp;#x00de;</code></entry>
          </row>
          <row>
            <entry><code>&amp;uacute;</code></entry>
            <entry>&uacute;</entry>
            <entry><code>&amp;#x00fa;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Uacute;</code></entry>
            <entry>&Uacute;</entry>
            <entry><code>&amp;#x00da;</code></entry>
          </row>
          <row>
            <entry><code>&amp;ucirc;</code></entry>
            <entry>&ucirc;</entry>
            <entry><code>&amp;#x00fb;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Ucirc;</code></entry>
            <entry>&Ucirc;</entry>
            <entry><code>&amp;#x00db;</code></entry>
          </row>
          <row>
            <entry><code>&amp;ugrave;</code></entry>
            <entry>&ugrave;</entry>
            <entry><code>&amp;#x00f9;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Ugrave;</code></entry>
            <entry>&Ugrave;</entry>
            <entry><code>&amp;#x00d9;</code></entry>
          </row>
          <row>
            <entry><code>&amp;uuml;</code></entry>
            <entry>&uuml;</entry>
            <entry><code>&amp;#x00fc;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Uuml;</code></entry>
            <entry>&Uuml;</entry>
            <entry><code>&amp;#x00dc;</code></entry>
          </row>
          <row>
            <entry><code>&amp;yacute;</code></entry>
            <entry>&yacute;</entry>
            <entry><code>&amp;#x00fd;</code></entry>
          </row>
          <row>
            <entry><code>&amp;Yacute;</code></entry>
            <entry>&Yacute;</entry>
            <entry><code>&amp;#x00dd;</code></entry>
          </row>
          <row>
            <entry><code>&amp;yuml;</code></entry>
            <entry>&yuml;</entry>
            <entry><code>&amp;#x00ff;</code></entry>
          </row>
        </tbody>
      </tgroup>
    </informaltable>
    <para>
      Also supported are a wide variety of special symbols.
      Refer to O'Reilly's book <citetitle>DocBook</citetitle> for
      a complete list.  Here is a selection:
    </para>
    <informaltable>
      <tgroup cols="4">
        <colspec colwidth="3*" align="left"></colspec>
        <colspec colwidth="1*" align="center"></colspec>
        <colspec colwidth="3*" align="left"></colspec>
        <colspec colwidth="8*" align="left"></colspec>
        <tbody>
          <row>
            <entry><code>&amp;brvbar;</code></entry>
            <entry>&brvbar;</entry>
            <entry><code>&amp;#x00a6;</code></entry>
            <entry>Broken vertical bar</entry>
          </row>
          <row>
            <entry><code>&amp;cent;</code></entry>
            <entry>&cent;</entry>
            <entry><code>&amp;#x00a2;</code></entry>
            <entry>Cents</entry>
          </row>
<!--For some unknown reason, possibly related to the printer upgrades
    of Dec. 2005, this character no longer prints on any TCC printer.
    Leave it out for now; it's not exactly mission critical.
    (J. Shipman, 2005-12-22)
          <row>
            <entry><code>&amp;check;</code></entry>
            <entry>&check;</entry>
            <entry><code>&amp;#x2713;</code></entry>
            <entry>Check-mark</entry>
          </row>
-->
          <row>
            <entry><code>&amp;copy;</code></entry>
            <entry>&copy;</entry>
            <entry><code>&amp;#x00a9;</code></entry>
            <entry>Copyright</entry>
          </row>
          <row>
            <entry><code>&amp;curren;</code></entry>
            <entry>&curren;</entry>
            <entry><code>&amp;#x00a4;</code></entry>
            <entry>Currency symbol</entry>
          </row>
          <row>
            <entry><code>&amp;dagger;</code></entry>
            <entry>&dagger;</entry>
            <entry><code>&amp;#x2020;</code></entry>
            <entry>Dagger</entry>
          </row>
          <row>
            <entry><code>&amp;Dagger;</code></entry>
            <entry>&Dagger;</entry>
            <entry><code>&amp;#x2021;</code></entry>
            <entry>Double dagger</entry>
          </row>
          <row>
            <entry><code>&amp;deg;</code></entry>
            <entry>&deg;</entry>
            <entry><code>&amp;#x00b0;</code></entry>
            <entry>Degree symbol</entry>
          </row>
          <row>
            <entry><code>&amp;divide;</code></entry>
            <entry>&divide;</entry>
            <entry><code>&amp;#x00f7;</code></entry>
            <entry>Division</entry>
          </row>
          <row>
            <entry><code>&amp;darr;</code></entry>
            <entry>&darr;</entry>
            <entry><code>&amp;#x2193;</code></entry>
            <entry>Down arrow</entry>
          </row>
          <row>
            <entry><code>&amp;hellip;</code></entry>
            <entry>&hellip;</entry>
            <entry><code>&amp;#x2026;</code></entry>
            <entry>Horizontal ellipsis</entry>
          </row>
          <row>
            <entry><code>&amp;iexcl;</code></entry>
            <entry>&iexcl;</entry>
            <entry><code>&amp;#x00a1;</code></entry>
            <entry>Inverted exclamation point</entry>
          </row>
          <row>
            <entry><code>&amp;iquest;</code></entry>
            <entry>&iquest;</entry>
            <entry><code>&amp;#x00bf;</code></entry>
            <entry>Inverted question mark</entry>
          </row>
          <row>
            <entry><code>&amp;laquo;</code></entry>
            <entry>&laquo;</entry>
            <entry><code>&amp;#x00ab;</code></entry>
            <entry>Left double angle quotes</entry>
          </row>
          <row>
            <entry><code>&amp;larr;</code></entry>
            <entry>&larr;</entry>
            <entry><code>&amp;#x2190;</code></entry>
            <entry>Left arrow</entry>
          </row>
          <row>
            <entry><code>&amp;ldquo;</code></entry>
            <entry>&ldquo;</entry>
            <entry><code>&amp;#x201c;</code></entry>
            <entry>Left double quote</entry>
         </row>
          <row>
            <entry><code>&amp;ldquor;</code></entry>
            <entry>&ldquor;</entry>
            <entry><code>&amp;#x201e;</code></entry>
            <entry>Double low-nine quote</entry>
          </row>
          <row>
            <entry><code>&amp;lsquo;</code></entry>
            <entry>&lsquo;</entry>
            <entry><code>&amp;#x2018;</code></entry>
            <entry>Left single quote</entry>
          </row>
          <row>
            <entry><code>&amp;lsquor;</code></entry>
            <entry>&lsquor;</entry>
            <entry><code>&amp;#x201a;</code></entry>
            <entry>Single low-nine quote</entry>
          </row>
          <row>
            <entry><code>&amp;mdash;</code></entry>
            <entry>&mdash;</entry>
            <entry><code>&amp;#x2014;</code></entry>
            <entry>Em-dash</entry>
          </row>
          <row>
            <entry><code>&amp;middot;</code></entry>
            <entry>&middot;</entry>
            <entry><code>&amp;#x00b7;</code></entry>
            <entry>Middle dot</entry>
          </row>
          <row>
            <entry><code>&amp;nbsp;</code></entry>
            <entry>&nbsp;</entry>
            <entry><code>&amp;#x00a0;</code></entry>
            <entry>Non-breaking space</entry>
          </row>
          <row>
            <entry><code>&amp;ndash;</code></entry>
            <entry>&ndash;</entry>
            <entry><code>&amp;#x2013;</code></entry>
            <entry>En-dash</entry>
          </row>
          <row>
            <entry><code>&amp;para;</code></entry>
            <entry>&para;</entry>
            <entry><code>&amp;#x00b6;</code></entry>
            <entry>Paragraph (pilcrow) symbol</entry>
          </row>
          <row>
            <entry><code>&amp;plusmn;</code></entry>
            <entry>&plusmn;</entry>
            <entry><code>&amp;#x00b1;</code></entry>
            <entry>Plus or minus</entry>
          </row>
          <row>
            <entry><code>&amp;pound;</code></entry>
            <entry>&pound;</entry>
            <entry><code>&amp;#x00a3;</code></entry>
            <entry>Pounds sterling</entry>
          </row>
          <row>
            <entry><code>&amp;prime;</code></entry>
            <entry>&prime;</entry>
            <entry><code>&amp;#x2032;</code></entry>
            <entry>Prime</entry>
          </row>
          <row>
            <entry><code>&amp;Prime;</code></entry>
            <entry>&Prime;</entry>
            <entry><code>&amp;#x2033;</code></entry>
            <entry>Double prime</entry>
          </row>
          <row>
            <entry><code>&amp;raquo;</code></entry>
            <entry>&raquo;</entry>
            <entry><code>&amp;#x00bb;</code></entry>
            <entry>Right double angle quotes</entry>
          </row>
          <row>
            <entry><code>&amp;rarr;</code></entry>
            <entry>&rarr;</entry>
            <entry><code>&amp;#x2192;</code></entry>
            <entry>Right arrow</entry>
          </row>
          <row>
            <entry><code>&amp;rdquo;</code></entry>
            <entry>&rdquo;</entry>
            <entry><code>&amp;#x201d;</code></entry>
            <entry>Right double quote</entry>
          </row>
          <row>
            <entry><code>&amp;reg;</code></entry>
            <entry>&reg;</entry>
            <entry><code>&amp;#x00ae;</code></entry>
            <entry>Registered</entry>
          </row>
          <row>
            <entry><code>&amp;rdquor;</code></entry>
            <entry>&rdquor;</entry>
            <entry><code>&amp;#x201d;</code></entry>
            <entry>Double high reversed quote</entry>
          </row>
          <row>
            <entry><code>&amp;rsquo;</code></entry>
            <entry>&rsquo;</entry>
            <entry><code>&amp;#x2019;</code></entry>
            <entry>Right single quote</entry>
          </row>
          <row>
            <entry><code>&amp;rsquor;</code></entry>
            <entry>&rsquor;</entry>
            <entry><code>&amp;#x201f;</code></entry>
            <entry>Single high reversed quote</entry>
         </row>
          <row>
            <entry><code>&amp;sect;</code></entry>
            <entry>&sect;</entry>
            <entry><code>&amp;#x00a7;</code></entry>
            <entry>Section symbol</entry>
          </row>
          <row>
            <entry><code>&amp;times;</code></entry>
            <entry>&times;</entry>
            <entry><code>&amp;#x00d7;</code></entry>
            <entry>Multiplication</entry>
          </row>
          <row>
            <entry><code>&amp;trade;</code></entry>
            <entry>&trade;</entry>
            <entry><code>&amp;#x2122;</code></entry>
            <entry>Trademark</entry>
          </row>
          <row>
            <entry><code>&amp;uarr;</code></entry>
            <entry>&uarr;</entry>
            <entry><code>&amp;#x2191;</code></entry>
            <entry>Up arrow</entry>
          </row>
          <row>
            <entry><code>&amp;yen;</code></entry>
            <entry>&yen;</entry>
            <entry><code>&amp;#x00a5;</code></entry>
            <entry>Yen symbol</entry>
          </row>
        </tbody>
      </tgroup>
    </informaltable>
  </section> <!--special-chars-->
  <section id='fop'>
    <title>FOP:  An older, free toolchain</title>
    <para>
      This document assumes that you have XEP, a commercial
      product from <ulink
      url="http://www.renderx.com/">RenderX</ulink>.  DocBook can
      also be processed using an open-source product, <ulink
      url="http://xml.apache.org/fop/">FOP from Apache</ulink>.
    </para>
    <para>
      The Tech Computer Center no longer supports the locally
      customized DocBook installation that works with FOP, but it
      is still available.
    </para>
    <para>
      The software is generally reliable, but has the following
      specific limitations and problems.
    </para>
    <section id='fop-limitations'>
      <title>FOP limitations</title>
      <para>
        These features of XEP won't work in the FOP toolchain:
      </para>
      <itemizedlist spacing="compact">
        <listitem>
          <para>
            You can't use any of the common entities such as
            <code>&amp;ldquo;</code> for left double-quote.
          </para>
        </listitem>
        <listitem>
          <para>
            Graphics in PNG format are not supported.
          </para>
        </listitem>
        <listitem>
          <para>
            <link linkend="user-entities">User-defined
            entities</link> will not work.
          </para>
        </listitem>
      </itemizedlist>
    </section> <!--fop-limitations-->
    <section id='page-break-bug'>
      <title>Bad page breaks</title>
      <para>
        Sometimes a section or subsection title will appear at
        the bottom of a page, with the first line of the
        following paragraph at the top of the next page.
      </para>
    </section> <!--page-break-bug-->
    <section id='table-in-list-bug'>
      <title>Using tables inside <sgmltag
        class="starttag">listitem</sgmltag></title>
      <para>
        If you use a <sgmltag class="starttag">table</sgmltag> or
        <sgmltag class="starttag">informaltable</sgmltag> inside
        a <sgmltag class="starttag">listitem</sgmltag> element
        (which in turn is part of a <sgmltag
        class="starttag">itemizedlist</sgmltag> or <sgmltag
        class="starttag">variablelist</sgmltag> construct), the
        Flow Object Processor (FOP) will loop endlessly.
      </para>
    </section> <!--table-in-list-bug-->
    <section id='fig-bugs'>
      <title>Graphics file support</title>
      <para>
        PNG (Portable Network Graphics) and EPS (Encapsulated
        PostScript) graphics files are not currently supported.
      </para>
    </section> <!--fig-bugs-->
  </section> <!--fop-->
  <section id='convert-4-1-section'>
	<title>Converting &DB;-SGML 4.1 documents</title>
	<para>
      If you have a document built under SGML-based &DB;,
      follow these steps to convert it to XML.
    </para>
    <procedure>
      <step>
        <para>
          Replace the <code>&lt;!DOCTYPE...&gt;</code>
          declaration at the top of your document with the one
          from the first two lines of the <code>model</code> file
          in your working directory (assuming you followed the
          <link linkend="setup-section">directory setup
          procedure</link> above), or use <filename
          >/u/www/docs/tcc/help/pubs/docbook43/user-kit/model</filename
          >.
        </para>
      </step>
      <step>
        <para>
          If you use pictures and other graphics, refer to the
          section above on <link
          linkend="image-section">including graphics</link>.  At
          this writing, only JPG and GIF formats are
          supported.
        </para>
      </step>
    </procedure>
  </section> <!--convert-4-1-section-->
  <section id='convert-3-0-section'>
	<title>Converting &DB; 3.0 documents</title>
	<para>
      If you have a document that worked under the old 3.0 version
      of &DB;, converting it is a simple matter:
    </para>
	<itemizedlist spacing="compact">
	  <listitem>
        <para>
          Move the <sgmltag class="starttag">title</sgmltag>
          element from its old position inside the <sgmltag
          class="starttag">artheader</sgmltag> element, to a
          position immediately after the <sgmltag
          class="starttag">article</sgmltag> element at the very
          beginning of the document.
        </para>
      </listitem>
	  <listitem>
        <para>
          Change the <sgmltag
          class="starttag">artheader</sgmltag> tag and its
          closing <sgmltag class="endtag">artheader</sgmltag> tag
          to <sgmltag class="starttag">articleinfo</sgmltag >
          ... <sgmltag
          class="endtag">articleinfo</sgmltag>.
        </para>
	  </listitem>
	</itemizedlist>
  </section> <!--convert-3-0-section-->
</article>
