<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
 [
    <!ENTITY  selfName       "docbook43">
    <!ENTITY  nmtURL         "http://www.nmt.edu/">
    <!ENTITY  tccURL         "&nmtURL;tcc/">
    <!ENTITY  helpURL        "&tccURL;help/">
    <!ENTITY  pubsURL        "&helpURL;pubs/">
    <!ENTITY  selfURL        "&pubsURL;&selfName;/">
    <!ENTITY  selfPDFName    "&selfName;.pdf">
    <!ENTITY  selfPDFFile    "<filename>&selfPDFName;</filename>">
    <!ENTITY  selfXMLName    "&selfName;.xml">
    <!ENTITY  selfXMLFile    "<filename>&selfXMLName;</filename>">
    <!ENTITY  modelXMLName   "model.xml">
    <!ENTITY  modelXMLFile   "<filename>&modelXMLName;</filename>">
    <!ENTITY  makefileName   "Makefile">
    <!ENTITY  makefileFile   "<filename>&makefileName;</filename>">
    <!ENTITY  makeBasicName  "make-basic">
    <!ENTITY  makeBasicFile  "<filename>&makeBasicName;</filename>">
    <!ENTITY  makeLitName    "make-lit">
    <!ENTITY  makeLitFile    "<filename>&makeLitName;</filename>">
    <!ENTITY  makeLargeName  "make-large">
    <!ENTITY  makeLargeFile  "<filename>&makeLargeName;</filename>">

    <!ENTITY  tccstyleURL    "&tccURL;doc/docbook43/ims/web/">

    <!ENTITY  nxmlURL        "&pubsURL;nxml/">
    <!ENTITY  projectsURL    "&tccURL;projects/">
    <!ENTITY  dbindexName    "docbookindex">
    <!ENTITY  dbindexApp     "<application>&dbindexName;</application>">
    <!ENTITY  dbindexURL     "&projectsURL;&dbindexName;/">

    <!ENTITY  DB             "DocBook">
    <!ENTITY  TeX            "<application>TeX</application>">
    <!ENTITY  LaTeX          "<application>LaTeX</application>">
    <!ENTITY  make           "<application >make</application >">

    <!--External web sites referenced
     !-->
    <!ENTITY  litprogURL     "&nmtURL;~shipman/soft/litprog/">
    <!ENTITY  litlxmlName    "litlxml">
    <!ENTITY  litlxmlApp     "<application>&litlxmlName;</application>">
    <!ENTITY  litlxmlURL
        "&helpURL;lang/python/examples/&litlxmlName;">

    <!ENTITY  forgeURL       "http://docbook.sourceforge.net/">
    <!ENTITY  mssURL         "&forgeURL;projects/xsl/">
    <!ENTITY  xmlStandard  "http://www.xml.com/axml/testaxml.htm">
    <!ENTITY  dbdtdURL
        "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
    <!ENTITY  pokeyURL     "http://yellow5.com/pokey/">
    <!ENTITY  calsURL      "http://www.oasis-open.org/cover/tr9502.html">
    <!ENTITY  charsURL     "http://www.w3.org/TR/xml-entity-names/">
    <!ENTITY  renderxURL   "http://www.renderx.com/">
    <!ENTITY  fopURL       "http://xml.apache.org/fop/">
    <!ENTITY  wikipedia    "http://en.wikipedia.org/wiki/">
    <!ENTITY  htaccess SYSTEM ".htaccess">
 ]
>
<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.51 $</revnumber>
        <date>$Date: 2013/04/06 01:41:14 $</date>
      </revision>
    </revhistory>
    <abstract>
      <para>
        Describes a system for writing general documentation for
        presentation in both Web and PDF form.
      </para>
      <para>
        This publication is available in <ulink url="&selfURL;"
        >Web form</ulink > and also as a <ulink
        url="&selfURL;docbook43.pdf" >PDF document</ulink >.
        Please forward any comments to <userinput
        >tcc-doc@nmt.edu</userinput >.
      </para>
    </abstract>
  </articleinfo>
  <section id='advantages-section'>
    <title>Advantages of &DB;</title>
    <para>
      The &DB; system has these advantages over other methods
      of creating documentation:
    </para>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          The same document can be translated mechanically to
          both Web-based and printable
          formats.
        </para>
      </listitem>
      <listitem>
        <para>
          You as an author can concentrate on the content
          of your document, without worrying about how it will
          appear.
        </para>
      </listitem>
    </itemizedlist>
    <para>
      The Tech Computer Center supplies a locally-customized
      installation of the &DB; translation software for output to
      PDF or Web form.
    </para>
    <itemizedlist spacing='compact'>
      <listitem>
        <para>
          The <ulink url='&mssURL;' >Modular Style Sheets web
          site</ulink > provides a base set of HTML and PDF
          stylesheets.  You may use these as the basis for
          your own customizations.
        </para>
      </listitem>
      <listitem>
        <para>
          <ulink url='&tccstyleURL;' ><citetitle >Customization
          of the 4.3 <application >DocBook XSL
          Stylesheets</application > for the TCC</citetitle
          ></ulink > describes how the Modular Style Sheets were
          customized for this location.
        </para>
      </listitem>
    </itemizedlist>
    <para>
      The 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.
    </para>
    <note>
      <para>
        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.
      </para>
    </note>
  </section> <!--advantages-section-->
  <section id='online-files'>
    <title>Relevant online files</title>
    <para>
      A number of files referenced in this document are available
      online.
    </para>
    <itemizedlist>
      <listitem>
        <para>
          <ulink url='&selfURL;&modelXMLName;'
          >&modelXMLFile;</ulink >: A starter DocBook XML file.
        </para>
      </listitem>
      <listitem>
        <para>
          <ulink url='&selfURL;&makeBasicName;'
          >&makeBasicFile;</ulink >: A starter &makefileFile;
          file.  See <xref linkend='make-basic' />.
        </para>
      </listitem>
      <listitem>
        <para>
          <ulink url='&selfURL;&makeLitName;'
          >&makeLitFile;</ulink >: Variant &makefileFile; for
          lightweight literate programming; see <xref
          linkend='make-lit' />.
        </para>
      </listitem>
      <listitem>
        <para>
          <ulink url='&selfURL;&makeLargeName;'
          >&makeLargeFile;</ulink >: Variant &makefileFile; to
          implement the technique described in <xref
          linkend='decluttering' />; see <xref
          linkend='make-large' />.
        </para>
      </listitem>
      <listitem>
        <para>
          <ulink url='&selfURL;logo.png'><filename
          >logo.png</filename ></ulink> is the TCC logo, to be
          used on Web pages.  If you are not writing an official
          TCC document, you can replace this with your own
          artwork, 2&#x2033; wide, with a transparent background.
        </para>
      </listitem>
      <listitem>
        <para>
          <ulink url='&selfURL;logo.jpg' ><filename
          >logo.jpg</filename ></ulink> is the JPG version of the
          TCC logo, to be used in PDF output.  May be replaced by
          your own artwork, 2&#x2033; wide.
        </para>
      </listitem>
      <listitem>
        <para>
          <ulink url='&selfURL;&selfXMLName;'
          >&selfXMLFile;</ulink >: The source file for the
          document you are now reading, this file contains
          examples of every construct including tables,
          figures, and mathematical equations.
        </para>
        <note>
          <para>
            If you bring up this file in a browser, what you see
            will not be the exact source.  In particular, the
            internal entities (see <xref linkend='user-entities'
            />) will be replaced by their equivalent text.  Use
            <guibutton >File</guibutton > &#x2192; <guibutton
            >Save Page As</guibutton > to get an exact copy.
          </para>
        </note>
      </listitem>
      <listitem>
        <para>
          The <ulink url='&selfURL;&makefileName;'
          >&makefileFile;</ulink > for this document.
        </para>
      </listitem>
    </itemizedlist>
  </section> <!--online-files-->
  <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='&pubsURL;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>
          See <xref linkend='online-files' /> and download
          <filename >make-basic</filename >, &modelXMLFile;,
          <filename >logo.png</filename >, and <filename
          >logo.jpg</filename > to the current directory.
        </para>
      </step>
      <step>
        <para>
          Invent a name for your DocBook file that ends in
          <filename >.xml</filename >, and rename &modelXMLFile;
          as that file.
        </para>
        <para>
          For example, if your document is about dust abatement,
          you might call it <filename >dust.xml</filename >.  The
          rename command for this example would be:

          <programlisting
>mv &modelXMLName; dust.xml
</programlisting>

        </para>
      </step>
      <step>
        <para>
          Rename the &makeBasicFile; file as &makefileFile;:

          <programlisting
>mv &makeBasicName; &makefileName;
</programlisting>

          Then, in &makefileFile;, find this line:

          <programlisting
>BASENAME = your-document-base-name-here
</programlisting>

          and replace the part after the &#x201c;<code >=</code
          >&#x201d; with the name you gave your document in the
          previous step, without the <filename >.xml</filename >
          part.
        </para>
        <para>
          For the example in the previous step, this line would
          now read:

          <programlisting
>BASENAME = dust
</programlisting>
        </para>
      </step>
    </procedure>
    <para>
      You will develop your document by editing the <filename
      >.xml</filename > file as described in later sections.
    </para>
  </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 <ulink
        url='&xmlStandard;' >ISO standard called XML (eXtensible
        Markup Language)</ulink >. (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>
      <itemizedlist>
        <listitem>
          <para>
            A tag always starts with a less-than character
            (&#x201c;<code >&lt;</code >&#x201d;) and ends with a
            greater-than character (&#x201c;<code >&gt;</code
            >&#x201d;).
          </para>
        </listitem>
        <listitem>
          <para>
            Most tags are used in pairs, with content enclosed
            between a <firstterm>start tag</firstterm> and an
            <firstterm >end tag</firstterm >.
          </para>
          <para>
            For example, major sections of a document are always
            enclosed between a <code >&lt;section&gt;</code >
            start tag and a <code >&lt;/section&gt;</code > end
            tag.
          </para>
        </listitem>
        <listitem>
          <para>
            The term <firstterm >element</firstterm > refers to a
            pair of tags and everything in between them.
          </para>
        </listitem>
        <listitem>
          <para>
            A start tag has the form
            <programlisting
>&lt;<replaceable >tag-name</replaceable > <replaceable
                >attributes</replaceable >&gt;
</programlisting>
            and the end tag has the form
            <programlisting
>&lt;/<replaceable>tag-name</replaceable >&gt;
</programlisting>
            where the <code ><replaceable>tag-name</replaceable></code >
            is some
            name that describes what the tag does.
          </para>
        </listitem>
        <listitem>
          <para>
            In some cases, you can specify optional <replaceable
            >attributes</replaceable > that modify the
            characteristics of the element.  Each attribute has
            this form:
            <programlisting
><replaceable >N</replaceable >="<replaceable >V</replaceable >"
</programlisting>
            or
            <programlisting
><replaceable >N</replaceable >='<replaceable >V</replaceable >'
</programlisting>
            where <code ><replaceable >N</replaceable ></code
            > is the attribute's name and <code
            ><replaceable >V</replaceable ></code > is the
            attribute's value.
          </para>
          <para>
            Here is an example of a start tag with attributes:
            <programlisting
>&lt;section id="intro" status='draft'&gt;
</programlisting>
          </para>
        </listitem>
        <listitem>
          <para>
            An <firstterm >empty element</firstterm > is a
            special element consisting of one tag.  In this case,
            the tag must have a forward slash (/) just before the
            closing &#x201c;<code >&gt;</code >&#x201d;.  For
            example, the <code >&lt;colspec/&gt;</code > empty
            element describes the format of a table column in a
            table (see <xref linkend='tables-section' />).
          </para>
        </listitem>
        <listitem>
          <para>
            You can add whitespace (spaces, tabs, or line breaks)
            anywhere before or after an attribute, or before the
            closing &#x201c;<code >&gt;</code >&#x201d;.
          </para>
        </listitem>
      </itemizedlist>
    </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:
            <programlisting
>make web
</programlisting>
          </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:
            <programlisting
>make pdf
</programlisting>
          </para>
          <para>
            Or just type a <userinput>make</userinput> command by
            itself with no arguments to build both:
            <programlisting
>make
</programlisting>
          </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 role='outFile:&modelXMLName;'
>&lt;!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
 "&dbdtdURL;"&gt;
&lt;article&gt;
  &lt;!-- Replace all fields ### below. Then delete this comment--&gt;
  &lt;articleinfo &gt;
    &lt;title &gt;###
&lt;/title &gt;
    &lt;authorgroup &gt;
      &lt;author &gt;
        &lt;firstname &gt;###
&lt;/firstname &gt;
        &lt;surname &gt;###
&lt;/surname &gt;
      &lt;/author &gt;
    &lt;/authorgroup &gt;
    &lt;address &gt;&lt;email &gt;###
&lt;/email &gt;
    &lt;/address &gt;
    &lt;revhistory&gt;
      &lt;revision&gt;
        &lt;!--Place revision information here: RCS tags, etc.--&gt;
        &lt;revnumber&gt;###&lt;/revnumber&gt;
        &lt;date&gt;###&lt;/date&gt;
      &lt;/revision&gt;
    &lt;/revhistory&gt;
    &lt;abstract&gt;
      &lt;para&gt;
        &lt;!--All TCC documents must have an abstract.--&gt;
        ###
      &lt;/para&gt;
      &lt;para&gt;
        This publication is available in &lt;ulink url="###"
        &gt;Web form&lt;/ulink &gt; and also as a &lt;ulink
        url="###.pdf"
        &gt;PDF document&lt;/ulink &gt;.  Please
        forward any comments to &lt;userinput
        &gt;tcc-doc@nmt.edu&lt;/userinput &gt;.
      &lt;/para&gt;
    &lt;/abstract&gt;
  &lt;/articleinfo &gt;
  &lt;section id='intro'  &gt;
    &lt;!-- On the next line, place the title of your first section.--&gt;
    &lt;title &gt;###
&lt;/title &gt;
    &lt;!-- Add the body of your first section here.--&gt;
  &lt;/section &gt;
  &lt;!--Place additional sections here.--&gt;
&lt;/article &gt;
</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 >title</code > element, and add the
      section's content after it.
    </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.
    </para>
    <para>
      For example:
    </para>
    <programlisting
>  &lt;section id='intro'&gt;
    &lt;title&gt;Main section title&lt;/title&gt;
    &lt;para&gt;Main section content...&lt;/para&gt;
    &lt;section id='sir-gawain'&gt;
      &lt;title&gt;First subsection title&lt;/title&gt;
      &lt;para&gt;First subsection content...&lt;/para&gt;
    &lt;/section&gt;
    &lt;section id='sir-robin'&gt;
      &lt;title&gt;Second subsection title&lt;/title&gt;
      &lt;para&gt;Second subsection content...&lt;/para&gt;
    &lt;/section&gt;
  &lt;/section&gt;
</programlisting>
    <para>
      If the main section were section 3, then the two
      subsections inside it would be numbered 3.1 and 3.2.
    </para>
    <important>
      <para>
        You must invent a unique identifier for each section, and
        attach an <code >id='<replaceable >I</replaceable
        >'</code > attribute to the <code >section</code >
        element.  You will use these identifiers to generate
        automatic internal cross-references in your document; see
        <xref linkend='link-tag-section' />.  Identifiers may
        contain any combination of letters, hyphens (<code
        >-</code >), underbars (<code >_</code >), or digits.
      </para>
      <para>
        To help you manage larger documents, there is a utility
        that displays all the section identifiers for one DocBook
        document in an outline format.  See <ulink
        url='&dbindexURL;' ><citetitle ><code >docbookindex</code
        >: ID indexer for DocBook</citetitle ></ulink >.
        As an example, here is the <ulink url='&selfURL;toc.pdf'
        ><filename >toc.pdf</filename > file</ulink > showing
        all the section identifiers for this document.
      </para>
    </important>
    <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
>&lt;!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
 "&dbdtdURL;"&gt;
&lt;article &gt;
  &lt;articleinfo &gt;
    &lt;title &gt;
      Exegesis of archetypal content and pataphysical normatives in
      &lt;citetitle &gt;Monty Python and the Holy Grail&lt;/citetitle &gt;
    &lt;/title &gt;
    &lt;titleabbrev &gt;
      &lt;citetitle &gt;Monty Python&lt;/citetitle &gt; and
      pataphysics
    &lt;/titleabbrev&gt;
      ...
&lt;/article&gt;
</programlisting>
    </section> <!--titleabbrev-->
  </section> <!--sectioning-->
  <section id='prose-section'>
    <title>Ordinary prose paragraphs: <code >simpara</code > and
    <code >para</code ></title>
    <para>
      For everyday text paragraphs, enclose each paragraph
      in a <code >simpara</code > element.
      Here's an example from the
      <citetitle>Declaration of Independence</citetitle
      >:
      <programlisting
>    &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;
</programlisting>
    </para>
    <para>
      For paragraphs which include other complex structures such
      as bullet lists, programlisting shots, and such, it is necessary to
      use the <code >para</code > element.  These will look the
      same in the final form as a <code >simpara</code >
      paragraph.
    </para>
  </section> <!--prose-section-->
  <section id='inline-section'>
    <title>Inline markup</title>
    <para>
      &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.
    </para>
    <variablelist>
      <varlistentry>
        <term>
          <code >acronym</code >
        </term>
        <listitem>
          <para>
            An abbreviation, generally made from the initial
            letters of words, and sometimes pronounceable.  For
            example:

            <programlisting
>  &lt;acronym>PEBKAC&lt;/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 >application</code >
        </term>
        <listitem>
          <para>
            Names of packages.  Example:

            <programlisting
>Start &lt;application&gt;emacs&lt;/application&gt;.
</programlisting>

            Start <application>emacs</application>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code >citetitle</code >
        </term>
        <listitem>
          <para>
            Used for citing works by their title.  Example:

            <programlisting
>Have you read &lt;citetitle&gt;Ringworld&lt;/citetitle&gt;?
</programlisting>

            Have you read <citetitle>Ringworld</citetitle>?
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code >code</code >
        </term>
        <listitem>
          <para>
            For program source code.  Example:

            <programlisting
>Next we define the &lt;code &gt;panic()&lt;/code &gt; function.
</programlisting>

            Next we define the <code >panic()</code >
            function.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code >computeroutput</code >
        </term>
        <listitem>
          <para>
            Computer-generated output.  Example:

            <programlisting
>&lt;computeroutput&gt;OA210I OLD PSW WAS FF04230C 1200234B&lt;/computeroutput&gt;
</programlisting>

            <computeroutput>OA210I OLD PSW
            WAS FF04230C 1200234B</computeroutput>
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code >emphasis</code >
        </term>
        <listitem>
          <para>
            Used for emphasized text.  Example:

            <programlisting
>Don't &lt;emphasis&gt;do&lt;/emphasis&gt; that then.
</programlisting>

            Don't <emphasis>do</emphasis> that then.
          </para>
          <para>
            For boldface, add the attribute <code
            >role="strong"</code >.  Example: 

            <programlisting
>A five-ounce bird could &lt;emphasis role="strong"&gt;not&lt;/emphasis&gt;
hold a one-pound coconut.
</programlisting>

            A five-ounce bird could <emphasis
            role="strong">not</emphasis> hold a one-pound
            coconut.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code >filename</code >
        </term>
        <listitem>
          <para>
            For file names and path names.  Example:

            <programlisting
>Packages live in &lt;filename&gt;/fs/packages&lt;/filename&gt;.
</programlisting>

            Packages live in <filename>/fs/packages</filename>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code>firstterm</code>
        </term>
        <listitem>
          <para>
            For the first use of a term just being defined.
            Example:

            <programlisting
>The term &lt;firstterm &gt;spam&lt;/firstterm &gt; refers to unsolicited
commercial e-mail.
</programlisting>

            The term <firstterm >spam</firstterm > refers to unsolicited
            commercial e-mail.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code >foreignphrase</code >
        </term>
        <listitem>
          <para>
            Used to set off words in a different language than
            the surrounding text.

            <programlisting
>These sharks are in genus &lt;foreignphrase&gt;Squalus&lt;/foreignphrase&gt;.
</programlisting>

            These sharks are in genus
            <foreignphrase>Squalus</foreignphrase>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code >guibutton</code >
        </term>
        <listitem>
          <para>
            Buttons in a graphical user interface.  Example:

            <programlisting
>To exit, click on the &lt;guibutton&gt;Quit&lt;/guibutton&gt; button.
</programlisting>

            To exit, click on the <guibutton>Quit</guibutton>
            button.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code >guiicon</code >
        </term>
        <listitem>
          <para>
            An icon in a graphical user interface.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code >guilabel</code >
        </term>
        <listitem>
          <para>
            A label in a graphical user interface.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code >guimenu</code >
        </term>
        <listitem>
          <para>
            A menu in a graphical user interface.  Example:

            <programlisting
>Pull down the &lt;guimenu&gt;Team&lt;/guimenu&gt; menu.
</programlisting>

            Pull down the <guimenu>Team</guimenu> menu.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code >keysym</code >
        </term>
        <listitem>
          <para>
            For names of keys on a keyboard.  Example:

            <programlisting
>Press &lt;keysym&gt;Enter&lt;/keysym&gt;.
</programlisting>

            Press <keysym>Enter</keysym>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code >quote</code >
        </term>
        <listitem>
          <para>
            For in-line quotations.  One could simply use the
            double-quote characters &#x201c;&#x2026;&#x201d;, but
            the advantage of the <code >quote</code > element is
            that it correctly handles quotes within quotes.  For
            example:

            <programlisting
>I said, &lt;quote&gt;As Carol Schaffer used to say,
&lt;quote&gt;common sense isn't&lt;/quote&gt;.&lt;/quote&gt;
</programlisting>

            I said, <quote>As Carol Schaffer used to say,
<quote>common sense isn't</quote>.</quote>
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code >replaceable</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
>  Call your input file &lt;filename&gt;&lt;replaceable
  &gt;f&lt;/replaceable &gt;.tex&lt;/filename &gt;, where
  &lt;filename &gt;&lt;replaceable &gt;f&lt;/replaceable
  &gt;&lt;/filename &gt; 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 >sgmltag</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
>  Enclose the page title within &lt;sgmltag class="starttag"
  &gt;title&lt;/sgmltag &gt;...&lt;sgmltag class="endtag"
  &gt;title&lt;/sgmltag &gt; tags.
</programlisting>

            Enclose the page title within <sgmltag
            class="starttag" >title</sgmltag>...<sgmltag
            class="endtag">title</sgmltag> tags.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code >subscript</code >
        </term>
        <listitem>
          <para>
            Displays the contents below the baseline.  Example:

            <programlisting
>Drink more H&lt;subscript&gt;2&lt;/subscript&gt;O.
</programlisting>

          Drink more H<subscript>2</subscript>O.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code >superscript</code >
        </term>
        <listitem>
          <para>
            Displays the contents above the baseline.  Example:

            <programlisting
>Celebrate the 4&lt;superscript&gt;th&lt;/superscript&gt; of July.
</programlisting>

          Celebrate the 4<superscript>th</superscript> of July.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code >userinput</code >
        </term>
        <listitem>
          <para>
            For commands or other user input.  Example:

            <programlisting
>Type the command &lt;userinput&gt;make trouble&lt;/userinput&gt;.
</programlisting>

            Type the command <userinput>make trouble</userinput>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <code >varname</code >
        </term>
        <listitem>
          <para>
            For variable names in programs.  Example:

            <programlisting
>Add one to &lt;varname&gt;sheepCount&lt;/varname&gt;.
</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 &#x201c;See the section on frog identification
      below.&#x201d; 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' />.
        </para>
      </listitem>
      <listitem>
        <para>
          For references to a Web page outside the document, see
          <xref linkend='ulink-tag-section' />.
        </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 <code >citetitle</code > element; see
          <xref linkend='inline-section' />.
        </para>
      </listitem>
    </itemizedlist>
    <section id='link-tag-section'>
      <title>The <code >link</code > and <code >xref</code >
      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 for the location to
            which you want to refer.  The first character must be
            a letter, and the rest letters,
            numbers, hyphens, and the underscore (<code >_</code >)
            character.
          </para>
          <para>
            For example, you might use the identifier <code
            >flute-tuning</code > 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 >id="<replaceable
            >I</replaceable >"</code > attribute to that tag,
            where <code ><replaceable>I</replaceable></code > is
            the identifier name you invented in the previous
            step.  Any &DB; start tag can carry an <code
            >id</code > attribute.
          </para>
          <para>
            For example, to refer to a main section, add the
            <code >id</code > attribute to the <code
            >section</code > element.
          </para>
        </step>
        <step>
          <para>At the location where you want to cross-refer, use
            a tag of the form:
          <programlisting
>    &lt;link linkend="<replaceable>I</replaceable
                >"&gt;<replaceable>T</replaceable>&lt;/link&gt;
</programlisting>
          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>
      <programlisting
>    &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;
</programlisting>
      <itemizedlist spacing="compact">
        <listitem>
          <para>
            In the HTML output, this will produce a clickable link.
          </para>
        </listitem>
        <listitem>
          <para>
            In the PDF output, the content of the <code >link</code
            > element will also be clickable, although it will not
            appear any differently than the surrounding text.
          </para>
        </listitem>
      </itemizedlist>
      <para>
        You can also use the empty element <code >&lt;anchor
        id="<replaceable>I</replaceable>"/&gt;</code > to define
        a target location, where <code
        ><replaceable>I</replaceable></code > is the same unique
        identifier.
      </para>
      <para id='xref-tag-section'>
        You may find it easier to use the <code >xref</code >
        element to link to other locations within your document.
        This is an empty element; the link text is generated
        automatically.
      </para>
      <para>
        There are three ways to use this element.  All three
        require that you assign a unique <code >id</code >
        attribute to the element to which you are linking:
      </para>
      <itemizedlist>
        <listitem>
          <para>
            Just encode it as <code >&lt;xref
            linkend="<replaceable>I</replaceable>"/&gt;</code >,
            where <replaceable>I</replaceable> is the target
            identifier.  The link text will depend on the type of
            element.  For example, a reference to a <code
            >chapter</code> element will 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:
            <programlisting
>&lt;xref linkend="<replaceable>I</replaceable
                >" endterm="<replaceable>J</replaceable>"/&gt;
</programlisting>
            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 <code
            >id="<replaceable>J</replaceable >"</code >.
          </para>
          <para>
            For example, suppose a chapter starts like this:
          </para>
          <programlisting
>    &lt;chapter id="ch11"&gt;
      &lt;title&gt;The &lt;emphasis id="ch11-abbr"&gt;Last
        Chapter&lt;emphasis&gt;&lt;/title&gt;
</programlisting>
          <para>
            Then this reference would use &#x201c;Last Chapter&#x201d; as
            the link text:
          </para>
          <programlisting
>    &lt;xref linkend="ch11" endterm="ch11-abbr"/&gt;
</programlisting>
        </listitem>
        <listitem>
          <para>
            You can specify what link text you want to use for a
            specific target by adding an <code >xreflabel</code >
            attribute to the target element.  Any <code
            >xref</code > 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:

            <programlisting
>    &lt;chapter id="ch14" xreflabel="The Silly Chapter"&gt;...
</programlisting>

            then any reference of the form <code >&lt;xref
            id="ch14"/&gt;</code > would use &#x201c;The Silly
            Chapter&#x201d; as its link text.
          </para>
        </listitem>
      </itemizedlist>
    </section> <!--link-tag-section-->
    <section id='ulink-tag-section'>
      <title>The <code >ulink</code > tag: Linking to a Web
      page</title>
      <para>
        To refer to a location on a Web page outside the current
        document, use the <code >ulink</code > element with a
        <code >url</code > attribute that specifies the URL
        (Uniform Resource Locator) of the target.
      </para>
      <itemizedlist spacing="compact">
        <listitem>
          <para>
            In the HTML output, this will produce a clickable link.
          </para>
        </listitem>
        <listitem>
          <para>
            In the PDF output, &DB; will place the URL in a
            footnote.
          </para>
        </listitem>
      </itemizedlist>
      <para>
        Example:
        <programlisting
>See the &lt;ulink url="&helpURL;"&gt;TCC Help
System&lt;/ulink&gt;.
</programlisting>
        would display as: &#x201c;See the <ulink
        url="&helpURL;">TCC Help
        system</ulink>.&#x201d;
      </para>
    </section> <!--ulink-tag-section-->
  </section> <!--linking-->
  <section id='para-shapes-section'>
    <title>Special paragraph shapes</title>
    <section id='bullet-shape'>
      <title>Bullet lists: <code >itemizedlist</code ></title>
      <para>
        A <firstterm>bullet list</firstterm> is a set of narrower
        paragraphs, each shown with a round dot (the
        <firstterm>bullet</firstterm>) before it.  Typical uses
        are lists of features, lists of important points, and
        such.
      </para>
      <para>
        Enclose the entire bullet list inside an <code
        >itemizedlist</code > element.  Then, enclose each item
        within a <code >listitem</code > element containing one
        or more <code >para</code > or <code >simpara</code >
        elements.
      </para>
      <para>
        For example, this input:
      <programlisting
>    &lt;itemizedlist&gt;
      &lt;listitem&gt;
        &lt;para&gt;Mangos.&lt;/para&gt;
      &lt;/listitem&gt;
      &lt;listitem&gt;
        &lt;para&gt;Chirimoya.&lt;/para&gt;
      &lt;/listitem&gt;
    &lt;/itemizedlist&gt;
</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 <code
        >itemizedlist</code > 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: The <code >orderedlist</code >
      element</title>
      <para>
        To produce a numbered list of items, use the <code
        >orderedlist</code > element.  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
>      &lt;orderedlist&gt;
        &lt;listitem&gt;
          &lt;para&gt;
            DocBook renders documents in both print and Web form.
          &lt;/para&gt;
        &lt;/listitem&gt;
        &lt;listitem&gt;
          &lt;para&gt;
            It frees the author from most concerns of presentation.
          &lt;/para&gt;
        &lt;/listitem&gt;
      &lt;/orderedlist&gt;
</programlisting>
      <para>
        There are a number of attributes you can add to the <code
        >orderedlist</code > 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., &#x2026;.  Other possible
              values include:
            </para>
            <itemizedlist spacing="compact">
              <listitem>
                <para>
                  <code >numeration="loweralpha"</code > for a.,
                  b., &#x2026;
                </para>
              </listitem>
              <listitem>
                <para>
                  <code >numeration="lowerroman"</code
                  > for i., ii., iii., &#x2026;
                </para>
              </listitem>
              <listitem>
                <para>
                  <code >numeration="upperalpha"</code
                  > for A., B., C., &#x2026;
                </para>
              </listitem>
              <listitem>
                <para>
                  <code >numeration="upperroman"</code
                  > for I., II., III., &#x2026;
                </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, &#x2026;.
            </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
>    &lt;orderedlist numeration="upperroman" continuation="continues"&gt;
</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 <code
        >procedure</code > element.  Each step is enclosed within
        a <code >step</code > element containing one or more
        <code >para</code > or <code >simpara</code > elements.
      </para>
      <para>
        For example, this input:
      <programlisting
>    &lt;procedure&gt;
      &lt;step&gt;
        &lt;para&gt;
          Throw the football.
        &lt;/para&gt;
      &lt;/step&gt;
      &lt;step&gt;
        &lt;para&gt;
          Pick it up first.
        &lt;/para&gt;
      &lt;/step&gt;
    &lt;/procedure&gt;
</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
            >id=<replaceable>I</replaceable></code > to the
            corresponding <code >step</code > element.
          </para>
        </step>
        <step>
          <para>
            Wherever you want to refer to a step, use the element
            <code >&lt;xref
            linkend="<replaceable>I</replaceable>"/&gt;</code>,
            where <code ><replaceable>I</replaceable></code > is
            the name of the step you are referring to.
          </para>
          <para>
            This element will be replaced
            by the text &#x201c;step N&#x201d; 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
>      &lt;procedure&gt;
        &lt;step id="start-step"&gt;
          &lt;para&gt;
            Has the program halted?  If so, go to
            &lt;xref linkend="done-step"/&gt;.
          &lt;/para&gt;
        &lt;/step&gt;
        &lt;step id="loop-step"&gt;
          &lt;para&gt;
            Go to &lt;xref linkend="start-step"/&gt;.
          &lt;/para&gt;
        &lt;/step&gt;
        &lt;step id="done-step"&gt;
          &lt;para&gt;
            Done: we now know that the program halts.
          &lt;/para&gt;
        &lt;/step&gt;
      &lt;/procedure&gt;
</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
>      &lt;qandaset defaultlabel='qanda'&gt;
        &lt;title&gt;At the Bridge of Death&lt;/title&gt;
        &lt;qandaentry&gt;
          &lt;question&gt;
            &lt;para&gt;
              What is your favorite color?
            &lt;/para&gt;
          &lt;/question&gt;
          &lt;answer&gt;
            &lt;para&gt;
              Blue.
            &lt;/para&gt;
          &lt;/answer&gt;
        &lt;/qandaentry&gt;
        &lt;qandaentry&gt;
          &lt;question&gt;
            &lt;para&gt;
              What is the air-speed velocity of an unladen swallow?
            &lt;/para&gt;
          &lt;/question&gt;
          &lt;answer&gt;
            &lt;para&gt;
              What do you mean?  An African or European swallow?
            &lt;/para&gt;
          &lt;/answer&gt;
        &lt;/qandaentry&gt;
      &lt;/qandaset&gt;
</programlisting>
      <itemizedlist>
        <listitem>
          <para>
            To specify the format, in the <code >qandaset</code >
            element, 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 &#x201c;Q:&#x201d; and
                    the answers with &#x201c;A:&#x201d;.
                  </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
>    &lt;qandaset defaultlabel='qanda'&gt;
      &lt;title&gt;Frequently axed questors&lt;/title&gt;
      &lt;qandadiv&gt;
        &lt;title&gt;Trolls I have put down&lt;/title&gt;
        &lt;qandaentry&gt;
          ...
        &lt;/qandaentry&gt;
        ...
      &lt;/qandadiv&gt;
      &lt;qandadiv&gt;
        &lt;title&gt;Castle Anthrax&lt;/title&gt;
        &lt;qandaentry&gt;
          ...
        &lt;/qandaentry&gt;
        ...
      &lt;/qandadiv&gt;
    &lt;/qandaset&gt;
</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: <code >variablelist</code ></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:
      </para>
      <itemizedlist>
        <listitem>
          <para>
            Enclose the entire list in a <code
            >variablelist</code > element.
          </para>
        </listitem>
        <listitem>
          <para>
            Each term-definition pair is enclosed in a <code
            >varlistentry</code > element.
          </para>
        </listitem>
        <listitem>
          <para>
            Inside each <code >varlistentry</code > element,
            enclose the term to be defined inside a <code
            >term</code > element, and enclose the paragraph or
            paragraphs defining the term inside a <code
            >listitem</code > element.
          </para>
        </listitem>
      </itemizedlist>
      <para>
        Here is an example of a list containing two terms:
      </para>
      <programlisting
>      &lt;variablelist&gt;
        &lt;varlistentry&gt;
          &lt;term&gt;
            &lt;code &gt;.__abs__(self)&lt;/code &gt;
          &lt;/term&gt;
          &lt;listitem&gt;
            &lt;para&gt;
              Defines the behavior of the &lt;code &gt;abs()&lt;/code &gt; function
              when applied to an object of your class.
            &lt;/para&gt;
          &lt;/listitem&gt;
        &lt;/varlistentry&gt;
        &lt;varlistentry&gt;
          &lt;term&gt;
            &lt;code &gt;.__add__(self,&lt;replaceable &gt;other&lt;/replaceable
            &gt;)&lt;/code &gt;
          &lt;/term&gt;
          &lt;listitem&gt;
            &lt;para&gt;
              Defines the behavior of this class for &lt;code
              &gt;self+&lt;replaceable&gt;other&lt;/replaceable &gt;&lt;/code &gt;.
            &lt;/para&gt;
          &lt;/listitem&gt;
        &lt;/varlistentry&gt;
      &lt;/variablelist&gt;
</programlisting>
      <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 a block of text stand out
        against the background.  &DB; has several elements for
        such purposes:
      </para>
      <itemizedlist spacing="compact">
        <listitem>
          <para>
            <code >note</code >
          </para>
        </listitem>
        <listitem>
          <para>
            <code >warning</code >
          </para>
        </listitem>
        <listitem>
          <para>
            <code >important</code >
          </para>
        </listitem>
        <listitem>
          <para>
            <code >caution</code >
          </para>
        </listitem>
        <listitem>
          <para>
            <code >tip</code >
          </para>
        </listitem>
      </itemizedlist>
      <para>
        Typically you will put one or more regular paragraphs
        (using the <code >para</code > element) 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
>    &lt;warning&gt;
      &lt;para&gt;
        Do not touch the electric fence!
      &lt;/para&gt;
    &lt;/warning&gt;
</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 <code >epigraph</code > when the quotation starts
            a new chapter or section.
          </para>
        </listitem>
        <listitem>
          <para>
            Use <code >blockquote</code > for quotations
            elsewhere.
          </para>
        </listitem>
      </itemizedlist>
      <para>
        In either case, the content of the element consists of an
        optional <code >attribution</code > element that tells
        the reader who said this.  The actual quotation follows,
        typically wrapped in one or more <code >para</code >
        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
>      &lt;blockquote&gt;
        &lt;attribution&gt;C. A. R. Hoare&lt;/attribution&gt;
        &lt;para&gt;
          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.
        &lt;/para&gt;
      &lt;/blockquote&gt;
</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
      a <code >programlisting</code > element.
    </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 <code >screen</code > element to
      display something that appears on a screen.  The formatting
      is the same as for the <code >programlisting</code >
      element.
    </para>
    <para>
      Line breaks are preserved starting immediately after the
      start tag.  Therefore, if you start your code display on
      the line following that tag, the display will start with a
      blank line.  There is a way to avoid this: move the closing
      &#x201c;<code >&gt;</code >&#x201d; of the start tag to the
      beginning of the first line of code.  Here is the above
      example formatted so as to eliminate the initial blank
      line:
      <programlisting
>&lt;programlisting
&gt;    10 PRINT "BASIC IS OVER 40 YEARS OLD"
    20 GOTO 10
    30 END
&lt;/programlisting&gt;
</programlisting>
    </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 <code >programlisting</code > or <code
        >screen</code > 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 <code
            >co</code > elements, add a <code >calloutlist</code
            > element after the end of the display.
          </para>
        </step>
        <step>
          <para>
            Within that <code >calloutlist</code > element, place
            one <code >callout</code > element for each <code
            >co</code > element in the display.
          </para>
          <para>
            To each <code >callout</code > element, add an attribute
            of the form <code >arearefs="<replaceable
            >I</replaceable >"</code >, where the value of
            <code ><replaceable >I</replaceable ></code > is
            the value of the <code >id</code > attribute of
            the corresponding <code >co</code > element.
          </para>
          <para>
            Add your textual description (or graphics or
            whatever) within the <code >callout</code > element.
            If you need to put anything other than ordinary text
            inside the <code >callout</code > element, wrap it
            inside a <code >para</code > element.
          </para>
        </step>
      </procedure>
      <para>Here's how the above example looks in source form:</para>
      <programlisting
>  &lt;screen
&gt;    AWAKE! for Morning in the Bowl of Night &lt;co id="khay1"/&gt;
    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. &lt;co id="khay2"/&gt;
  &lt;/screen&gt;
  &lt;calloutlist&gt;
    &lt;callout arearefs="khay1"&gt;
      Note the gratuitous capitalization.
    &lt;/callout&gt;
    &lt;callout arearefs="khay2"&gt;
      It appears that someone has struck the Sultan on the
      turret with an alarm clock.
    &lt;/callout&gt;
  &lt;/calloutlist&gt;
</programlisting>
    </section> <!--callouts-->
    <section id='poetry'>
      <title>Poetry</title>
      <para>
        When formatting poetry and similar text, use the <code
        >literallayout</code > tag.  Like the <code
        >programlisting</code > 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
>&lt;figure&gt;
  &lt;title&gt;Lanai from the air&lt;/title&gt;
  &lt;mediaobject&gt;
    &lt;imageobject&gt;
      &lt;imagedata fileref="lanai.jpg"/&gt;
    &lt;/imageobject&gt;
  &lt;/mediaobject&gt;
&lt;/figure&gt;
</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
>&lt;informalfigure&gt;
  &lt;mediaobject&gt;
    &lt;imageobject&gt;
      &lt;imagedata fileref="lanai.jpg"/&gt;
    &lt;/imageobject&gt;
  &lt;/mediaobject&gt;
&lt;/informalfigure&gt;
</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
        <code >imagedata</code > 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="&pokeyURL;">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="&selfURL;pokey.gif"/>
          </imageobject>
        </mediaobject>
      </informalfigure>
      <informalfigure>
        <mediaobject>
          <imageobject>
            <imagedata scale="25" fileref="pokey.gif"/>
          </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&#x2014;especially
        diagrams and other vector-type drawings&#x2014;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
        &#x201c;stairstep&#x201d; 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
        <code >imageobject</code > elements
        within the same <code >mediaobject</code > element.
      </para>
      <para>
        In the HTML version, add to the <code >mediaobject</code
        > element an attribute <code >role="html"</code >.  In
        the PDF version, add 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
>&lt;figure&gt;
  &lt;title&gt;Mill flow diagram&lt;/title&gt;
  &lt;mediaobject&gt;
    &lt;imageobject role="html"&gt;
      &lt;imagedata fileref="&selfURL;flow.png"/&gt;
    &lt;/imageobject&gt;        
    &lt;imageobject role="fo"&gt;
      &lt;imagedata fileref="flow.pdf"/&gt;
    &lt;/imageobject&gt;        
  &lt;/mediaobject&gt;
&lt;/figure&gt;
</programlisting>
      <para>
        Once you have this dual presentation in place, you can
        adjust the size of each figure independently by using
        <code >scale="&#x2026;"</code > attributes in the <code
        >imagedata</code > 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 <code
        >imagedata</code > 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&#x00d7;75mm, use:
            </para>
            <programlisting
>    &lt;imagedata contentwidth="125mm" contentdepth="75mm" .../&gt;
</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&#x2014;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:
      </para>
      <procedure>
        <step>
          <para>
            Use the <code >inlinemediaobject</code > element.
          </para>
        </step>
        <step>
          <para>
            Inside this element, place an <code
            >imageobject</code > to specify the image.  The
            format of this element is described in <xref
            linkend='figures' />.
          </para>
        </step>
        <step>
          <para>
            Include a <code >textobject</code > element with
            text that will appear in situations where the image
            cannot be displayed, such as browsers for the
            visually impaired.
          </para>
        </step>
      </procedure>
      <para>
        Here is an example:
      </para>
      <para>Use this icon
        <inlinemediaobject>
          <imageobject>
            <imagedata fileref="&selfURL;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>
      <programlisting
>    &lt;para&gt;
      Use this icon
      &lt;inlinemediaobject&gt;
        &lt;imageobject&gt;
          &lt;imagedata fileref="circle-2.jpg"/&gt;
        &lt;/imageobject&gt;
        &lt;textobject&gt;
          &lt;phrase&gt;Icon for circle by diameter&lt;/phrase&gt;
        &lt;/textobject&gt;
      &lt;/inlinemediaobject&gt;
      to create a circle by specifying its diameter.
    &lt;/para&gt;
</programlisting>
    </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 &#x201c;Picture 1&#x201d; (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
              &#x201c;<filename >../</filename >&#x201d; 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
>    &lt;table frame="topbot" pgwide="0"&gt;
      &lt;title&gt;All-time NBA free throw percentages&lt;/title&gt;
      &lt;tgroup cols="4"&gt;
        &lt;colspec colwidth="3*" align="left" colnum="1" colname="player"/&gt;
        &lt;colspec colwidth="*"  align="right" colnum="2" colname="fta"/&gt;
        &lt;colspec colwidth="*"  align="right" colnum="3" colname="ftm"/&gt;
        &lt;colspec colwidth="*"  align="right" colnum="4" colname="pct"/&gt;
        &lt;thead&gt;
          &lt;row rowsep="1"&gt;
            &lt;entry&gt;Player&lt;/entry&gt;
            &lt;entry&gt;FTA&lt;/entry&gt;
            &lt;entry&gt;FTM&lt;/entry&gt;
            &lt;entry&gt;Pct.&lt;/entry&gt;
          &lt;/row&gt;
        &lt;/thead&gt;
        &lt;tbody&gt;
          &lt;row&gt;
            &lt;entry&gt;Rick Barry&lt;/entry&gt;
            &lt;entry&gt;4,243&lt;/entry&gt;
            &lt;entry&gt;3,818&lt;/entry&gt;
            &lt;entry&gt;.900&lt;/entry&gt;
          &lt;/row&gt;
          &lt;row&gt;
            &lt;entry&gt;Calvin Murphy&lt;/entry&gt;
            &lt;entry&gt;3,864&lt;/entry&gt;
            &lt;entry&gt;3,445&lt;/entry&gt;
            &lt;entry&gt;.892&lt;/entry&gt;
          &lt;/row&gt;
        &lt;/tbody&gt;
      &lt;/tgroup&gt;
    &lt;/table&gt;
</programlisting>
    <para>
      Let's look at these tags and their attributes in detail.
    </para>
    <itemizedlist>
      <listitem>
        <para>
          The <code >table</code > element encloses the entire
          table.  The attribute <code >frame="topbot"</code >
          specifies that ruled lines be placed over the top and
          bottom of the table as a while.  The attribute <code
          >pgwide="0"</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
          <code >table</code > opening tag must be a <code
          >title</code > element.
        </para>
      </listitem>
      <listitem>
        <para>
          The <code >tgroup</code > element encloses the entire
          rest of the table.  Its <code >cols</code > attribute
          specifies the number of columns for the table as a
          whole.
        </para>
      </listitem>
      <listitem>
        <para>
          Specify the presentation of each column in the table
          with a <code >colspec</code > element.
        </para>
        <para>
          The <code >colwidth</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
          >colwidth="3*"</code > for the first column and <code
          >colwidth="*"</code > for the rest.
        </para>
        <para>
          The <code >align</code > attribute specifies whether
          the contents of each column are to be positioned to the
          left or right side.
        </para>
      </listitem>
      <listitem>
        <para>
          The <code >thead</code > element encloses the heading
          section of the table.  The heading consists of a <code
          >row</code > element, containing one <code >entry</code
          > element for each heading.
        </para>
        <para>
          Note that the <code >row</code> element has an attribute
          <code >rowsep="1"</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 <code >tbody</code > element comes after the last
          <code >colspec</code > element, and encloses the actual
          body of the table.
        </para>
      </listitem>
      <listitem>
        <para>
          Each row of the table is enclosed in a <code >row</code
          > element.
        </para>
      </listitem>
      <listitem>
        <para>
          Each cell in the table is enclosed within an <code
          >entry</code > 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="&calsURL;" ><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 elements of your table.  There is a
        hierarchy of elements:
      </para>
      <orderedlist>
        <listitem>
          <para>
            Attributes of the <code >table</code > element
            specify values for the table as a whole.
          </para>
        </listitem>
        <listitem>
          <para>
            Attributes of <code >colspec</code > specify values
            for all entries in a column, and may override values
            set in the <code >table</code > element.
          </para>
        </listitem>
        <listitem>
          <para>
            Attributes of the <code >row</code > element can
            override higher-level values.
          </para>
        </listitem>
        <listitem>
          <para>
            Attributes of the <code >entry</code > element can in
            turn override all higher-level values.
          </para>
        </listitem>
      </orderedlist>
      <para>
        The example table above shows this process.  The <code
        >frame="topbot"</code > attribute of the <code
        >table</code > element specifies that rules appear only
        above and below the table as a whole.  But the <code
        >rowsep="1"</code > attribute of the first <code
        >row</code > element overrides that specification,
        forcing a rule to appear below the first row.
      </para>
      <para>
        Here are the elements and attributes that affect ruled
        lines:
      </para>
      <itemizedlist spacing="compact">
        <listitem>
          <para>
            In the <code >table</code > element, the <code
            >frame</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 elements <code >table</code >, <code
            >tgroup</code >, <code >colspec</code >, and <code
            >entry</code > can have a <code >colsep</code >
            attribute.
          </para>
          <para>
            Use <code >colsep=0</code > to suppress rules to the
            right of a column, or <code >colsep="1"</code > to
            place rules to the right of a column.
          </para>
          <para>
            The attribute for the <code >table</code > element
            sets the default for the table as a whole; the
            attribute for <code >tgroup</code> overrides the
            value for <code >table</code >; and so forth, with
            the value for deeper elements overriding the values
            of all shallower elements.
          </para>
        </listitem>
        <listitem>
          <para>
            Any of the elements <code >table</code >, <code
            >tgroup</code >, <code >row</code >, and <code
            >entry</code > can have a <code >rowsep</code >
            attribute.
          </para>
          <para>
            Use <code >rowsep=0</code > to suppress the rule
            below the row (or cell, for the <code >entry</code >
            element).  Use <code >rowsep="1"</code > to place a
            rule below the row (or cell).
          </para>
          <para>
            As with the <code >colsep</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 >pgwide="1"</code >
        attribute in the <code >table</code > element.  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>
        <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 <code >colwidth</code >
        attribute of the <code >colspec</code > element, which
        can take these values:
      </para>
      <itemizedlist>
        <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 >colwidth="5.5cm"</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 >colwidth</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
        >align</code > attribute.  This attribute can be used:
        <itemizedlist spacing="compact">
          <listitem>
            <para>
              in a <code >tgroup</code > element, to set the
              default alignment for the table as a whole;
            </para>
          </listitem>
          <listitem>
            <para>
              in a <code >colspec</code > element, to set the
              default alignment for one column; or
            </para>
          </listitem>
          <listitem>
            <para>
              in an <code >entry</code > element, 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 >align</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
        >valign</code > attribute.  This attribute can be used:
        <itemizedlist spacing="compact">
          <listitem>
            <para>
              in a <code >row</code > element, to set the default
              alignment for that row; or
            </para>
          </listitem>
          <listitem>
            <para>
              in an <code >entry</code > element, 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='column-span'>
      <title>Horizontal (column) 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 the procedure for column spanning, where multiple
        cells of the same row are combined.
      </para>
      <procedure>
        <step>
          <para>
            To each <code >colspec</code > element, add a <code
            >colname</code > attribute that specifies a unique
            name for that column.
          </para>
        </step>
        <step>
          <para>
            Inside the <code >entry</code > element to be
            spanned, add two attributes.  Set the <code >namest</code
            > attribute value to the name of the column where the
            spanning is to start.  Set the <code >nameend</code >
            attribute value to the name of the ending column.
          </para>
        </step>
      </procedure>
      <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 colwidth="4em" colname="day"/>
          <colspec colwidth="3em" colname="rise-20"/>
          <colspec colwidth="5em" colname="set-20"/>
          <colspec colwidth="5em" colname="rise-30"/>
          <colspec colwidth="5em" colname="set-30"/>
          <thead>
            <row>
              <entry namest="month" nameend="day"/>
              <entry namest="rise-20" nameend="set-20" align="center">
                20&#x00b0; N. Lat.
              </entry>
              <entry namest="rise-30" nameend="set-30" align="center">
                30&#x00b0; 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
>      &lt;table id='venus-table'&gt;
        &lt;title&gt;Rising and setting of Venus, 1994&lt;/title&gt;
        &lt;tgroup cols="6" align="right"&gt;
          &lt;colspec align="left" colname="month"/&gt;
          &lt;colspec colwidth="4em" colname="day"/&gt;
          &lt;colspec colwidth="3em" colname="rise-20"/&gt;
          &lt;colspec colwidth="5em" colname="set-20"/&gt;
          &lt;colspec colwidth="5em" colname="rise-30"/&gt;
          &lt;colspec colwidth="5em" colname="set-30"/&gt;
          &lt;thead&gt;
            &lt;row&gt;
              &lt;entry namest="month" nameend="day"/&gt;
              &lt;entry namest="rise-20" nameend="set-20" align="center"&gt;
                20&#x00b0; N. Lat.
              &lt;/entry&gt;
              &lt;entry namest="rise-30" nameend="set-30" align="center"&gt;
                30&#x00b0; N. Lat.
              &lt;/entry&gt;
            &lt;/row&gt;
            &lt;row&gt;
              &lt;entry namest="month" nameend="day"/&gt;
              &lt;entry&gt;Rise&lt;/entry&gt;
              &lt;entry&gt;Set&lt;/entry&gt;
              &lt;entry&gt;Rise&lt;/entry&gt;
              &lt;entry&gt;Set&lt;/entry&gt;
            &lt;/row&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
            &lt;row&gt;
              &lt;entry&gt;Jan.&lt;/entry&gt;
              &lt;entry&gt;1&lt;/entry&gt;
              &lt;entry&gt;6:21&lt;/entry&gt;
              &lt;entry&gt;17:14&lt;/entry&gt;
              &lt;entry&gt;6:43&lt;/entry&gt;
              &lt;entry&gt;16:52&lt;/entry&gt;
            &lt;/row&gt;
            ...
</programlisting>
    </section> <!--column-span-->
    <section id='row-span'>
      <title>Vertical (row) spanning in tables</title>
      <para>
        You can also make a cell span multiple rows vertically.
        To do this:
      </para>
      <procedure>
        <step>
          <para>
            Inside the cell's <code >entry</code > element, add
            an attribute <code >morerows="<replaceable
            >N</replaceable >"</code >, where <code ><replaceable
            >N</replaceable ></code > is the number of <emphasis
            >additional</emphasis > rows to be spanned.  For
            example, an attribute of <code >morerows="2"</code >
            would create a cell that spans <emphasis
            >three</emphasis > rows.
          </para>
        </step>
        <step>
          <para>
            Wherever a cell is vertically spanned, omit the <code
            >entry</code > elements from the rows into which it
            is spanned.  For example, if the cell in column 1 of
            row 1 spans three rows, omit the <code >entry</code >
            element for column 1 in rows 2 and 3.
          </para>
        </step>
      </procedure>
      <para>
        Here is our Venus table rearranged to demonstrate
        vertical spanning:
      </para>
      <table id='venus-2-table'>
        <title>Rising and setting of Venus, 1994</title>
        <tgroup cols="6" align="right">
          <colspec align="left" colname="month"/>
          <colspec colwidth="4em" colname="day"/>
          <colspec colwidth="3em" colname="rise-20"/>
          <colspec colwidth="5em" colname="set-20"/>
          <colspec colwidth="5em" colname="rise-30"/>
          <colspec colwidth="5em" colname="set-30"/>
          <thead>
            <row>
              <entry morerows="1" valign="bottom">Month</entry>
              <entry morerows="1" valign="bottom">Day</entry>
              <entry namest="rise-20" nameend="set-20" align="center">
                20&#x00b0; N. Lat.
              </entry>
              <entry namest="rise-30" nameend="set-30" align="center">
                30&#x00b0; N. Lat.
              </entry>
            </row>
            <row>
              <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 is the <code >thead</code > section of the modified
        table; the rest of the table is as described in <xref
        linkend='column-span' />.
      </para>
      <programlisting
>          &lt;thead&gt;
            &lt;row&gt;
              &lt;entry morerows="1" valign="bottom"&gt;Month&lt;/entry&gt;
              &lt;entry morerows="1" valign="bottom"&gt;Day&lt;/entry&gt;
              &lt;entry namest="rise-20" nameend="set-20" align="center"&gt;
                20&#x00b0; N. Lat.
              &lt;/entry&gt;
              &lt;entry namest="rise-30" nameend="set-30" align="center"&gt;
                30&#x00b0; N. Lat.
              &lt;/entry&gt;
            &lt;/row&gt;
            &lt;row&gt;
              &lt;entry&gt;Rise&lt;/entry&gt;
              &lt;entry&gt;Set&lt;/entry&gt;
              &lt;entry&gt;Rise&lt;/entry&gt;
              &lt;entry&gt;Set&lt;/entry&gt;
            &lt;/row&gt;
          &lt;/thead&gt;
</programlisting>
      <para>
        Although the table has six columns, the second row in the
        <code >thead</code > element has only the four cells for
        columns 3-6, because columns 1 and 2 in those rows are
        occupied by the vertically spanned cells from the
        previous row.        
      </para>
      <para>
        You can combine vertical and horizontal spanning.
        If you do, the spanned cell will always occupy a
        rectangular block of the table.  For example, if
        the cell in row 15, column 3, spans four columns
        and two rows, it will occupy columns 3&#x2013;6
        of rows 15&#x2013;16.
      </para>
    </section> <!--row-span-->
  </section> <!--tables-section-->
  <section id='tex-math'>
    <title>Including &TeX; and &LaTeX; math</title>
    <para>
      You can include mathematical formulae written in &TeX; and
      &LaTeX; in your document.  Here is an example:
    </para>
    <informalequation>
      <mediaobject>
        <imageobject role="html">
          <imagedata fileref="&selfURL;lamath.jpg"/>
        </imageobject>
        <imageobject role="fo">
          <imagedata fileref="lamath.pdf"/>
        </imageobject>
      </mediaobject>
    </informalequation>
    <para>
      There are some limitations:
    </para>
    <itemizedlist>
      <listitem>
        <para>
          The technique works best for equations displayed as a
          block element, interrupting any text paragraph.
        </para>
      </listitem>
      <listitem>
        <para>
          Each displayed equation must be placed in a separate
          file.  For hints on writing these files, see
          <xref linkend='latex-input' /> or
          <xref linkend='tex-input' />.
        </para>
      </listitem>
      <listitem>
        <para>
          Displayed equations are set flush to the left margin.
          The best workaround for this is to number your
          equations on the left; this will center the math
          part of the line.
        </para>
      </listitem>
      <listitem>
        <para>
          You can include bits of math as inline elements within
          a paragraph; see <xref linkend='inline-math-simple' />
          and <xref linkend='inline-math-tex' />.
        </para>
      </listitem>
      <listitem>
        <para>
          The procedure is somewhat involved; see <xref
          linkend='math-procedure' />.  However, adding a few
          rules to your <filename >Makefile</filename > automates
          the entire procedure: see <xref linkend='math-makefile'
          />.
        </para>
      </listitem>
    </itemizedlist>
    <section id='latex-input'>
      <title>Preparing a formula with &LaTeX;</title>
      <para>
        To use a &LaTeX; displayed formula, the formula must
        reside in a separate file, and you must follow a
        specific structure.  Here is the &LaTeX; source
        file for the example in <xref linkend='tex-math' />.
      </para>
      <programlisting
>% lamath.tex: Sample of LaTeX math for inclusion in DocBook
%
\documentclass[leqno]{article}
\pagestyle{empty}
\setlength{\textwidth}{6in}
\begin{document}
\setcounter{equation}{13}
\begin{equation}
  \int \tanh^{-1}{x\over a}dx =
  x \tanh^{-1}{x\over a}+{a\over 2}\log(a^2-x^2),\qquad
    \left(\left| x\over a \right| &lt; 1\right)
\end{equation}
\end{document}
</programlisting>
      <itemizedlist>
        <listitem>
          <para>
            The option <code >[leqno]</code > instructs &LaTeX;
            to place equation numbers on the left side.
          </para>
        </listitem>
        <listitem>
          <para>
            The conversion process selects everything on the page
            and puts it into a rectangular box.  Hence, a page
            number would force the box to be page-sized.  The
            <code >\pagestyle{empty}</code > command suppresses
            page numbering.
          </para>
        </listitem>
        <listitem>
          <para>
            The line <code >\setlength{\textwidth}{6in</code >
            sets the width of the text column to six inches,
            which matches the text column width in the PDF
            output from &DB;.
          </para>
        </listitem>
        <listitem>
          <para>
            Use a line <code >\setcounter{equation}{<replaceable
            >N</replaceable >}</code > to set the equation number
            to one less than the desired equation number.  A
            value of 13 here will number the equation as (14).
          </para>
        </listitem>
        <listitem>
          <para>
            Place the equation in a <code
            >\begin{equation}&#x2026;\end{equation}</code >
            environment so that the equation will be numbered.
          </para>
        </listitem>
      </itemizedlist>
      <para>
        The math itself is expressed using the usual &LaTeX;
        conventions.
      </para>
    </section> <!--latex-input-->
    <section id='tex-input'>
      <title>Preparing a formula with &TeX;</title>
      <para>
        If you prefer to use Plain &TeX;, here is the same
        example in that notation.
      </para>
      <programlisting
>% math.tex: Sample of TeX math for inclusion in DocBook
%
\hsize=6in
\nopagenumbers
$$\int \tanh^{-1}{x\over a}dx =
  x \tanh^{-1}{x\over a}+{a\over 2}\log(a^2-x^2),\qquad
    \left(\left| x\over a \right| &lt; 1\right)
  \leqno{(14)}
$$
\bye
</programlisting>
      <itemizedlist>
        <listitem>
          <para>
            The line <code >\hsize=6in</code > sets the text
            column width to six inches.
          </para>
        </listitem>
        <listitem>
          <para>
            Because the production process wraps a box around
            whatever text is on the page, use <code
            >\nopagenumbers</code > to turn off page numbering.
          </para>
        </listitem>
        <listitem>
          <para>
            To place equation numbers on the left, use <code
            >\leqno</code > or <code >\leqalignno</code >.
          </para>
        </listitem>
      </itemizedlist>
    </section> <!--tex-input-->
    <section id='math-procedure'>
      <title>Processing your math files for inclusion</title>
      <para>
        Once you have written out your formula in &LaTeX; or
        &TeX; format, follow this procedure to prepare artwork
        for inclusion in &DB;.  If you use a <filename
        >Makefile</filename >, you can automate this procedure;
        see <xref linkend='math-makefile' />.
      </para>
      <procedure>
        <step>
          <para>
            Translate the file to DVI format.  For &LaTeX;, the
            command is:
            <programlisting
>latex <replaceable >file</replaceable >.tex
</programlisting>
            For &TeX;:
            <programlisting
>tex <replaceable >file</replaceable >.tex
</programlisting>
            For example, if your source file is <filename
            >eq14.tex</filename >, this will create a file named
            <filename >eq14.dvi</filename >.
          </para>
        </step>
        <step>
          <para>
            If there are any errors, fix them and recompile.  Use
            <application >xdvi</application > or another DVI
            viewer to inspect the typeset output and fix any
            content or appearance problems.
          </para>
        </step>
        <step>
          <para>
            Convert the <filename >.dvi</filename > file to
            Encapsulated Postscript.  To continue the example:
            <programlisting
>dvips -E eq14.dvi -o eq14.eps
</programlisting>
            The <code >-E</code > option forces <application
            >dvips</application > to produce EPS output, shrinking
            the bounding box to include only the marks on the page.
          </para>
        </step>
        <step>
          <para>
            Convert the EPS file to Encapsulated PDF.  This command
            will build a file named <filename >eq14.pdf</filename >
            that can be included in DocBook PDF output:
            <programlisting
>epstopdf eq14.eps
</programlisting>
          </para>
        </step>
        <step>
          <para>
            Convert the Encapsulated PDF file to a grayscale
            image in PGM format.  The <application
            >pdftoppm</application > utility does this
            conversion.  Its <code >-gray</code > option uses
            anti-aliasing to produce an image that is
            considerably better-looking than a pure black and
            white image.  The first argument is the input file.
            The second argument is the &#x201c;base name&#x201d;;
            each page of the input file is written to a file
            whose name is that base name with a suffix of the
            form <filename >-<replaceable >NNNNNN</replaceable
            >.pgm</filename >, where <code ><replaceable
            >NNNNNN</replaceable ></code > is the page number.
            In our case, there will be only one page.
          </para>
          <para>
            The <application >pdftoppm</application > program
            also accepts a resolution in dots per inch, but the
            default (<code >-r 150</code >) is reasonable.
          </para>
          <para>
            To continue the example, this would build file
            <filename >eq14-1.pgm</filename >:
            <programlisting
>pdftoppm -gray eq14.pdf eq14
</programlisting>
          </para>
        </step>
        <step>
          <para>
            Finally, convert the <filename >.pgm</filename > file
            to JPEG format using <application
            >pnmtojpeg</application >.  In our example:
            <programlisting
>pnmtojpeg eq14-1.pgm >eq14.jpg
</programlisting>
          </para>
        </step>
        <step>
          <para>
            In your &DB; source file, encode the equation like
            this:
            <programlisting
>    &lt;informalequation&gt;
      &lt;mediaobject&gt;
        &lt;imageobject role="html"&gt;
          &lt;imagedata fileref="<replaceable >file</replaceable >.jpg"/&gt;
        &lt;/imageobject&gt;
        &lt;imageobject role="fo"&gt;
          &lt;imagedata fileref="<replaceable >file</replaceable >.pdf"/&gt;
        &lt;/imageobject&gt;
      &lt;/mediaobject&gt;
    &lt;/informalequation&gt;
</programlisting>
            The <code >informalequation</code > element is
            preferable to the <code >equation</code > element,
            since it does not number the equation or give it a
            title.
          </para>
        </step>
      </procedure>
    </section> <!--math-procedure-->
    <section id='math-makefile'>
      <title>Automating math display production with your <code
      >Makefile</code ></title>
      <para>
        If you are using a <code >Makefile</code > as described
        in <xref linkend='workflow' />, you can add rules to it
        that automate the procedure described in <xref
        linkend='math-procedure' />.
      </para>
      <para>
        Here is an annotated <filename >Makefile</filename >
        for this example file, illustrating how to automate the
        procedures for converting &TeX; equations to the forms
        needed by DocBook.
      </para>
      <para>
        First, we define a few variables. <code >TARGET</code >
        is the base name of the document and its product files.
        <code >SOURCE</code > is the document's XML source file.
        In this example, the &DB; source file is <filename
        >example.xml</filename >.
      </para>
      <programlisting
>TARGET          =  example
SOURCE          =  $(TARGET).xml
</programlisting>
    <para>
      The next lines are a part of the stock TCC DocBook
      <filename >Makefile</filename > template, defining the
      path to the style sheets, and options for the HTML and
      PDF conversion routes.
    </para>
    <programlisting
>TCC_XSL         =  /u/www/docs/tcc/doc/docbook43
XSLT_HTML_OPT   =  
XSLT_FO_OPT     =  
XEP_OPT         =  -quiet
</programlisting>
    <para>
      The variable <code >EQUATIONS</code > enumerates the
      individual &TeX; source files for each displayed equation.
      The variables <code >PDF_EQUATIONS</code > and <code
      >JPG_EQUATIONS</code > are the names of the product files
      required by DocBook for print and Web, respectively.  In
      this example, there are three equations, residing in files
      <filename >eq1.tex</filename >, <filename
      >eq2.tex</filename >, and <filename >eq3.tex</filename >.
    </para>
    <programlisting
>EQUATIONS       =  eq1.tex eq2.tex eq3.tex
PDF_EQUATIONS   =  ${EQUATIONS:.tex=.pdf}
JPG_EQUATIONS   =  ${EQUATIONS:.tex=.jpg}
</programlisting>
    <para>
      The <application >make</application > application won't
      work properly unless the <code >.SUFFIXES</code > variable
      is set to a list of all the file name suffixes used in its
      rules.
    </para>
    <programlisting
>.SUFFIXES: .xml .html .fo .ps .eps .pdf .tex .dvi .pgm .jpg
</programlisting>
    <para>
      The next section is the suffix rules used to convert
      one file format into another.  The first three are the
      normal rules for building HTML and PDF, from the TCC's
      stock DocBook <filename >Makefile</filename >.
    </para>
    <programlisting
>.xml.html:
     xsltproc -o $@ $(XSLT_HTML_OPT) $(TCC_XSL)/tcc_html.xsl $&lt;

.xml.fo:
     xsltproc -o $@ $(XSLT_FO_OPT) $(TCC_XSL)/tcc_fo.xsl $&lt;

.fo.pdf:
     xep $(XEP_OPT) $&lt; $@ 
</programlisting>
    <para>
      The next sequence of rules exactly reflects the steps
      described in the procedure above for converting the
      &LaTeX; source files to PDF and JPG form.
    </para>
    <programlisting
>.tex.dvi:
     latex $&lt;

.dvi.eps:
     dvips -E $&lt; -o $*.eps

.eps.pdf:
     epstopdf $&lt;

.pdf.pgm:
     pdftoppm -gray $&lt; $*; \
     mv $*-1.pgm $*.pgm

.pgm.jpg:
     pnmtojpeg $&lt; >$@

</programlisting>
    <para>
      If you are using &TeX; instead of &LaTeX;, change the first
      rule above to:
    </para>
    <programlisting
>.tex.dvi:
     tex $&lt;
</programlisting>
    <para>
      The first, and therefore default, <application
      >make</application > target is <code >all</code >.  It
      depends on <code >web</code >, which builds the Web side,
      and <code >pdf</code >, which builds the PDF.  These first
      rules are from the stock <filename >Makefile</filename >,
      except that we note that the HTML route depends on the
      JPG forms of the equations, and the PDF route depends on
      the Encapsulated PDF equations.
    </para>
    <programlisting
>all: web pdf

web: $(TARGET).html

$(TARGET).html: $(SOURCE) $(JPG_EQUATIONS)

pdf: $(TARGET).pdf $(PDF_EQUATIONS)

$(TARGET).pdf: $(SOURCE) $(PDF_EQUATIONS)
</programlisting>
    <para>
      Finally, the <code >clean</code > target removes the HTML
      and PDF product files, as well as the included equations.
    </para>
    <programlisting
>clean:
     rm -f $(TARGET).fo $(TARGET).pdf *.html $(JPG_EQUATIONS) $(PDF_EQUATIONS)
</programlisting>
    </section> <!--math-makefile-->
    <section id='inline-math-simple'>
      <title>Simple inline math</title>
      <para>
        There are two ways to include mathematical formulae as
        inlines within a paragraph.
      </para>
      <para>
        If your expressions are relatively simple, you can
        enclose them inside an element like this:
        <programlisting
>&lt;phrase role="math"&gt;&#x2026;&lt;/phrase&gt;
</programlisting>
        This will show all letters in italics.  Here is an
        example:
        <blockquote>
          <para>
            We must prove that <phrase role='math'
            >a<superscript >2</superscript >&lt;b<subscript
            >x</subscript ></phrase > for all cases.
          </para>
        </blockquote>
        Here is the source for that example:
        <programlisting
>    We must prove that
    &lt;phrase role='math' &gt;a&lt;superscript &gt;2&lt;/superscript
    &gt;&amp;lt;b&lt;subscript &gt;x&lt;/subscript &gt;&lt;/phrase &gt;
    for all cases.
</programlisting>
      </para>
    </section> <!--inline-math-simple-->
    <section id='inline-math-tex'>
      <title>Inline math using &LaTeX; or &TeX;</title>
      <para>
        You can include &LaTeX; or &TeX; math formulae as
        inlines.  The preparation is the same as for displayed
        math.  However, the baseline of these elements might not
        line up with the baseline of the surrounding text.
        Because this technique is somewhat ugly, it should be
        used only when you need characters unavailable in regular
        &DB; (see <xref linkend='special-chars' />).
      </para>
      <para>
        The graphic is included using the techniques described in
        <xref linkend='inline-graphics' />.
      </para>
      <para>
        Here is an example of this technique:
        <blockquote>
          <para>
            We must prove that
            <inlinemediaobject>
              <imageobject role='html'>
                <imagedata fileref='&selfURL;inmath.jpg'/>
              </imageobject>
              <imageobject role='fo'>
                <imagedata fileref='inmath.pdf'/>
              </imageobject>
            </inlinemediaobject>
            in all cases.
          </para>
        </blockquote>
        And here is the source:
        <programlisting
>    &lt;para&gt;
      We must prove that
      &lt;inlinemediaobject&gt;
        &lt;imageobject role='html'&gt;
          &lt;imagedata fileref='&selfURL;inmath.jpg'/&gt;
        &lt;/imageobject&gt;
        &lt;imageobject role='fo'&gt;
          &lt;imagedata fileref='inmath.pdf'/&gt;
        &lt;/imageobject&gt;
      &lt;/inlinemediaobject&gt;
      in all cases.
    &lt;/para&gt;
</programlisting>
      </para>
    </section> <!--inline-math-tex-->
  </section> <!--tex-math-->
  <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
      &#x201c;<code >_</code >&#x201d;, and hyphens
      &#x201c;<code >-</code >&#x201d;).
    </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 &#x201c;&gt;&#x201d;.  Each
      declaration looks like this:
      <programlisting
>    &lt;!ENTITY <replaceable
                >n</replaceable> "<replaceable>T</replaceable
                >"&gt;
</programlisting>
      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 DaisyMatic, 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;product;</code > as the text
      &#x201c;DaisyMatic&#x201d; by changing your document type
      declaration to look like this:
    </para>
    <programlisting
>&lt;!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
 "&dbdtdURL;"
 [ &lt;!ENTITY product "DaisyMatic"&gt;
 ]
&gt;
</programlisting>
    <para>
      With the above definition, anyplace that <code
      >&amp;product;</code > appears in your XML source file, it
      will be replaced by &#x201c;DaisyMatic&#x201d;.
    </para>
    <para>
      Then, when the marketing department decides that the
      external product name is going to be
      &#x201c;MegaMonsterMatic-3000&#x201d;, just change the
      replacement text and rebuild your document, and the new
      product name will appear everywhere:
    </para>
    <programlisting
>&lt;!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
 "&dbdtdURL;"
 [ &lt;!ENTITY product "MegaMonsterMatic-3000"&gt;
 ]
&gt;
</programlisting>
    <para>
      You can have any number of entity declarations between the
      square brackets &#x201c;<code >[...]</code >&#x201d;.
    </para>
    <para>
      A highly useful technique is to declare entities whose
      values include other entities.  For example, the URL of the
      current document is:

      <programlisting
>&selfURL;
</programlisting>

      We would like it to be easy to move all references to this
      page and its sub-pages.  Furthermore, we would like it to
      be easy to fix references to other documents elsewhere in
      the Tech Computer Center structure that may someday move to
      a different URL.
    </para>
    <para>
      Consequently, the source for the current document (see
      <xref linkend='online-files' />) has these entities in
      its <code >DOCTYPE</code > declaration:      
      
      <programlisting
>    &lt;!ENTITY  selfName     "docbook43">
    &lt;!ENTITY  nmtURL       "http://www.nmt.edu/">
    &lt;!ENTITY  tccURL       "&amp;nmtURL;tcc/">
    &lt;!ENTITY  helpURL      "&amp;tccURL;help/">
    &lt;!ENTITY  pubsURL      "&amp;helpURL;pubs/">
    &lt;!ENTITY  selfURL      "&amp;pubsURL;&amp;selfName;/">
    &lt;!ENTITY  selfPDFName  "&amp;selfName;.pdf">
    &lt;!ENTITY  selfPDFFile  "&lt;filename&gt;&amp;selfPDFName;&lt;/filename&gt;">
    &lt;!ENTITY  selfXMLName  "&amp;selfName;.xml">
    &lt;!ENTITY  selfXMLFile  "&lt;filename&gt;&amp;selfXMLName;&lt;/filename&gt;">
</programlisting>
    </para>
    <para>
      Here is a table showing how these are expanded:
    </para>
    <informaltable>
      <tgroup cols="2">
        <colspec align="left"/>
        <colspec align="left"/>
        <tbody>
          <row>
            <entry valign="top"><code>&amp;selfName;</code></entry>
            <entry valign="top">
              <code >docbook43</code >
            </entry>
          </row>
          <row>
            <entry valign='top'>
              <code>&amp;nmtURL;</code>
            </entry>
            <entry valign='top'>
              <code>&nmtURL;</code>
            </entry>
          </row>
          <row>
            <entry valign='top'>
              <code>&amp;tccURL;</code>
            </entry>
            <entry valign='top'>
              <code>&tccURL;</code>
            </entry>
          </row>
          <row>
            <entry valign='top'>
              <code>&amp;helpURL;</code>
            </entry>
            <entry valign='top'>
              <code>&helpURL;</code>
            </entry>
          </row>
          <row>
            <entry valign='top'>
              <code>&amp;pubsURL;</code>
            </entry>
            <entry valign='top'>
              <code>&pubsURL;</code>
            </entry>
          </row>
          <row>
            <entry valign='top'>
              <code>&amp;selfURL;</code>
            </entry>
            <entry valign='top'>
              <code>&selfURL;</code>
            </entry>
          </row>
          <row>
            <entry valign='top'>
              <code>&amp;selfPDFName;</code>
            </entry>
            <entry valign='top'>
              <code>&selfPDFName;</code>
            </entry>
          </row>
          <row>
            <entry valign='top'>
              <code>&amp;selfPDFFile;</code>
            </entry>
            <entry valign='top'>
              <code>&lt;filename&gt;&selfPDFFile;&lt;/filename&gt;</code>
            </entry>
          </row>
          <row>
            <entry valign='top'>
              <code>&amp;selfXMLName;</code>
            </entry>
            <entry valign='top'>
              <code>&selfXMLName;</code>
            </entry>
          </row>
          <row>
            <entry valign='top'>
              <code>&amp;selfXMLFile;</code>
            </entry>
            <entry valign='top'>
              <code>&lt;filename&gt;&selfXMLFile;&lt;/filename&gt;</code>
            </entry>
          </row>
          <row>
            <entry valign='top'>
              <code>&amp;selfURL;&amp;selfPDFName;</code>
            </entry>
            <entry valign='top'>
              <code>&selfURL;&selfPDFName;</code>
            </entry>
          </row>
        </tbody>
      </tgroup>
    </informaltable>
  </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
      &#x201c;<code >&amp;<replaceable
      >new-name</replaceable>;</code >&#x201d;.  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&#x2014;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"
  "&dbdtdURL;"
  [ &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;
    &#x2026;  &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, &#x00b0;), your HTML and PDF output
      files will still build normally, but some editing tools
      (such as <ulink url="&nxmlURL;" ><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
      &#x201c;<code >&amp;deg;</code >&#x201d; can also be expressed
      as &#x201c;<code >&amp;#x00b0;</code >&#x201d;.  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='decluttering'>
    <title>Decluttering the project directory</title>
    <para>
      Normally, the generated <filename >.html</filename > pages
      are placed in the same directory as the source <filename
      >.xml</filename > file.  For larger documents with many
      sections, this can lead to a directory with a lot of files
      in it.
    </para>
    <para>
      Follow this procedure to relocate all the generated
      <filename >.html</filename > files to a <filename
      >web/</filename > subdirectory.
    </para>
    <procedure>
      <step>
        <para>
          You will need to modify your <filename
          >Makefile</filename >.  See <xref
          linkend='make-large' /> for a discussion of the
          changed rules.
        </para>
      </step>
      <step>
        <para>
          You will need to create a file named <filename
          >.htaccess</filename > in the same directory as your
          <filename >.xml</filename > source file.  This file
          instructs Web browsers to redirect all requests for
          Web files in this directory to look in the <filename
          >web/</filename > subdirectory instead.
        </para>
        <para>
          Here is a generic <filename >.htaccess</filename > file:
        </para>
        <programlisting
>RedirectMatch <replaceable >P</replaceable
    >/([^/\.]*\.html) <replaceable >P</replaceable >/web/$1 [R=301]
RedirectMatch <replaceable >P</replaceable
    >/web/homepage.html <replaceable >P</replaceable >/web/index.html
</programlisting>
        <para>
          Wherever <code ><replaceable >P</replaceable ></code >
          appears in the above skeleton, substitute the URL of
          the document's directory, starting after the <filename
          >http://<replaceable >server.domain</replaceable
          ></filename > part, but including the initial
          &#x201c;<code >/</code >&#x201d;.  The &#x201c;<code
          >[R=301]</code >&#x201d; informs browsers that the page
          has moved permanently; without this, the <guibutton
          >Back</guibutton > button would not work correctly.
        </para>
        <para>
          For example, here is the <filename >.htaccess</filename
          > file for this document:
        </para>
        <programlisting
>&htaccess;</programlisting>
      </step>
    </procedure>
  </section> <!--decluttering-->
  <section id='literate-programming'>
    <title>Literate programming with &DB;</title>
    <para>
      <ulink url='&wikipedia;Literate_programming' >Literate
      programming</ulink > is a venerable technique invented in
      the early 1980s by Don Knuth.
    </para>
    <para>
      There are four approaches to documenting programs:
    </para>
    <itemizedlist>
      <listitem>
        <para>
          No documentation at all.  Common, but highly
          unprofessional.
        </para>
      </listitem>
      <listitem>
        <para>
          Documentation separate from the program's source code.
        </para>
      </listitem>
      <listitem>
        <para>
          Documentation embedded within the program's source
          code.  Systems such as <ulink url='&wikipedia;Perldoc'
          ><code >perldoc</code ></ulink > and <ulink
          url='&wikipedia;Pydoc' ><code >pydoc</code ></ulink >
          allow the programmer to use specially formatted
          comments to document the code.
        </para>
        <para>
          Although almost any documentation is better than no
          documentation, this approach limits the toolkit of the
          documentation writer rather severely, bereft of tools
          for such features as figures and serious tables.
        </para>
      </listitem>
      <listitem>
        <para>
          With literate programming, the <emphasis >program
          source code is inside the document</emphasis >,
          embedded within a narrative that explains the author's
          thought processes.  This gives you the full toolset of
          your documentation system, and allows you to use
          pictures, diagrams and tables to explain your design.
        </para>
      </listitem>
    </itemizedlist>
    <para>
      <ulink url='&litprogURL;' >Lightweight literate
      programming</ulink > is a simplification of Knuth's
      approach: instead of Knuth's <application
      >cweb</application > tool, you write your documentation and
      source code using a regular word processing system.
    </para>
    <para>
      If you use &DB; as described in this document, you can
      easily embed source code for later extraction and use.
      Encode each fragment in a <code >programlisting</code >
      element with this general form:

      <programlisting
>&lt;programlisting role="outFile:<replaceable >F</replaceable >"&gt;
    <replaceable >your source code here</replaceable >    
&lt;/programlisting
</programlisting>

      where <code ><replaceable >F</replaceable ></code > is the
      name of the file to which you want this fragment written.
    </para>
    <para>
      Here is an example.  Suppose you are writing a C program
      that consists of two files, a header file named <filename
      >foo.h</filename > and a source code file named <filename
      >foo.c</filename >.  Part of your XML documentation for
      this program might look like this:
    </para>
    <programlisting
>&lt;programlisting role='outFile:foo.h'&gt;
    <replaceable >stuff to be written to foo.h</replaceable >
&lt;/programlisting&gt;
   ...
&lt;programlisting role='outFile:foo.c'&gt;
    <replaceable >stuff to be written to foo.c</replaceable >
&lt;/programlisting&gt;
</programlisting>
    <para>
      If you name the same output file in more than one <code
      >programlisting</code > section, all the fragments will
      appear in the output file in the same order in which they
      occur in your document.
    </para>
    <para>
      Once you have encoded your program in this way, you will
      build the HTML and PDF renderings in the usual way.  To
      extract the code from the &DB; XML file, see <ulink
      url='&litlxmlURL;' ><citetitle >&litlxmlApp;: A source
      extractor for lightweight literate programming</citetitle
      ></ulink >.
    </para>
    <para>
      If you are using the Unix &make; application to build files
      in your document, see <xref linkend='make-lit' />.
    </para>
    <section id='lit-blank-control'>
      <title>Controlling spurious blanks and blank lines</title>
      <para>
        Every character after the opening <code
        >&lt;programlisting&gt;</code > tag, up to the closing
        <code >&lt;/programlisting&gt;</code > tag, is written to
        the file.  Hence, if the opening tag is on the line
        before the first line of your program fragment, the
        content written to the output file will start with an
        empty line.
      </para>
      <para>
        Also, if your closing <code
        >&lt;/programlisting&gt;</code > tag is indented, the
        output will include the indentation whitespace.
      </para>
      <para>
        To avoid these extra spaces, move the closing
        &#x201c;<code >&gt;</code >&#x201d; of the opening tag to
        just before the first line of your fragment, and place
        the closing tag in column 1 of your &DB; source file.
      </para>
      <para>
        For example, here is how a two-line <code >bash</code >
        script must be encoded so that only these two lines will
        appear in the output.  Suppose your XML is currently
        indenting four spaces in this section.
      </para>
      <programlisting
>    &lt;para&gt;
      Here is the &lt;code&gt;whereami&lt;/code&gt; script:
    &lt;/para&gt;
    &lt;programlisting role='outFile:whereami'
&gt;#!/bin/bash
echo $HOSTNAME
&lt;/programlisting&gt;
    &lt;para&gt;
      <replaceable >etc.</replaceable >
    &lt;/para&gt;
    ...
</programlisting>
    </section> <!--lit-blank-control-->
  </section> <!--literate-programming-->
  <section id='special-chars'>
    <title>Special characters</title>
    <para>
      A wide variety of special symbols are available in &DB;.
      These <firstterm >character entities</firstterm > always
      start with an ampersand (<code >&amp;</code >) and end with
      a semicolon (<code >;</code >).
    </para>
    <para>
      For more information on named Unicode characters, see
      <ulink url='&charsURL;' ><citetitle >XML entity definitions
      for characters</citetitle ></ulink >.  However, there is no
      guarantee that any of these entities will work in the local
      toolchain; it is best to test any characters before using
      them in publications.
    </para>
    <section id='special-universal'>
      <title>Universally available entities</title>
      <para>
        Entities for these five special characters are always
        available:
      </para>
      <informaltable>
        <tgroup cols="2">
          <colspec align="left"></colspec>
          <colspec 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>
    </section> <!--special-universal-->
    <section id='special-international'>
      <title>International character entities</title>
      <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 align="left"></colspec>
          <colspec align="center"></colspec>
          <colspec 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>&#x00e1;</entry>
              <entry><code >&amp;#x00e1;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Aacute;</code ></entry>
              <entry>&#x00c1;</entry>
              <entry><code >&amp;#x00c1;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;acirc;</code ></entry>
              <entry>&#x00e2;</entry>
              <entry><code >&amp;#x00e2;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Acirc;</code ></entry>
              <entry>&#x00c2;</entry>
              <entry><code >&amp;#x00c2;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;agrave;</code ></entry>
              <entry>&#x00e0;</entry>
              <entry><code >&amp;#x00e0;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Agrave;</code ></entry>
              <entry>&#x00c0;</entry>
              <entry><code >&amp;#x00c0;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;aring;</code ></entry>
              <entry>&#x00e5;</entry>
              <entry><code >&amp;#x00e5;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Aring;</code ></entry>
              <entry>&#x00c5;</entry>
              <entry><code >&amp;#x00c5;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;atilde;</code ></entry>
              <entry>&#x00e3;</entry>
              <entry><code >&amp;#x00e3;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Atilde;</code ></entry>
              <entry>&#x00c3;</entry>
              <entry><code >&amp;#x00c3;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;auml;</code ></entry>
              <entry>&#x00e4;</entry>
              <entry><code >&amp;#x00e4;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Auml;</code ></entry>
              <entry>&#x00c4;</entry>
              <entry><code >&amp;#x00c4;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;aelig;</code ></entry>
              <entry>&#x00e6;</entry>
              <entry><code >&amp;#x00e6;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;AElig;</code ></entry>
              <entry>&#x00c6;</entry>
              <entry><code >&amp;#x00c6;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;ccedil;</code ></entry>
              <entry>&#x00e7;</entry>
              <entry><code >&amp;#x00e7;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Ccedil;</code ></entry>
              <entry>&#x00c7;</entry>
              <entry><code >&amp;#x00c7;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;eth;</code ></entry>
              <entry>&#x00f0;</entry>
              <entry><code >&amp;#x00f0;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;ETH;</code ></entry>
              <entry>&#x00e9;</entry>
              <entry><code >&amp;#x00e9;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;eacute;</code ></entry>
              <entry>&#x00e9;</entry>
              <entry><code >&amp;#x00e9;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Eacute;</code ></entry>
              <entry>&#x00c9;</entry>
              <entry><code >&amp;#x00c9;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;ecirc;</code ></entry>
              <entry>&#x00ea;</entry>
              <entry><code >&amp;#x00ea;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Ecirc;</code ></entry>
              <entry>&#x00ca;</entry>
              <entry><code >&amp;#x00ca;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;egrave;</code ></entry>
              <entry>&#x00e8;</entry>
              <entry><code >&amp;#x00e8;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Egrave;</code ></entry>
              <entry>&#x00c8;</entry>
              <entry><code >&amp;#x00c8;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;euml;</code ></entry>
              <entry>&#x00eb;</entry>
              <entry><code >&amp;#x00eb;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Euml;</code ></entry>
              <entry>&#x00cb;</entry>
              <entry><code >&amp;#x00cb;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;iacute;</code ></entry>
              <entry>&#x00ed;</entry>
              <entry><code >&amp;#x00ed;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Iacute;</code ></entry>
              <entry>&#x00cd;</entry>
              <entry><code >&amp;#x00cd;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;icirc;</code ></entry>
              <entry>&#x00ee;</entry>
              <entry><code >&amp;#x00ee;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Icirc;</code ></entry>
              <entry>&#x00ce;</entry>
              <entry><code >&amp;#x00ce;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;igrave;</code ></entry>
              <entry>&#x00ec;</entry>
              <entry><code >&amp;#x00ec;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Igrave;</code ></entry>
              <entry>&#x00cc;</entry>
              <entry><code >&amp;#x00cc;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;iuml;</code ></entry>
              <entry>&#x00ef;</entry>
              <entry><code >&amp;#x00ef;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Iuml;</code ></entry>
              <entry>&#x00cf;</entry>
              <entry><code >&amp;#x00cf;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;ntilde;</code ></entry>
              <entry>&#x00f1;</entry>
              <entry><code >&amp;#x00f1;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Ntilde;</code ></entry>
              <entry>&#x00d1;</entry>
              <entry><code >&amp;#x00d1;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;oacute;</code ></entry>
              <entry>&#x00f3;</entry>
              <entry><code >&amp;#x00f3;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Oacute;</code ></entry>
              <entry>&#x00d3;</entry>
              <entry><code >&amp;#x00d3;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;ocirc;</code ></entry>
              <entry>&#x00f4;</entry>
              <entry><code >&amp;#x00f4;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Ocirc;</code ></entry>
              <entry>&#x00d4;</entry>
              <entry><code >&amp;#x00d4;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;ograve;</code ></entry>
              <entry>&#x00f2;</entry>
              <entry><code >&amp;#x00f2;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Ograve;</code ></entry>
              <entry>&#x00d2;</entry>
              <entry><code >&amp;#x00d2;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;oslash;</code ></entry>
              <entry>&#x00f8;</entry>
              <entry><code >&amp;#x00f8;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Oslash;</code ></entry>
              <entry>&#x00d8;</entry>
              <entry><code >&amp;#x00d8;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;otilde;</code ></entry>
              <entry>&#x00f5;</entry>
              <entry><code >&amp;#x00f5;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Otilde;</code ></entry>
              <entry>&#x00d5;</entry>
              <entry><code >&amp;#x00d5;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;ouml;</code ></entry>
              <entry>&#x00f6;</entry>
              <entry><code >&amp;#x00f6;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Ouml;</code ></entry>
              <entry>&#x00d6;</entry>
              <entry><code >&amp;#x00d6;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;szlig;</code ></entry>
              <entry>&#x00df;</entry>
              <entry><code >&amp;#x00df;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;thorn;</code ></entry>
              <entry>&#x00fe;</entry>
              <entry><code >&amp;#x00fe;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;THORN;</code ></entry>
              <entry>&#x00de;</entry>
              <entry><code >&amp;#x00de;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;uacute;</code ></entry>
              <entry>&#x00fa;</entry>
              <entry><code >&amp;#x00fa;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Uacute;</code ></entry>
              <entry>&#x00da;</entry>
              <entry><code >&amp;#x00da;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;ucirc;</code ></entry>
              <entry>&#x00fb;</entry>
              <entry><code >&amp;#x00fb;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Ucirc;</code ></entry>
              <entry>&#x00db;</entry>
              <entry><code >&amp;#x00db;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;ugrave;</code ></entry>
              <entry>&#x00f9;</entry>
              <entry><code >&amp;#x00f9;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Ugrave;</code ></entry>
              <entry>&#x00d9;</entry>
              <entry><code >&amp;#x00d9;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;uuml;</code ></entry>
              <entry>&#x00fc;</entry>
              <entry><code >&amp;#x00fc;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Uuml;</code ></entry>
              <entry>&#x00dc;</entry>
              <entry><code >&amp;#x00dc;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;yacute;</code ></entry>
              <entry>&#x00fd;</entry>
              <entry><code >&amp;#x00fd;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;Yacute;</code ></entry>
              <entry>&#x00dd;</entry>
              <entry><code >&amp;#x00dd;</code ></entry>
            </row>
            <row>
              <entry><code >&amp;yuml;</code ></entry>
              <entry>&#x00ff;</entry>
              <entry><code >&amp;#x00ff;</code ></entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>
    </section> <!--special-international-->
    <section id='special-greek'>
      <title>The Greek alphabet</title>
      <informaltable>
        <tgroup cols="4">
          <colspec align="left"></colspec>
          <colspec align="center"></colspec>
          <colspec align="left"></colspec>
          <colspec align="left"></colspec>
          <thead>
            <row>
              <entry>Entity</entry>
              <entry>Character</entry>
              <entry>Equivalent</entry>
              <entry>Name</entry>
            </row>
          </thead>
          <tbody>
            <row>
              <entry><code >&amp;Agr;</code ></entry>
              <entry>&#x0391;</entry>
              <entry><code >&amp;#x0391;</code ></entry>
              <entry>Alpha, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;agr;</code ></entry>
              <entry>&#x03b1;</entry>
              <entry><code >&amp;#x03b1;</code ></entry>
              <entry>Alpha, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;Bgr;</code ></entry>
              <entry>&#x0392;</entry>
              <entry><code >&amp;#x0392;</code ></entry>
              <entry>Beta, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;bgr;</code ></entry>
              <entry>&#x03b2;</entry>
              <entry><code >&amp;#x03b2;</code ></entry>
              <entry>Beta, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;Dgr;</code ></entry>
              <entry>&#x0394;</entry>
              <entry><code >&amp;#x0394;</code ></entry>
              <entry>Delta, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;dgr;</code ></entry>
              <entry>&#x03b4;</entry>
              <entry><code >&amp;#x03b4;</code ></entry>
              <entry>Delta, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;EEgr;</code ></entry>
              <entry>&#x0397;</entry>
              <entry><code >&amp;#x0397;</code ></entry>
              <entry>Eta, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;eegr;</code ></entry>
              <entry>&#x03b7;</entry>
              <entry><code >&amp;#x03b7;</code ></entry>
              <entry>Eta, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;Egr;</code ></entry>
              <entry>&#x0395;</entry>
              <entry><code >&amp;#x0395;</code ></entry>
              <entry>Epsilon, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;egr;</code ></entry>
              <entry>&#x03b5;</entry>
              <entry><code >&amp;#x03b5;</code ></entry>
              <entry>Epsilon, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;Ggr;</code ></entry>
              <entry>&#x0393;</entry>
              <entry><code >&amp;#x0393;</code ></entry>
              <entry>Gamma, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;ggr;</code ></entry>
              <entry>&#x03b3;</entry>
              <entry><code >&amp;#x03b3;</code ></entry>
              <entry>Gamma, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;Igr;</code ></entry>
              <entry>&#x0399;</entry>
              <entry><code >&amp;#x0399;</code ></entry>
              <entry>Iota, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;igr;</code ></entry>
              <entry>&#x03b9;</entry>
              <entry><code >&amp;#x03b9;</code ></entry>
              <entry>Iota, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;Kgr;</code ></entry>
              <entry>&#x039a;</entry>
              <entry><code >&amp;#x039a;</code ></entry>
              <entry>Kappa, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;kgr;</code ></entry>
              <entry>&#x3ba;</entry>
              <entry><code >&amp;#x3ba;</code ></entry>
              <entry>Kappa, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;KHgr;</code ></entry>
              <entry>&#x03a7;</entry>
              <entry><code >&amp;#x03a7;</code ></entry>
              <entry>Chi, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;khgr;</code ></entry>
              <entry>&#x03c7;</entry>
              <entry><code >&amp;#x03c7;</code ></entry>
              <entry>Chi, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;Lgr;</code ></entry>
              <entry>&#x039b;</entry>
              <entry><code >&amp;#x039b;</code ></entry>
              <entry>Lambda, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;lgr;</code ></entry>
              <entry>&#x03bb;</entry>
              <entry><code >&amp;#x03bb;</code ></entry>
              <entry>Lambda, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;Mgr;</code ></entry>
              <entry>&#x039c;</entry>
              <entry><code >&amp;#x039c;</code ></entry>
              <entry>Mu, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;mgr;</code ></entry>
              <entry>&#x03bc;</entry>
              <entry><code >&amp;#x03bc;</code ></entry>
              <entry>Mu, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;Ngr;</code ></entry>
              <entry>&#x039d;</entry>
              <entry><code >&amp;#x039d;</code ></entry>
              <entry>Nu, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;ngr;</code ></entry>
              <entry>&#x03bd;</entry>
              <entry><code >&amp;#x03bd;</code ></entry>
              <entry>Nu, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;Ogr;</code ></entry>
              <entry>&#x039f;</entry>
              <entry><code >&amp;#x039f;</code ></entry>
              <entry>Omicron, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;ogr;</code ></entry>
              <entry>&#x03bf;</entry>
              <entry><code >&amp;#x03bf;</code ></entry>
              <entry>Omicron, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;OHgr;</code ></entry>
              <entry>&#x03a9;</entry>
              <entry><code >&amp;#x03a9;</code ></entry>
              <entry>Omega, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;ohgr;</code ></entry>
              <entry>&#x03c9;</entry>
              <entry><code >&amp;#x03c9;</code ></entry>
              <entry>Omega, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;Pgr;</code ></entry>
              <entry>&#x03a0;</entry>
              <entry><code >&amp;#x03a0;</code ></entry>
              <entry>Pi, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;pgr;</code ></entry>
              <entry>&#x03c0;</entry>
              <entry><code >&amp;#x03c0;</code ></entry>
              <entry>Pi, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;PHgr;</code ></entry>
              <entry>&#x03a6;</entry>
              <entry><code >&amp;#x03a6;</code ></entry>
              <entry>Phi, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;phgr;</code ></entry>
              <entry>&#x03c6;</entry>
              <entry><code >&amp;#x03c6;</code ></entry>
              <entry>Phi, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;PSgr;</code ></entry>
              <entry>&#x03a8;</entry>
              <entry><code >&amp;#x03a8;</code ></entry>
              <entry>Psi, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;psgr;</code ></entry>
              <entry>&#x03c8;</entry>
              <entry><code >&amp;#x03c8;</code ></entry>
              <entry>Psi, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;Rgr;</code ></entry>
              <entry>&#x03a1;</entry>
              <entry><code >&amp;#x03a1;</code ></entry>
              <entry>Rho, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;rgr;</code ></entry>
              <entry>&#x03c1;</entry>
              <entry><code >&amp;#x03c1;</code ></entry>
              <entry>Rho, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;Sgr;</code ></entry>
              <entry>&#x03a3;</entry>
              <entry><code >&amp;#x03a3;</code ></entry>
              <entry>Sigma, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;sgr;</code ></entry>
              <entry>&#x03c3;</entry>
              <entry><code >&amp;#x03c3;</code ></entry>
              <entry>Sigma, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;Tgr;</code ></entry>
              <entry>&#x03a4;</entry>
              <entry><code >&amp;#x03a4;</code ></entry>
              <entry>Tau, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;tgr;</code ></entry>
              <entry>&#x03c4;</entry>
              <entry><code >&amp;#x03c4;</code ></entry>
              <entry>Tau, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;THgr;</code ></entry>
              <entry>&#x0398;</entry>
              <entry><code >&amp;#x0398;</code ></entry>
              <entry>Theta, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;thgr;</code ></entry>
              <entry>&#x03b8;</entry>
              <entry><code >&amp;#x03b8;</code ></entry>
              <entry>Theta, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;Ugr;</code ></entry>
              <entry>&#x03a5;</entry>
              <entry><code >&amp;#x03a5;</code ></entry>
              <entry>Upsilon, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;ugr;</code ></entry>
              <entry>&#x03c5;</entry>
              <entry><code >&amp;#x03c5;</code ></entry>
              <entry>Upsilon, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;Xgr;</code ></entry>
              <entry>&#x039e;</entry>
              <entry><code >&amp;#x039e;</code ></entry>
              <entry>Xi, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;xgr;</code ></entry>
              <entry>&#x03be;</entry>
              <entry><code >&amp;#x03be;</code ></entry>
              <entry>Xi, lowercase</entry>
            </row>
            <row>
              <entry><code >&amp;Zgr;</code ></entry>
              <entry>&#x0396;</entry>
              <entry><code >&amp;#x0396;</code ></entry>
              <entry>Zeta, uppercase</entry>
            </row>
            <row>
              <entry><code >&amp;zgr;</code ></entry>
              <entry>&#x03b6;</entry>
              <entry><code >&amp;#x03b6;</code ></entry>
              <entry>Zeta, lowercase</entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>
    </section> <!--special-greek-->
    <section id='special-symbols'>
      <title>Special symbols</title>
      <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 align="left"></colspec>
          <colspec align="center"></colspec>
          <colspec align="left"></colspec>
          <colspec align="left"></colspec>
          <thead>
            <row>
              <entry>Entity</entry>
              <entry>Character</entry>
              <entry>Equivalent</entry>
              <entry>Name</entry>
            </row>
          </thead>
          <tbody>
            <row>
              <entry><code >&amp;and;</code ></entry>
              <entry>&#x2227;</entry>
              <entry><code >&amp;#x2227;</code ></entry>
              <entry>Logical and</entry>
            </row>
            <row>
              <entry><code >&amp;ap;</code ></entry>
              <entry>&#x2248;</entry>
              <entry><code >&amp;#x2248;</code ></entry>
              <entry>Approximately equal to</entry>
            </row>
            <row>
              <entry><code >&amp;brvbar;</code ></entry>
              <entry>&#x00a6;</entry>
              <entry><code >&amp;#x00a6;</code ></entry>
              <entry>Broken vertical bar</entry>
            </row>
            <row>
              <entry><code >&amp;cap;</code ></entry>
              <entry>&#x2229;</entry>
              <entry><code >&amp;#x2229;</code ></entry>
              <entry>Set intersection</entry>
            </row>
            <row>
              <entry><code >&amp;cent;</code ></entry>
              <entry>&#x00a2;</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)
      
    Update: as of 2008-12-187, doesn't work in nxml-emacs, PDF, *or*
    HTML.
            <row>
              <entry><code >&amp;check;</code ></entry>
              <entry>&#x2173;</entry>
              <entry><code >&amp;#x2713;</code ></entry>
              <entry>Check-mark</entry>
            </row>
-->
            <row>
              <entry><code >&amp;copy;</code ></entry>
              <entry>&#x00a9;</entry>
              <entry><code >&amp;#x00a9;</code ></entry>
              <entry>Copyright</entry>
            </row>
            <row>
              <entry><code >&amp;cup;</code ></entry>
              <entry>&#x222a;</entry>
              <entry><code >&amp;#x222a;</code ></entry>
              <entry>Set union</entry>
            </row>
            <row>
              <entry><code >&amp;curren;</code ></entry>
              <entry>&#x00a4;</entry>
              <entry><code >&amp;#x00a4;</code ></entry>
              <entry>Currency symbol</entry>
            </row>
            <row>
              <entry><code >&amp;dagger;</code ></entry>
              <entry>&#x2020;</entry>
              <entry><code >&amp;#x2020;</code ></entry>
              <entry>Dagger</entry>
            </row>
            <row>
              <entry><code >&amp;Dagger;</code ></entry>
              <entry>&#x2021;</entry>
              <entry><code >&amp;#x2021;</code ></entry>
              <entry>Double dagger</entry>
            </row>
            <row>
              <entry><code >&amp;deg;</code ></entry>
              <entry>&#x00b0;</entry>
              <entry><code >&amp;#x00b0;</code ></entry>
              <entry>Degree symbol</entry>
            </row>
            <row>
              <entry><code >&amp;divide;</code ></entry>
              <entry>&#x00f7;</entry>
              <entry><code >&amp;#x00f7;</code ></entry>
              <entry>Division</entry>
            </row>
            <row>
              <entry><code >&amp;darr;</code ></entry>
              <entry>&#x2193;</entry>
              <entry><code >&amp;#x2193;</code ></entry>
              <entry>Down arrow</entry>
            </row>
            <row>
              <entry><code >&amp;empty;</code ></entry>
              <entry>&#x2205;</entry>
              <entry><code >&amp;#x2205;</code ></entry>
              <entry>Empty set</entry>
            </row>
            <row>
              <entry><code >&amp;equiv;</code ></entry>
              <entry>&#x2261;</entry>
              <entry><code >&amp;#x2261;</code ></entry>
              <entry>Identical to</entry>
            </row>
            <row>
              <entry><code >&amp;euro;</code ></entry>
              <entry>&#x20ac;</entry>
              <entry><code >&amp;#x20ac;</code ></entry>
              <entry>Euro currency symbol</entry>
            </row>
            <row>
              <entry><code >&amp;exist;</code ></entry>
              <entry>&#x2203;</entry>
              <entry><code >&amp;#x2203;</code ></entry>
              <entry>There exists</entry>
            </row>
            <row>
              <entry><code >&amp;forall;</code ></entry>
              <entry>&#x2200;</entry>
              <entry><code >&amp;#x2200;</code ></entry>
              <entry>For all</entry>
            </row>
            <row>
              <entry><code >&amp;ge;</code ></entry>
              <entry>&#x2265;</entry>
              <entry><code >&amp;#x2265;</code ></entry>
              <entry>Greater than or equal to</entry>
            </row>
            <row>
              <entry><code >&amp;harr;</code ></entry>
              <entry>&#x2194;</entry>
              <entry><code >&amp;#x2194;</code ></entry>
              <entry>Double-headed arrow</entry>
            </row>
            <row>
              <entry><code >&amp;Harr;</code ></entry>
              <entry>&#x21d4;</entry>
              <entry><code >&amp;#x21d4;</code ></entry>
              <entry>Double-headed arrow</entry>
            </row>
            <row>
              <entry><code >&amp;hellip;</code ></entry>
              <entry>&#x2026;</entry>
              <entry><code >&amp;#x2026;</code ></entry>
              <entry>Horizontal ellipsis</entry>
            </row>
            <row>
              <entry><code >&amp;iexcl;</code ></entry>
              <entry>&#x00a1;</entry>
              <entry><code >&amp;#x00a1;</code ></entry>
              <entry>Inverted exclamation point</entry>
            </row>
            <row>
              <entry><code >&amp;iquest;</code ></entry>
              <entry>&#x00bf;</entry>
              <entry><code >&amp;#x00bf;</code ></entry>
              <entry>Inverted question mark</entry>
            </row>
            <row>
              <entry><code >&amp;isin;</code ></entry>
              <entry>&#x2208;</entry>
              <entry><code >&amp;#x2208;</code ></entry>
              <entry>Element of</entry>
            </row>
            <row>
              <entry><code >&amp;laquo;</code ></entry>
              <entry>&#x00ab;</entry>
              <entry><code >&amp;#x00ab;</code ></entry>
              <entry>Left double angle quotes</entry>
            </row>
            <row>
              <entry><code >&amp;larr;</code ></entry>
              <entry>&#x2190;</entry>
              <entry><code >&amp;#x2190;</code ></entry>
              <entry>Left arrow</entry>
            </row>
            <row>
              <entry><code >&amp;lArr;</code ></entry>
              <entry>&#x21d0;</entry>
              <entry><code >&amp;#x21d0;</code ></entry>
              <entry>Left double arrow</entry>
            </row>
            <row>
              <entry><code >&amp;ldquo;</code ></entry>
              <entry>&#x201c;</entry>
              <entry><code >&amp;#x201c;</code ></entry>
              <entry>Left double quote</entry>
            </row>
            <row>
              <entry><code >&amp;ldquor;</code ></entry>
              <entry>&#x201e;</entry>
              <entry><code >&amp;#x201e;</code ></entry>
              <entry>Double low-nine quote</entry>
            </row>
            <row>
              <entry><code >&amp;le;</code ></entry>
              <entry>&#x2264;</entry>
              <entry><code >&amp;#x2264;</code ></entry>
              <entry>Less than or equal to</entry>
            </row>
            <row>
              <entry><code >&amp;lsquo;</code ></entry>
              <entry>&#x2018;</entry>
              <entry><code >&amp;#x2018;</code ></entry>
              <entry>Left single quote</entry>
            </row>
            <row>
              <entry><code >&amp;lsquor;</code ></entry>
              <entry>&#x201a;</entry>
              <entry><code >&amp;#x201a;</code ></entry>
              <entry>Single low-nine quote</entry>
            </row>
            <row>
              <entry><code >&amp;mdash;</code ></entry>
              <entry>&#x2014;</entry>
              <entry><code >&amp;#x2014;</code ></entry>
              <entry>Em-dash</entry>
            </row>
            <row>
              <entry><code >&amp;middot;</code ></entry>
              <entry>&#x00b7;</entry>
              <entry><code >&amp;#x00b7;</code ></entry>
              <entry>Middle dot</entry>
            </row>
            <row>
              <entry><code >&amp;minus;</code ></entry>
              <entry>&#x2212;</entry>
              <entry><code >&amp;#x2212;</code ></entry>
              <entry>Minus sign</entry>
            </row>
            <row>
              <entry><code >&amp;nbsp;</code ></entry>
              <entry>&#x00a0;</entry>
              <entry><code >&amp;#x00a0;</code ></entry>
              <entry>Non-breaking space</entry>
            </row>
            <row>
              <entry><code >&amp;ndash;</code ></entry>
              <entry>&#x2013;</entry>
              <entry><code >&amp;#x2013;</code ></entry>
              <entry>En-dash</entry>
            </row>
            <row>
              <entry><code >&amp;ne;</code ></entry>
              <entry>&#x2260;</entry>
              <entry><code >&amp;#x2260;</code ></entry>
              <entry>Not equal to</entry>
            </row>
            <row>
              <entry><code >&amp;ni;</code ></entry>
              <entry>&#x220b;</entry>
              <entry><code >&amp;#x220b;</code ></entry>
              <entry>Contains</entry>
            </row>
            <row>
              <entry><code >&amp;notin;</code ></entry>
              <entry>&#x2209;</entry>
              <entry><code >&amp;#x2209;</code ></entry>
              <entry>Not an element of</entry>
            </row>
            <row>
              <entry><code >&amp;or;</code ></entry>
              <entry>&#x2228;</entry>
              <entry><code >&amp;#x2228;</code ></entry>
              <entry>Logical or</entry>
            </row>
            <row>
              <entry><code >&amp;para;</code ></entry>
              <entry>&#x00b6;</entry>
              <entry><code >&amp;#x00b6;</code ></entry>
              <entry>Paragraph (pilcrow) symbol</entry>
            </row>
            <row>
              <entry><code >&amp;plusmn;</code ></entry>
              <entry>&#x00b1;</entry>
              <entry><code >&amp;#x00b1;</code ></entry>
              <entry>Plus or minus</entry>
            </row>
            <row>
              <entry><code >&amp;pound;</code ></entry>
              <entry>&#x00a3;</entry>
              <entry><code >&amp;#x00a3;</code ></entry>
              <entry>Pounds sterling</entry>
            </row>
            <row>
              <entry><code >&amp;prime;</code ></entry>
              <entry>&#x2032;</entry>
              <entry><code >&amp;#x2032;</code ></entry>
              <entry>Prime</entry>
            </row>
            <row>
              <entry><code >&amp;Prime;</code ></entry>
              <entry>&#x2033;</entry>
              <entry><code >&amp;#x2033;</code ></entry>
              <entry>Double prime</entry>
            </row>
            <row>
              <entry><code >&amp;raquo;</code ></entry>
              <entry>&#x00bb;</entry>
              <entry><code >&amp;#x00bb;</code ></entry>
              <entry>Right double angle quotes</entry>
            </row>
            <row>
              <entry><code >&amp;rarr;</code ></entry>
              <entry>&#x2192;</entry>
              <entry><code >&amp;#x2192;</code ></entry>
              <entry>Right arrow</entry>
            </row>
            <row>
              <entry><code >&amp;rArr;</code ></entry>
              <entry>&#x21D2;</entry>
              <entry><code >&amp;#x21D2;</code ></entry>
              <entry>Double right arrow</entry>
            </row>
            <row>
              <entry><code >&amp;rdquo;</code ></entry>
              <entry>&#x201d;</entry>
              <entry><code >&amp;#x201d;</code ></entry>
              <entry>Right double quote</entry>
            </row>
            <row>
              <entry><code >&amp;reg;</code ></entry>
              <entry>&#x00ae;</entry>
              <entry><code >&amp;#x00ae;</code ></entry>
              <entry>Registered</entry>
            </row>
            <row>
              <entry><code >&amp;rdquor;</code ></entry>
              <entry>&#x201d;</entry>
              <entry><code >&amp;#x201d;</code ></entry>
              <entry>Double high reversed quote</entry>
            </row>
            <row>
              <entry><code >&amp;rsquo;</code ></entry>
              <entry>&#x2019;</entry>
              <entry><code >&amp;#x2019;</code ></entry>
              <entry>Right single quote</entry>
            </row>
            <row>
              <entry><code >&amp;sect;</code ></entry>
              <entry>&#x00a7;</entry>
              <entry><code >&amp;#x00a7;</code ></entry>
              <entry>Section symbol</entry>
            </row>
            <row>
              <entry><code >&amp;sim;</code ></entry>
              <entry>&#x223c;</entry>
              <entry><code >&amp;#x223c;</code ></entry>
              <entry>Similar to</entry>
            </row>
            <row>
              <entry><code >&amp;sub;</code ></entry>
              <entry>&#x2282;</entry>
              <entry><code >&amp;#x2282;</code ></entry>
              <entry>Subset of</entry>
            </row>
            <row>
              <entry><code >&amp;sube;</code ></entry>
              <entry>&#x2286;</entry>
              <entry><code >&amp;#x2286;</code ></entry>
              <entry>Subset of or equal to</entry>
            </row>
            <row>
              <entry><code >&amp;sup;</code ></entry>
              <entry>&#x2283;</entry>
              <entry><code >&amp;#x2283;</code ></entry>
              <entry>Superset of</entry>
            </row>
            <row>
              <entry><code >&amp;supe;</code ></entry>
              <entry>&#x2287;</entry>
              <entry><code >&amp;#x2287;</code ></entry>
              <entry>Superset of or equal to</entry>
            </row>
            <row>
              <entry><code >&amp;thinsp;</code ></entry>
              <entry>&#x2009;</entry>
              <entry><code >&amp;#x2009;</code ></entry>
              <entry>Thin space</entry>
            </row>
            <row>
              <entry><code >&amp;times;</code ></entry>
              <entry>&#x00d7;</entry>
              <entry><code >&amp;#x00d7;</code ></entry>
              <entry>Multiplication</entry>
            </row>
            <row>
              <entry><code >&amp;trade;</code ></entry>
              <entry>&#x2122;</entry>
              <entry><code >&amp;#x2122;</code ></entry>
              <entry>Trademark</entry>
            </row>
            <row>
              <entry><code >&amp;uarr;</code ></entry>
              <entry>&#x2191;</entry>
              <entry><code >&amp;#x2191;</code ></entry>
              <entry>Up arrow</entry>
            </row>
            <row>
              <entry><code >&amp;yen;</code ></entry>
              <entry>&#x00a5;</entry>
              <entry><code >&amp;#x00a5;</code ></entry>
              <entry>Yen symbol</entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>
    </section> <!--special-symbols-->
  </section> <!--special-chars-->
  <section id='model-makefiles'>
    <title>Model files for <code >make</code ></title>
    <para>
      In this section we present three model <filename
      >Makefile</filename > files that you can adapt for
      your DocBook project.
    </para>
    <itemizedlist>
      <listitem>
        <para>
          <xref linkend='make-basic' />: To get you started.
        </para>
      </listitem>
      <listitem>
        <para>
          <xref linkend='make-lit' />: When your &DB; document
          contains files to be extracted.  See <xref
          linkend='literate-programming' />.
        </para>
      </listitem>
      <listitem>
        <para>
          <xref linkend='make-large' />: To implement the
          techniques described in <xref linkend='decluttering'
          />.
        </para>
      </listitem>
    </itemizedlist>
    <section id='make-basic'>
      <title>&makeBasicFile;: A basic <filename
      >Makefile</filename ></title>
      <para>
        Here is file &makeBasicFile;.  Download this from <xref
        linkend='online-files' />, rename it as <filename
        >Makefile</filename >, and replace <code
        >your-project-name-here</code > with the name of your
        DocBook XML file, without its <filename >.xml</filename >
        suffix.
      </para>
      <programlisting role='outFile:&makeBasicName;'
># Makefile for DocBook projects: Basic version
#   This file is extracted automatically from:
#     &selfURL;
#================================================================
# Definitions
#----------------------------------------------------------------
# BASENAME:        The base file name of the DocBook file.
# SOURCE:          The .xml file containing the document.
# WEB_TARGET:      Top-level generated HTML page name.
# FO_TARGET:       Intermediate file for generated PDF.
# PDF_TARGET:      Generated PDF file name.
# INDEX_BASE:      Base name for index of section id values.
# INDEX_FO:        Intermediate file for section index.
# INDEX_PDF:       Section index PDF file name.
# TCC_XSL:         Where the local customization layer lives.
# HTML_TRANSFORM:  XSLT to build the HTML rendering.
# PDF_TRANSFORM:   XSLT to build the PDF rendering.
# XSLT_HTML_OPT passes options to xsltproc to build the HTML form.
#     To push chunking down to subsections:
#        --stringparam chunk.section.depth 2 
#     To move the first subsection to its own chunk:
#        --stringparam chunk.first.sections 1
#     To show subsubsections in the table of contents:
#        --stringparam toc.section.depth 3
# XSLT_FO_OPT:  Options for hardcopy.
#     To show subsubsections in the table of contents:
#        --stringparam toc.section.depth 3
# XEP_OPT:  Options to xep
#     To suppress most output:
#        -quiet
#----------------------------------------------------------------
BASENAME        =  your-project-name-here
SOURCE          =  $(BASENAME).xml
WEB_TARGET      =  index.html
FO_TARGET       =  $(BASENAME).fo
PDF_TARGET      =  $(BASENAME).pdf
INDEX_BASE      =  toc
INDEX_FO        =  $(INDEX_BASE).fo
INDEX_PDF       =  $(INDEX_BASE).pdf
TCC_XSL         =  /u/www/docs/tcc/doc/docbook43/
HTML_TRANSFORM  =  $(TCC_XSL)lit_html.xsl
FO_TRANSFORM    =  $(TCC_XSL)lit_fo.xsl
XSLT_HTML_OPT   =  --stringparam chunk.section.depth 2 \
                   --stringparam chunk.first.sections 1
XSLT_FO_OPT     =  
XEP_OPT         =  -quiet

#--
# Add the suffixes that we are interested in
#--
# .fo       XSL-FO output
# .html     HTML web pages                 
# .pdf      Page Description Format (Abode)
# .xml      Input files in DocBook XML format
#--
.SUFFIXES: .fo .html .pdf .xml

#================================================================
# Default suffix rules
#----------------------------------------------------------------
.xml.html:
	xsltproc -o $@ $(XSLT_HTML_OPT) $(HTML_TRANSFORM) $&lt;

.xml.fo:
	xsltproc -o $@ $(XSLT_FO_OPT) $(FO_TRANSFORM) $&lt;

.fo.pdf:
	xep $(XEP_OPT) $&lt; $@ 

#================================================================
# Targets
#----------------------------------------------------------------
all: web pdf index

web: $(WEB_TARGET)

$(WEB_TARGET): $(SOURCE)
	xsltproc -o $@ $(XSLT_HTML_OPT) $(HTML_TRANSFORM) $&lt;

pdf: $(PDF_TARGET)

$(PDF_TARGET): $(SOURCE)

index: $(INDEX_PDF)

$(INDEX_PDF): $(INDEX_FO)

$(INDEX_FO): $(SOURCE)
	rm -f $(INDEX_FO); \
	docbookindex $(SOURCE)

clean:
	rm -f *.fo *.html *.pdf
</programlisting>
    </section> <!--make-basic-->
    <section id='make-lit'>
      <title>&makeLitFile;: A <filename >Makefile</filename > for
      literate programming</title>
      <para>
        This example <filename >Makefile</filename > implements
        the literate programming technique described in <ulink
        url='&litprogURL;' ><citetitle >Lightweight literate
        programming</citetitle ></ulink >.  The basic idea is
        that rather than trying to embed documentation in your
        program, instead you embed the source code for your
        program within a DocBook document.
      </para>
      <para>
        You will need to install &litlxmlApp;, which is described
        (in literate form, of course) in <ulink
        url='&litlxmlURL;' ><citetitle >A source extractor for
        lightweight literate programming</citetitle ></ulink >.
      </para>
      <para>
        The beginning section is similar to <xref
        linkend='make-basic' />.
      </para>
      <programlisting role='outFile:&makeLitName;'
># Makefile for DocBook projects: Literate version
#   This file is extracted automatically from:
#     &selfURL;
#================================================================
# Definitions
#----------------------------------------------------------------
# BASENAME:        The base file name of the DocBook file.
# SOURCE:          The .xml file containing the document.
# WEB_TARGET:      Top-level generated HTML page name.
# FO_TARGET:       Intermediate file for generated PDF.
# PDF_TARGET:      Generated PDF file name.
# INDEX_BASE:      Base name for index of section id values.
# INDEX_FO:        Intermediate file for section index.
# INDEX_PDF:       Section index PDF file name.
# TCC_XSL:         Where the local customization layer lives.
# HTML_TRANSFORM:  XSLT to build the HTML rendering.
# PDF_TRANSFORM:   XSLT to build the PDF rendering.
# XSLT_HTML_OPT passes options to xsltproc to build the HTML form.
#     To push chunking down to subsections:
#        --stringparam chunk.section.depth 2 
#     To move the first subsection to its own chunk:
#        --stringparam chunk.first.sections 1
#     To show subsubsections in the table of contents:
#        --stringparam toc.section.depth 3
# XSLT_FO_OPT:  Options for hardcopy.
#     To show subsubsections in the table of contents:
#        --stringparam toc.section.depth 3
# XEP_OPT:  Options to xep
#     To suppress most output:
#        -quiet
#----------------------------------------------------------------
BASENAME        =  your-project-name-here
SOURCE          =  $(BASENAME).xml
WEB_TARGET      =  $(WEB_DIR)index.html
FO_TARGET       =  $(BASENAME).fo
PDF_TARGET      =  $(BASENAME).pdf
INDEX_BASE      =  toc
INDEX_FO        =  $(INDEX_BASE).fo
INDEX_PDF       =  $(INDEX_BASE).pdf
TCC_XSL         =  /u/www/docs/tcc/doc/docbook43/
HTML_TRANSFORM  =  $(TCC_XSL)lit_html.xsl
FO_TRANSFORM    =  $(TCC_XSL)lit_fo.xsl
XSLT_HTML_OPT   =  --stringparam chunk.section.depth 2 \
                   --stringparam chunk.first.sections 1
XSLT_FO_OPT     =  
XEP_OPT         =  -quiet
</programlisting>
      <para>
        In the <code >EXECUTABLES</code > define, enumerate any
        files that are to be extracted and then made executable
        (we are assuming a Unix-based system here).
        Additionally, if there are any files that are to be
        extracted but do not need to be made executable, enumerate
        them in the <code >MODULES</code > define.        
      </para>
      <programlisting role='outFile:&makeLitName;'
>#----------------------------------------------------------------
# EXECUTABLES:  Files to be extracted and then made executable.
# MODULES:      Files to be extracted from the DocBook source.
#----------------------------------------------------------------
MODULES         =
EXECUTABLES     =
CODE_TARGETS    =  $(MODULES) $(EXECUTABLES)
</programlisting>
      <para>
        The next section is the same as in &makeBasicFile;.
      </para>
      <programlisting role='outFile:&makeLitName;'
>#--
# Add the suffixes that we are interested in
#--
# .fo       XSL-FO output
# .html     HTML web pages                 
# .pdf      Page Description Format (Abode)
# .xml      Input files in DocBook XML format
#--
.SUFFIXES: .fo .html .pdf .xml

#================================================================
# Default suffix rules
#----------------------------------------------------------------
.xml.html:
	xsltproc -o $@ $(XSLT_HTML_OPT) $(HTML_TRANSFORM) $&lt;

.xml.fo:
	xsltproc -o $@ $(XSLT_FO_OPT) $(FO_TRANSFORM) $&lt;

.fo.pdf:
	xep $(XEP_OPT) $&lt; $@ 
</programlisting>
      <para>
        In the target section, we define a new target named <code
        >code</code >.  The rule for this target runs
        &litlxmlApp;.  We also define a target named <code
        >index</code > that runs &dbindexApp; to build a
        <filename >toc.pdf</filename > file enumerating all the
        section ID values.
      </para>
      <programlisting role='outFile:&makeLitName;'
>#================================================================
# Targets
#----------------------------------------------------------------
all: web pdf index code

web: $(WEB_TARGET)

$(WEB_TARGET): $(SOURCE)
	xsltproc -o $@ $(XSLT_HTML_OPT) $(HTML_TRANSFORM) $&lt;

pdf: $(PDF_TARGET)

$(PDF_TARGET): $(SOURCE)

index: $(INDEX_PDF)

$(INDEX_PDF): $(INDEX_FO)

$(INDEX_FO): $(SOURCE)
	rm -f $(INDEX_FO); \
	docbookindex $(SOURCE)

code: $(CODE_TARGETS)

#--
# If there are any executables, change this rule to:
#   $(CODE_TARGETS): $(SOURCE)
#       litlxml $&lt;; \
#       chmod +x $(EXECUTABLES)
#--
$(CODE_TARGETS): $(SOURCE)
	litlxml $&lt;

clean:
	rm -f *.fo *.html *.pdf $(CODE_TARGETS)
</programlisting>
    </section> <!--make-lit-->
    <section id='make-large'>
      <title>&makeLargeFile;: A <filename >Makefile</filename >
      for large projects</title>
      <para>
        This sample <filename >Makefile</filename > implements
        the technique described in <xref linkend='decluttering'
        />.
      </para>
      <para>
        The beginning section is the same as in <xref
        linkend='make-basic' />.
      </para>
      <programlisting role='outFile:&makeLargeName;'
># Makefile for DocBook projects: Large-project version
#   This file is extracted automatically from:
#     http://www.nmt.edu/tcc/help/pubs/docbook43/
#================================================================
# Definitions
#----------------------------------------------------------------
# BASENAME:        The base file name of the DocBook file.
# SOURCE:          The .xml file containing the document.
# WEB_DIR:         Subdirectory where .html files live.
# WEB_TARGET:      Top-level generated HTML page name.
# FO_TARGET:       Intermediate file for generated PDF.
# PDF_TARGET:      Generated PDF file name.
# INDEX_BASE:      Base name for index of section id values.
# INDEX_FO:        Intermediate file for section index.
# INDEX_PDF:       Section index PDF file name.
# TCC_XSL:         Where the local customization layer lives.
# HTML_TRANSFORM:  XSLT to build the HTML rendering.
# PDF_TRANSFORM:   XSLT to build the PDF rendering.
# XSLT_HTML_OPT passes options to xsltproc to build the HTML form.
#     To push chunking down to subsections:
#        --stringparam chunk.section.depth 2 
#     To move the first subsection to its own chunk:
#        --stringparam chunk.first.sections 1
#     To show subsubsections in the table of contents:
#        --stringparam toc.section.depth 3
# XSLT_FO_OPT:  Options for hardcopy.
#     To show subsubsections in the table of contents:
#        --stringparam toc.section.depth 3
# XEP_OPT:  Options to xep
#     To suppress most output:
#        -quiet
#----------------------------------------------------------------
BASENAME        =  your-project-name-here
SOURCE          =  $(BASENAME).xml
</programlisting>
      <para>
        We add a new define named <filename >WEB_DIR</filename >
        that names the subdirectory where the generated HTML
        files will go.  Regardless of the value of <code
        >BASENAME</code >, the style sheets build a root HTML
        file named <filename >index.html</filename >.  By
        specifying that the <code >WEB_TARGET</code > is in a
        subdirectory, all the other files will be built in that
        subdirectory as well.
      </para>
      <programlisting role='outFile:&makeLargeName;'
>WEB_DIR         =  web/
WEB_TARGET      =  $(WEB_DIR)index.html
FO_TARGET       =  $(BASENAME).fo
PDF_TARGET      =  $(BASENAME).pdf
INDEX_BASE      =  toc
INDEX_FO        =  $(INDEX_BASE).fo
INDEX_PDF       =  $(INDEX_BASE).pdf
TCC_XSL         =  /u/www/docs/tcc/doc/docbook43/
HTML_TRANSFORM  =  $(TCC_XSL)lit_html.xsl
FO_TRANSFORM    =  $(TCC_XSL)lit_fo.xsl
XSLT_HTML_OPT   =  --stringparam chunk.section.depth 2 \
                   --stringparam chunk.first.sections 1
XSLT_FO_OPT     =  
XEP_OPT         =  -quiet

#--
# Add the suffixes that we are interested in
#--
# .fo       XSL-FO output
# .html     HTML web pages                 
# .pdf      Page Description Format (Abode)
# .xml      Input files in DocBook XML format
#--
.SUFFIXES: .fo .html .pdf .xml

#================================================================
# Default suffix rules
#----------------------------------------------------------------
.xml.html:
	xsltproc -o $@ $(XSLT_HTML_OPT) $(HTML_TRANSFORM) $&lt;

.xml.fo:
	xsltproc -o $@ $(XSLT_FO_OPT) $(FO_TRANSFORM) $&lt;

.fo.pdf:
	xep $(XEP_OPT) $&lt; $@ 

#================================================================
# Targets
#----------------------------------------------------------------
all: web pdf index

web: $(WEB_TARGET)
</programlisting>
      <para>
        We can't use the default <code >.xml.html</code > rule
        above to build the HTML, because it assumes that the
        input <filename >.xml</filename > file and the output
        <filename >index.html</filename > file are in the same
        directory.  Hence, we use an explicit build rule.
        Because the output file (<code >-o</code > option) to
        <application >xsltproc</application > is in a
        subdirectory, all the other files will be build there as
        well.
      </para>
      <programlisting role='outFile:&makeLargeName;'
>$(WEB_TARGET): $(SOURCE)
	xsltproc -o $@ $(XSLT_HTML_OPT) $(HTML_TRANSFORM) $&lt;

pdf: $(PDF_TARGET)

$(PDF_TARGET): $(SOURCE)

index: $(INDEX_PDF)

$(INDEX_PDF): $(INDEX_FO)

$(INDEX_FO): $(SOURCE)
	rm -f $(INDEX_FO); \
	docbookindex $(SOURCE)

clean:
	rm -f *.fo *.html *.pdf
</programlisting>
    </section> <!--make-large-->
  </section> <!--model-makefiles-->
  <section id='fop'>
    <title>FOP:  An older, free toolchain</title>
    <para>
      This document assumes that you have XEP, a commercial
      product from <ulink url="&renderxURL;" >RenderX</ulink >.
      DocBook can also be processed using an open-source product,
      <ulink url="&fopURL;" >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>
