  
  [1m[4m[31m3. The Document Type Definition[0m
  
  In  this  chapter  we first explain what a "document type definition" is and
  then  describe  [1mgapdoc.dtd[0m  in  detail.  That file together with the current
  chapter  define  how  a [1mGAPDoc[0m document has to look like. It can be found in
  the   main  directory  of  the  [1mGAPDoc[0m  package  and  it  is  reproduced  in
  Appendix[1mB.[0m.
  
  We  do  not  give  many examples in this chapter which is more intended as a
  formal  reference  for  all  [1mGAPDoc[0m  elements.  Instead  we provide an extra
  document  with  book name [22m[32mGAPDocExample[0m (also accessible from the [1mGAP[0m online
  help).  This  uses all the constructs introduced in this chapter and you can
  easily compare the source code and how it looks like in the different output
  formats.  Furthermore  recall  that  many basic things about XML markup were
  already explained by example in the introductory chapter[1m1.[0m.
  
  
  [1m[4m[31m3.1 What is a DTD?[0m
  
  A  document  type  definition  (DTD)  is  a formal declaration of how an XML
  document  has  to  be structured. It is itself structured such that programs
  that handle documents can read it and treat the documents accordingly. There
  are  for  example parsers and validity checkers that use the DTD to validate
  an XML document, see[1m2.1-13[0m.
  
  The  main  thing  a  DTD  does  is  to  specify  which elements may occur in
  documents  of  a  certain  document  type,  how they can be nested, and what
  attributes they can or must have. So, for each element there is a rule.
  
  Note  that  a DTD can [22m[36mnot[0m ensure that a document which is "valid" also makes
  sense  to  the converters! It only says something about the formal structure
  of the document.
  
  For  the  remaining  part  of  this  chapter we have divided the elements of
  [1mGAPDoc[0m  documents  into  several subsets, each of which will be discussed in
  one of the next sections.
  
  See the following three subsections to learn by example, how a DTD works. We
  do  not want to be too formal here, but just enable the reader to understand
  the  declarations  in  [1mgapdoc.dtd[0m. For precise descriptions of the syntax of
  DTD's see again the official standard in:
  
  [34mhttp://www.xml.com/axml/axml.html[0m
  
  
  [1m[4m[31m3.2 Overall Document Structure[0m
  
  A  [1mGAPDoc[0m  document  contains on its top level exactly one element with name
  [22m[32mBook[0m. This element is declared in the DTD as follows:
  
  
  [1m[4m[31m3.2-1 [22m[32m<Book>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Book (TitlePage,[0m
    [22m[35m                TableOfContents?,[0m
    [22m[35m                Body,[0m
    [22m[35m                Appendix*,[0m
    [22m[35m                Bibliography?,[0m
    [22m[35m                TheIndex?)>[0m
    [22m[35m<!ATTLIST Book Name CDATA #REQUIRED>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  After  the keyword [22m[32mELEMENT[0m and the name [22m[32mBook[0m there is a list in parentheses.
  This  is a comma separated list of names of elements which can occur (in the
  given  order) in the content of a [22m[32mBook[0m element. Each name in such a list can
  be  followed  by  one  of  the  characters "[22m[32m?[0m", "[22m[32m*[0m" or "[22m[32m+[0m", meaning that the
  corresponding  element  can  occur  zero or one time, an arbitrary number of
  times,  or  at least once, respectively. Without such an extra character the
  corresponding  element  must occur exactly once. Instead of one name in this
  list there can also be a list of elements names separated by "[22m[32m|[0m" characters,
  this denotes any element with one of the names (i.e., "[22m[32m|[0m" means "or").
  
  So,  the  [22m[32mBook[0m  element  must  contain  first  a  [22m[32mTitlePage[0m element, then an
  optional  [22m[32mTableOfContents[0m  element,  then  a [22m[32mBody[0m element, then zero or more
  elements  of  type  [22m[32mAppendix[0m,  then  an  optional  [22m[32mBibliography[0m element, and
  finally an optional element of type [22m[32mTheIndex[0m.
  
  Note  that  [22m[36monly[0m  these  elements  are  allowed  in  the content of the [22m[32mBook[0m
  element.  No  other  elements or text is allowed in between. An exception of
  this  is  that  there  may  be whitespace between the end tag of one and the
  start  tag of the next element - this should be ignored when the document is
  processed  to  some output format. An element like this is called an element
  with "element content".
  
  The  second declaration starts with the keyword [22m[32mATTLIST[0m and the element name
  [22m[32mBook[0m.  After  that  there is a triple of whitespace separated parameters (in
  general  an arbitrary number of such triples, one for each allowed attribute
  name).  The first ([22m[32mName[0m) is the name of an attribute for a [22m[32mBook[0m element. The
  second ([22m[32mCDATA[0m) is always the same for all of our declarations, it means that
  the value of the attribute consists of "character data". The third parameter
  [22m[32m#REQUIRED[0m means that this attribute must be specified with any [22m[32mBook[0m element.
  Later we will also see optional attributes which are declared as [22m[32m#IMPLIED[0m.
  
  
  [1m[4m[31m3.2-2 [22m[32m<TitlePage>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT TitlePage (Title, Subtitle?, Version?, Author+, Date?, Abstract?,[0m
    [22m[35m                     Copyright? , Acknowledgements? , Colophon? )>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  Within  this  element information for the title page is collected. Note that
  more  than  one  author  can  be specified. The elements must appear in this
  order  because  there  is no sensible way to specify in a DTD something like
  "the following elements may occur in any order but each exactly once".
  
  Before  going  on with the other elements inside the [22m[32mBook[0m element we explain
  the elements for the title page.
  
  
  [1m[4m[31m3.2-3 [22m[32m<Title>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Title (%Text;)*>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  Here  is  the  last construct you need to understand for reading [1mgapdoc.dtd[0m.
  The  expression  "[22m[32m%Text;[0m" is a so-called "parameter entity". It is something
  like a macro within the DTD. It is defined as follows:
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ENTITY % Text "%InnerText; | List | Enum | Table">[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  means, that every occurrence of "[22m[32m%Text;[0m" in the DTD is replaced by the
  expression
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m%InnerText; | List | Enum | Table[0m
  [22m[35m------------------------------------------------------------------[0m
  
  which is then expanded further because of the following definition:
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ENTITY % InnerText "#PCDATA |[0m
    [22m[35m                      Alt |[0m
    [22m[35m                      Emph | E |[0m
    [22m[35m                      Par | P | [0m
    [22m[35m                      Keyword | K | Arg | A | Quoted | Q | Code | C | [0m
    [22m[35m                      File | F | Button | B | Package |[0m
    [22m[35m                      M | Math | Display | [0m
    [22m[35m                      Example | Listing | Log | Verb |[0m
    [22m[35m                      URL | Email | Homepage | Cite | Label | [0m
    [22m[35m                      Ref | Index" > [0m
  [22m[35m------------------------------------------------------------------[0m
  
  These are the only two parameter entities we are using. They expand to lists
  of  element  names which are explained in the sequel [22m[36mand[0m the keyword [22m[32m#PCDATA[0m
  (concatenated with the "or" character "[22m[32m|[0m").
  
  So,  the  element  ([22m[32mTitle[0m)  is  of so-called "mixed content": It can contain
  [22m[36mparsed character data[0m which does not contain further markup ([22m[32m#PCDATA[0m) or any
  of  the  other  above mentioned elements. Mixed content must always have the
  asterisk  qualifier  (like  in [22m[32mTitle[0m) such that any sequence of elements (of
  the above list) and character data can be contained in a [22m[32mTitle[0m element.
  
  The  [22m[32m%Text;[0m parameter entity is used in all places in the DTD, where "normal
  text"  should  be allowed, including lists, enumerations, and tables, but [22m[36mno[0m
  sectioning elements.
  
  The  [22m[32m%InnerText;[0m  parameter  entity  is used in all places in the DTD, where
  "inner  text"  should be allowed. This means, that no structures like lists,
  enumerations, and tables are allowed. This is used for example in headings.
  
  
  [1m[4m[31m3.2-4 [22m[32m<Subtitle>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Subtitle (%Text;)*>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  Contains the subtitle of the document.
  
  
  [1m[4m[31m3.2-5 [22m[32m<Version>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Version (#PCDATA|Alt)*>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  Note  that the version can only contain character data and no further markup
  elements  (except  for  [22m[32mAlt[0m,  which  is  necessary  to  resolve the entities
  described in [1m2.2-3[0m). The converters will [22m[36mnot[0m put the word "Version" in front
  of the text in this element.
  
  
  [1m[4m[31m3.2-6 [22m[32m<Author>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Author (%Text;)*>    <!-- There may be more than one Author! -->[0m
  [22m[35m------------------------------------------------------------------[0m
  
  As  noted  in  the  comment there may be more than one element of this type.
  This  elements  should  contain  the  name  of  an  author  and  probably an
  [22m[32mEmail[0m-address   and/or  WWW-[22m[32mHomepage[0m  element  for  this  author,  see[1m3.5-6[0m
  and[1m3.5-7[0m.
  
  
  [1m[4m[31m3.2-7 [22m[32m<Date>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Date (#PCDATA)>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  Only  character  data  is allowed in this element which gives a date for the
  document. No automatic formatting is done.
  
  
  [1m[4m[31m3.2-8 [22m[32m<Abstract>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Abstract (%Text;)*>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This element contains an abstract of the whole book.
  
  
  [1m[4m[31m3.2-9 [22m[32m<Copyright>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Copyright (%Text;)*>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  is used for the copyright notice. Note the [22m[32m&copyright;[0m entity
  as described in section [1m2.2-3[0m.
  
  
  [1m[4m[31m3.2-10 [22m[32m<Acknowledgements>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Acknowledgements (%Text;)*>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This element contains the acknowledgements.
  
  
  [1m[4m[31m3.2-11 [22m[32m<Colophon>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Colophon (%Text;)*>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  The  "colophon"  page  is  used  to  say  something  about  the history of a
  document.
  
  
  [1m[4m[31m3.2-12 [22m[32m<TableOfContents>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT TableOfContents EMPTY>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  may occur in the [22m[32mBook[0m element after the [22m[32mTitlePage[0m element. If
  it  is  present,  a  table  of  contents  is generated and inserted into the
  document. Note that because this element is declared to be [22m[32mEMPTY[0m one can use
  the abbreviation
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<TableOfContents/>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  to denote this empty element.
  
  
  [1m[4m[31m3.2-13 [22m[32m<Bibliography>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Bibliography EMPTY>[0m
    [22m[35m<!ATTLIST Bibliography Databases CDATA #REQUIRED[0m
    [22m[35m                       Style CDATA #IMPLIED>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element may occur in the [22m[32mBook[0m element after the last [22m[32mAppendix[0m element.
  If  it is present, a bibliography section is generated and inserted into the
  document.  The  attribute  [22m[32mDatabases[0m  must be specified and refers to BibTeX
  databases.  The  databases  must  be separated by commas and must [22m[36mnot[0m have a
  [1m.bib[0m  extension.  A  bibliography  style  may  be  specified  with the [22m[32mStyle[0m
  attribute.  The  optional [22m[32mStyle[0m attribute (for LaTeX output of the document)
  must  also  be  specified without the [1m.bst[0m extension (the default is [22m[32malpha[0m).
  See  also  section [1m3.5-3[0m for a description of the [22m[32mCite[0m element which is used
  to include bibliography references into the text.
  
  The reference for the format of BibTeX database files is[L85, Appendix B].
  
  
  [1m[4m[31m3.2-14 [22m[32m<TheIndex>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT TheIndex EMPTY>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  may occur in the [22m[32mBook[0m element after the [22m[32mBibliography[0m element.
  If  it  is  present,  an  index is generated and inserted into the document.
  There  are elements in [1mGAPDoc[0m which implicitly generate index entries (e.g.,
  [22m[32mFunc[0m  ([1m3.4-2[0m))  and  there  is an element [22m[32mIndex[0m ([1m3.5-4[0m)for explicitly adding
  index entries.
  
  
  [1m[4m[31m3.3 Sectioning Elements[0m
  
  A  [1mGAPDoc[0m book is divided into [22m[36mchapters[0m, [22m[36msections[0m, and [22m[36msubsections[0m. The idea
  is  of course, that a chapter consists of sections, which in turn consist of
  subsections.  However  for  the  sake  of flexibility, the rules are not too
  restrictive. Firstly, text is allowed everywhere in the body of the document
  (and  not only within sections). Secondly, the chapter level may be omitted.
  The exact rules are described below.
  
  [22m[36mAppendices[0m  are  a flavor of chapters, occurring after all regular chapters.
  There  is  a  special  type  of  subsection  called  "[22m[32mManSection[0m". This is a
  subsection  devoted to the description of a function, operation or variable.
  It is analogous to a manpage in the UNIX environment. Usually each function,
  operation, method, and so on should have its own [22m[32mManSection[0m.
  
  Cross  referencing  is  done  on  the  level  of  [22m[32mSubsection[0ms,  respectively
  [22m[32mManSection[0ms.   The  topics  in  [1mGAP[0m's  online  help  are  also  pointing  to
  subsections. So, they should not be too long.
  
  We start our description of the sectioning elements "top-down":
  
  
  [1m[4m[31m3.3-1 [22m[32m<Body>[1m[4m[31m[0m
  
  The  [22m[32mBody[0m  element  marks the main part of the document. It must occur after
  the  [22m[32mTableOfContents[0m  element.  There is a big difference between [22m[36minside[0m and
  [22m[36moutside[0m  of  this element: Whereas regular text is allowed nearly everywhere
  in  the  [22m[32mBody[0m element and its subelements, this is not true for the [22m[36moutside[0m.
  This   has   also  implications  on  the  handling  of  whitespace.  [22m[36mOutside[0m
  superfluous  whitespace  is usually ignored when it occurs between elements.
  [22m[36mInside[0m  of  the  [22m[32mBody[0m  element  whitespace matters because character data is
  allowed nearly everywhere. Here is the definition in the DTD:
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Body  ( %Text;| Chapter | Section )*>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  The  fact  that  [22m[32mChapter[0m  and [22m[32mSection[0m elements are allowed here leads to the
  possibility  to  omit  the  chapter  level  entirely  in the document. For a
  description of [22m[32m%Text;[0m see [1m3.2-3[0m.
  
  (Remark:  The  purpose  of  this element is to make sure that a [22m[36mvalid[0m [1mGAPDoc[0m
  document  has  a  correct overall structure, which is only possible when the
  top element [22m[32mBook[0m has element content.)
  
  
  [1m[4m[31m3.3-2 [22m[32m<Chapter>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Chapter (%Text;| Heading | Section)*>[0m
    [22m[35m<!ATTLIST Chapter Label CDATA #IMPLIED>    <!-- For reference purposes -->[0m
  [22m[35m------------------------------------------------------------------[0m
  
  A  [22m[32mChapter[0m element can have a [22m[32mLabel[0m attribute, such that this chapter can be
  referenced  later  on  with a [22m[32mRef[0m element (see section [1m3.5-1[0m). Note that you
  have  to  specify  a label to reference the chapter as there is no automatic
  labelling!
  
  [22m[32mChapter[0m  elements  can contain text (for a description of [22m[32m%Text;[0m see [1m3.2-3[0m),
  [22m[32mSection[0m elements, and [22m[32mHeading[0m elements.
  
  The  following [22m[36madditional[0m rule cannot be stated in the DTD because we want a
  [22m[32mChapter[0m  element  to  have  mixed content. There must be [22m[36mexactly one[0m [22m[32mHeading[0m
  element  in the [22m[32mChapter[0m element, containing the heading of the chapter. Here
  is its definition:
  
  
  [1m[4m[31m3.3-3 [22m[32m<Heading>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Heading (%InnerText;)*>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  is  used  for  headings  in [22m[32mChapter[0m, [22m[32mSection[0m, [22m[32mSubsection[0m, and
  [22m[32mAppendix[0m  elements.  It  may only contain [22m[32m%InnerText;[0m (for a description see
  [1m3.2-3[0m).
  
  Each  of  the  mentioned sectioning elements must contain exactly one direct
  [22m[32mHeading[0m  element  (i.e.,  one  which  is not contained in another sectioning
  element).
  
  
  [1m[4m[31m3.3-4 [22m[32m<Appendix>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Appendix (%Text;| Heading | Section)*>[0m
    [22m[35m<!ATTLIST Appendix Label CDATA #IMPLIED>   <!-- For reference purposes -->[0m
  [22m[35m------------------------------------------------------------------[0m
  
  The  [22m[32mAppendix[0m  element  behaves  exactly  like a [22m[32mChapter[0m element (see [1m3.3-2[0m)
  except  for  the  position  within  the  document  and  the numbering. While
  chapters  are  counted  with  numbers  (1.,  2., 3., ...) the appendices are
  counted with capital letters (A., B., ...).
  
  Again there is an optional [22m[32mLabel[0m attribute used for references.
  
  
  [1m[4m[31m3.3-5 [22m[32m<Section>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Section (%Text;| Heading | Subsection | ManSection)*>[0m
    [22m[35m<!ATTLIST Section Label CDATA #IMPLIED>    <!-- For reference purposes -->[0m
  [22m[35m------------------------------------------------------------------[0m
  
  A  [22m[32mSection[0m element can have a [22m[32mLabel[0m attribute, such that this section can be
  referenced  later  on  with a [22m[32mRef[0m element (see section [1m3.5-1[0m). Note that you
  have  to  specify  a label to reference the section as there is no automatic
  labelling!
  
  [22m[32mSection[0m  elements  can contain text (for a description of [22m[32m%Text;[0m see [1m3.2-3[0m),
  [22m[32mHeading[0m elements, and subsections.
  
  There  must  be  exactly  one  direct  [22m[32mHeading[0m element in a [22m[32mSection[0m element,
  containing the heading of the section.
  
  Note  that  a  subsection  is  either  a  [22m[32mSubsection[0m element or a [22m[32mManSection[0m
  element.
  
  
  [1m[4m[31m3.3-6 [22m[32m<Subsection>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Subsection (%Text;| Heading)*>[0m
    [22m[35m<!ATTLIST Subsection Label CDATA #IMPLIED> <!-- For reference purposes -->[0m
  [22m[35m------------------------------------------------------------------[0m
  
  The [22m[32mSubsection[0m element can have a [22m[32mLabel[0m attribute, such that this subsection
  can be referenced later on with a [22m[32mRef[0m element (see section [1m3.5-1[0m). Note that
  you  have  to  specify  a  label  to reference the subsection as there is no
  automatic labelling!
  
  [22m[32mSubsection[0m  elements  can  contain  text  (for  a  description of [22m[32m%Text;[0m see
  [1m3.2-3[0m), and [22m[32mHeading[0m elements.
  
  There  must  be  exactly  one  [22m[32mHeading[0m  element  in  a  [22m[32mSubsection[0m  element,
  containing the heading of the subsection.
  
  Another type of subsection is a [22m[32mManSection[0m, explained now:
  
  
  [1m[4m[31m3.4 ManSection[0m
  
  [22m[32mManSection[0ms   are  intended  to  describe  a  function,  operation,  method,
  variable,  or some other technical instance. It is analogous to a manpage in
  the UNIX environment.
  
  
  [1m[4m[31m3.4-1 [22m[32m<ManSection>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT ManSection (((Func, Returns?) | (Oper, Returns?) | [0m
    [22m[35m                       (Meth, Returns?) | (Filt, Returns?) | [0m
    [22m[35m                       (Prop, Returns?) | (Attr, Returns?) |[0m
    [22m[35m                       Var | Fam | InfoClass)+, Description )>[0m
    [22m[35m<!ATTLIST ManSection Label CDATA #IMPLIED> <!-- For reference purposes -->[0m
    [22m[35m[0m
    [22m[35m<!ELEMENT Returns (%Text;)*>[0m
    [22m[35m<!ELEMENT Description (%Text;)*>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  The [22m[32mManSection[0m element can have a [22m[32mLabel[0m attribute, such that this subsection
  can  be referenced later on with a [22m[32mRef[0m element (see section [1m3.5-1[0m). But this
  is  probably rarely necessary because the elements [22m[32mFunc[0m and so on (explained
  below) generate automatically labels for cross referencing.
  
  The  content  of  a  [22m[32mManSection[0m  element  is one or more elements describing
  certain items in [1mGAP[0m, each of them optionally followed by a [22m[32mReturns[0m element,
  followed  by  a  [22m[32mDescription[0m  element,  which  contains  [22m[32m%Text;[0m  (see [1m3.2-3[0m)
  describing  it. (Remember to include examples in the description as often as
  possible,  see[1m3.7-10[0m).  The classes of items [1mGAPDoc[0m knows of are: functions
  ([22m[32mFunc[0m),  operations  ([22m[32mOper[0m),  methods  ([22m[32mMeth[0m),  filters  ([22m[32mFilt[0m),  properties
  ([22m[32mProp[0m), attributes ([22m[32mAttr[0m), variables ([22m[32mVar[0m), families ([22m[32mFam[0m), and info classes
  ([22m[32mInfoClass[0m).  One [22m[32mManSection[0m should only describe several of such items when
  these are very closely related.
  
  Each  element for an item corresponding to a [1mGAP[0m function can be followed by
  a [22m[32mReturns[0m element. In output versions of the document the string "Returns: "
  will  be  put  in front of the content text. The text in the [22m[32mReturns[0m element
  should  usually  be  a  short  hint about the type of object returned by the
  function. This is intended to give a good mnemonic for the use of a function
  (together with a good choice of names for the formal arguments).
  
  [22m[32mManSection[0ms  are  also  sectioning  elements  which  count as subsections. A
  possible heading is generated automatically from the first element.
  
  
  [1m[4m[31m3.4-2 [22m[32m<Func>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Func EMPTY>[0m
    [22m[35m<!ATTLIST Func Name  CDATA #REQUIRED[0m
    [22m[35m          Label CDATA #IMPLIED[0m
    [22m[35m          Arg   CDATA #REQUIRED[0m
    [22m[35m          Comm  CDATA #IMPLIED>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  is used within a [22m[32mManSection[0m element to specify the usage of a
  function.  The  [22m[32mName[0m  attribute is required and its value is the name of the
  function.  The  value of the [22m[32mArg[0m attribute (also required) contains the full
  list  of  arguments  including  optional  parts, which are denoted by square
  brackets. The arguments are separated by whitespace or commas.
  
  The  name  of the function is also used as label for cross referencing. When
  the  name  of  the  function  appears  in the text of the document it should
  [22m[36malways[0m  be  written  with  the  [22m[32mRef[0m element, see[1m3.5-1[0m. This allows to use a
  unique typesetting style for function names and automatic cross referencing.
  
  If  the optional [22m[32mLabel[0m attribute is given, it is appended (with a colon [22m[32m:[0m in
  between)  to  the  name  of the function for cross referencing purposes. The
  text  of  the label can also appear in the document text. So, it should be a
  kind of short explanation.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35m<Func Arg="x[, y]" Name="LibFunc" Label="for my objects"/>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  The  optional  [22m[32mComm[0m attribute should be a short description of the function,
  usually at most one line long.
  
  This  element  automatically  produces  an  index entry with the name of the
  function  and,  if present, the text of the [22m[32mLabel[0m attribute as subentry (see
  also[1m3.2-14[0m and[1m3.5-4[0m).
  
  
  [1m[4m[31m3.4-3 [22m[32m<Oper>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Oper EMPTY>[0m
    [22m[35m<!ATTLIST Oper Name  CDATA #REQUIRED[0m
    [22m[35m               Label CDATA #IMPLIED[0m
    [22m[35m               Arg   CDATA #REQUIRED[0m
    [22m[35m               Comm  CDATA #IMPLIED>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element is used within a [22m[32mManSection[0m element to specify the usage of an
  operation.  The  attributes  are used exactly in the same way as in the [22m[32mFunc[0m
  element (see [1m3.4-2[0m).
  
  Note  that  multiple  descriptions  of  the  same  operation  may occur in a
  document because there may be several declarations in [1mGAP[0m. Furthermore there
  may  be  several [22m[32mManSection[0ms for methods of this operation (see[1m3.4-4[0m) which
  also  use  the same name. For reference purposes these must be distinguished
  by different [22m[32mLabel[0m attributes.
  
  
  [1m[4m[31m3.4-4 [22m[32m<Meth>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Meth EMPTY>[0m
    [22m[35m<!ATTLIST Meth Name  CDATA #REQUIRED[0m
    [22m[35m               Label CDATA #IMPLIED[0m
    [22m[35m               Arg   CDATA #REQUIRED[0m
    [22m[35m               Comm  CDATA #IMPLIED>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  is used within a [22m[32mManSection[0m element to specify the usage of a
  method.  The  attributes  are  used  exactly  in the same way as in the [22m[32mFunc[0m
  element (see [1m3.4-2[0m).
  
  Due  to  the  fact that it often happens that many methods are installed for
  the   same   operation   it   seems  to  be  interesting  to  document  them
  independently.  This  is possible by using the same method name in different
  [22m[32mManSection[0ms.  It  is  however  required  that  these  subsections  and those
  describing  the corresponding operation are distinguished by different [22m[32mLabel[0m
  attributes.
  
  
  [1m[4m[31m3.4-5 [22m[32m<Filt>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Filt EMPTY>[0m
    [22m[35m<!ATTLIST Filt Name  CDATA #REQUIRED[0m
    [22m[35m               Label CDATA #IMPLIED[0m
    [22m[35m               Arg   CDATA #IMPLIED[0m
    [22m[35m               Comm  CDATA #IMPLIED[0m
    [22m[35m               Type  CDATA #IMPLIED>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  is used within a [22m[32mManSection[0m element to specify the usage of a
  filter.  The  first  four attributes are used in the same way as in the [22m[32mFunc[0m
  element (see [1m3.4-2[0m), except that the [22m[32mArg[0m attribute is optional.
  
  The [22m[32mType[0m attribute can be any string, but it is thought to be something like
  "[22m[32mCategory[0m" or "[22m[32mRepresentation[0m".
  
  
  [1m[4m[31m3.4-6 [22m[32m<Prop>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Prop EMPTY>[0m
    [22m[35m<!ATTLIST Prop Name  CDATA #REQUIRED[0m
    [22m[35m               Label CDATA #IMPLIED[0m
    [22m[35m               Arg   CDATA #REQUIRED[0m
    [22m[35m               Comm  CDATA #IMPLIED>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  is used within a [22m[32mManSection[0m element to specify the usage of a
  property.  The  attributes  are  used exactly in the same way as in the [22m[32mFunc[0m
  element (see [1m3.4-2[0m).
  
  
  [1m[4m[31m3.4-7 [22m[32m<Attr>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Attr EMPTY>[0m
    [22m[35m<!ATTLIST Attr Name  CDATA #REQUIRED[0m
    [22m[35m               Label CDATA #IMPLIED[0m
    [22m[35m               Arg   CDATA #REQUIRED[0m
    [22m[35m               Comm  CDATA #IMPLIED>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element is used within a [22m[32mManSection[0m element to specify the usage of an
  attribute  (in  [1mGAP[0m).  The attributes are used exactly in the same way as in
  the [22m[32mFunc[0m element (see [1m3.4-2[0m).
  
  
  [1m[4m[31m3.4-8 [22m[32m<Var>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Var  EMPTY>[0m
    [22m[35m<!ATTLIST Var  Name  CDATA #REQUIRED[0m
    [22m[35m               Label CDATA #IMPLIED[0m
    [22m[35m               Comm  CDATA #IMPLIED>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  is  used  within  a  [22m[32mManSection[0m  element to document a global
  variable.  The  attributes  are  used exactly in the same way as in the [22m[32mFunc[0m
  element (see [1m3.4-2[0m) except that there is no [22m[32mArg[0m attribute.
  
  
  [1m[4m[31m3.4-9 [22m[32m<Fam>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Fam  EMPTY>[0m
    [22m[35m<!ATTLIST Fam  Name  CDATA #REQUIRED[0m
    [22m[35m               Label CDATA #IMPLIED[0m
    [22m[35m               Comm  CDATA #IMPLIED>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  is used within a [22m[32mManSection[0m element to document a family. The
  attributes  are  used  exactly  in  the same way as in the [22m[32mFunc[0m element (see
  [1m3.4-2[0m) except that there is no [22m[32mArg[0m attribute.
  
  
  [1m[4m[31m3.4-10 [22m[32m<InfoClass>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT InfoClass EMPTY>[0m
    [22m[35m<!ATTLIST InfoClass Name  CDATA #REQUIRED[0m
    [22m[35m                    Label CDATA #IMPLIED[0m
    [22m[35m                    Comm  CDATA #IMPLIED>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element is used within a [22m[32mManSection[0m element to document an info class.
  The  attributes are used exactly in the same way as in the [22m[32mFunc[0m element (see
  [1m3.4-2[0m) except that there is no [22m[32mArg[0m attribute.
  
  
  [1m[4m[31m3.5 Cross Referencing and Citations[0m
  
  Cross  referencing  in  the [1mGAPDoc[0m system is somewhat different to the usual
  LaTeX  cross  referencing  in  so far, that a reference knows "which type of
  object"  it  is  referencing.  For  example  a  "reference to a function" is
  distinguished from a "reference to a chapter". The idea of this is, that the
  markup  must  contain  this information such that the converters can produce
  better  output.  The  HTML  converter  can  for  example  typeset a function
  reference just as the name of the function with a link to the description of
  the  function,  or  a chapter reference as a number with a link in the other
  case.
  
  Referencing is done with the [22m[32mRef[0m element:
  
  
  [1m[4m[31m3.5-1 [22m[32m<Ref>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Ref EMPTY>[0m
    [22m[35m<!ATTLIST Ref Func      CDATA #IMPLIED[0m
    [22m[35m              Oper      CDATA #IMPLIED[0m
    [22m[35m              Meth      CDATA #IMPLIED[0m
    [22m[35m              Filt      CDATA #IMPLIED[0m
    [22m[35m              Prop      CDATA #IMPLIED[0m
    [22m[35m              Attr      CDATA #IMPLIED[0m
    [22m[35m              Var       CDATA #IMPLIED[0m
    [22m[35m              Fam       CDATA #IMPLIED[0m
    [22m[35m              InfoClass CDATA #IMPLIED[0m
    [22m[35m              Chap      CDATA #IMPLIED[0m
    [22m[35m              Sect      CDATA #IMPLIED[0m
    [22m[35m              Subsect   CDATA #IMPLIED[0m
    [22m[35m              Appendix  CDATA #IMPLIED[0m
    [22m[35m              Text      CDATA #IMPLIED[0m
    [22m[35m[0m
    [22m[35m              Label     CDATA #IMPLIED[0m
    [22m[35m              BookName  CDATA #IMPLIED[0m
    [22m[35m              Style (Text | Number) #IMPLIED>  <!-- normally automatic -->[0m
  [22m[35m------------------------------------------------------------------[0m
  
  The [22m[32mRef[0m element is defined to be [22m[32mEMPTY[0m. If one of the attributes [22m[32mFunc[0m, [22m[32mOper[0m,
  [22m[32mMeth[0m,  [22m[32mProp[0m,  [22m[32mAttr[0m,  [22m[32mVar[0m,  [22m[32mFam[0m,  [22m[32mInfoClass[0m, [22m[32mChap[0m, [22m[32mSect[0m, [22m[32mSubsect[0m, [22m[32mAppendix[0m is
  given  then  there must be exactly one of these, making the reference one to
  the  corresponding  object. The [22m[32mLabel[0m attribute can be specified in addition
  to  make  the  reference  unique, for example if more than one method with a
  given name is present. (Note that there is no way to specify in the DTD that
  exactly  one  of  the  first  listed  attributes  must  be given, this is an
  additional rule.)
  
  A  reference  to a [22m[32mLabel[0m element defined below (see [1m3.5-2[0m) is done by giving
  the [22m[32mLabel[0m attribute and optionally the [22m[32mText[0m attribute. If the [22m[32mText[0m attribute
  is  present  its value is typeset in place of the [22m[32mRef[0m element, if linking is
  possible  (for example in HTML). If this is not possible, the section number
  is  typeset.  This  type  of reference is also used for references to tables
  (see [1m3.6-5[0m).
  
  Optionally an external reference into another book can be specified by using
  the  [22m[32mBookName[0m  attribute. In this case the [22m[32mLabel[0m attribute [22m[36mmust[0m be specified
  and  refers  to  a search string as in the [1mGAP[0m help system. It is guaranteed
  that  the  reference  points to the position in the other book, that the [1mGAP[0m
  help system finds as first match if one types the value of the [22m[32mLabel[0m element
  after a question mark.
  
  The  optional  attribute  [22m[32mStyle[0m can take only the values [22m[32mText[0m and [22m[32mNumber[0m. It
  can  be used with references to sectioning units and it controls, whether an
  explicit  section  number  is  generated or text. Normally all references to
  sections  generate  numbers and references to a [1mGAP[0m object generate the name
  of  the  corresponding  object  with  some  additional  link  or  sectioning
  information,  which  is the behavior of [22m[32mStyle="Text"[0m. In case [22m[32mStyle="Number"[0m
  in all cases an explicit section number is generated. So
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35m<Ref Subsect="Func" Style="Text"/> described in section [0m
    [22m[35m<Ref Subsect="Func" Style="Number"/>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  produces: [1m`[22m[32m<Func>[0m'[0m described in section [1m3.4-2[0m.
  
  
  [1m[4m[31m3.5-2 [22m[32m<Label>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Label EMPTY>[0m
    [22m[35m<!ATTLIST Label Name CDATA #REQUIRED>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This element is used to define a label for referencing a certain position in
  the  document,  if  this  is possible. If an exact reference is not possible
  (like in a printed version of the document) a reference to the corresponding
  subsection  is  generated.  The  value  of the [22m[32mName[0m attribute must be unique
  under all [22m[32mLabel[0m elements.
  
  
  [1m[4m[31m3.5-3 [22m[32m<Cite>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Cite EMPTY>[0m
    [22m[35m<!ATTLIST Cite Key CDATA #REQUIRED[0m
    [22m[35m               Where CDATA #IMPLIED>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  is for bibliography citations. It is [22m[32mEMPTY[0m by definition. The
  attribute  [22m[32mKey[0m  is  the key for a lookup in a BibTeX database that has to be
  specified  in  the [22m[32mBibliography[0m element (see [1m3.2-13[0m). The value of the [22m[32mWhere[0m
  attribute  specifies  the  position  in the document as in the corresponding
  LaTeX syntax [22m[32m\cite[...]{...}[0m.
  
  
  [1m[4m[31m3.5-4 [22m[32m<Index>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Index (%InnerText;)*>[0m
    [22m[35m<!ATTLIST Index Key    CDATA #IMPLIED[0m
    [22m[35m                Subkey CDATA #IMPLIED>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  generates  an  index  entry.  The  text within the element is
  typeset  in  the  index  entry,  which  is  sorted  under the value, that is
  specified  in  the [22m[32mKey[0m and [22m[32mSubkey[0m attributes. If they are not specified, the
  typeset text itself is used as the key.
  
  Note  that  all  [22m[32mFunc[0m  and  similar  elements  automatically  generate index
  entries. If the [22m[32mTheIndex[0m element ([1m3.2-14[0m) is not present in the document all
  [22m[32mIndex[0m elements are ignored.
  
  
  [1m[4m[31m3.5-5 [22m[32m<URL>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT URL (#PCDATA)>    <!-- Can we define this better? -->[0m
    [22m[35m<!ATTLIST URL Text CDATA #IMPLIED>   <!-- This is for output formats[0m
    [22m[35m                                          that have links like HTML -->[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  is  for  references  into  the  internet. The text within the
  element  should  be a valid URL. It is typeset in the document. For the case
  of  an output document format that supports links the value of the attribute
  [22m[32mText[0m is typeset as visible text for the link.
  
  
  [1m[4m[31m3.5-6 [22m[32m<Email>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Email (#PCDATA)>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This element type is the special case of an URL specifying an email address.
  The  content  of  the element should be the email address without any prefix
  like  "[22m[32mmailto:[0m". This address is typeset by all converters, also without any
  prefix. In the case of an output document format like HTML the converter can
  produce a link with a "[22m[32mmailto:[0m" prefix.
  
  
  [1m[4m[31m3.5-7 [22m[32m<Homepage>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Homepage (#PCDATA)>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  type is the special case of an URL specifying a WWW-homepage.
  The  content  of the element should be the valid URL specifying a world wide
  web  page.  In comparison with the [22m[32mURL[0m element the address is visible in all
  output formats.
  
  
  [1m[4m[31m3.6 Structural Elements like Lists[0m
  
  The  [1mGAPDoc[0m  system  offers  some limited access to structural elements like
  lists,  enumerations,  and  tables. Although it is possible to use all LaTeX
  constructs  one always has to think about other output formats. The elements
  in this section are guaranteed to produce something reasonable in all output
  formats.
  
  
  [1m[4m[31m3.6-1 [22m[32m<List>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT List ( ((Mark,Item)|(BigMark,Item)|Item)+ )>[0m
    [22m[35m<!ATTLIST List Only CDATA #IMPLIED[0m
    [22m[35m               Not  CDATA #IMPLIED>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  produces a list. Each item in the list corresponds to an [22m[32mItem[0m
  element.  Every  [22m[32mItem[0m  element is optionally preceded by a [22m[32mMark[0m element. The
  content  of this is used as a marker for the item. Note that this marker can
  be  a  whole  word or even a sentence. It will be typeset in some emphasized
  fashion  and  most  converters will provide some indentation for the rest of
  the item.
  
  The  [22m[32mOnly[0m  and  [22m[32mNot[0m  attributes  can  be  used  to specify, that the list is
  included into the output by only one type of converter ([22m[32mOnly[0m) or all but one
  type  of  converter  ([22m[32mNot[0m).  Of course at most one of the two attributes may
  occur  in  one element. The following values are allowed as of now: "[22m[32mLaTeX[0m",
  "[22m[32mHTML[0m",  and  "[22m[32mText[0m".  See also the [22m[32mAlt[0m element in [1m3.9-1[0m for more about text
  alternatives for certain converters.
  
  
  [1m[4m[31m3.6-2 [22m[32m<Mark>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Mark ( %InnerText;)*>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  is  used  in the [22m[32mList[0m element to mark items. See [1m3.6-1[0m for an
  explanation.
  
  
  [1m[4m[31m3.6-3 [22m[32m<Item>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Item ( %Text;)*>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  is  used in the [22m[32mList[0m, [22m[32mEnum[0m, and [22m[32mTable[0m elements to specify the
  items. See sections [1m3.6-1[0m, [1m3.6-4[0m, and [1m3.6-5[0m for further information.
  
  
  [1m[4m[31m3.6-4 [22m[32m<Enum>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Enum ( Item+ )>[0m
    [22m[35m<!ATTLIST Enum Only CDATA #IMPLIED[0m
    [22m[35m               Not  CDATA #IMPLIED>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This element is used identically to the [22m[32mList[0m element (see [1m3.6-1[0m) except that
  the  items  may  not  have  marks  attached  to them. Instead, the items are
  numbered  automatically. The same comments about the [22m[32mOnly[0m and [22m[32mNot[0m attributes
  as above apply.
  
  
  [1m[4m[31m3.6-5 [22m[32m<Table>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Table ( Caption?, (Row | HorLine)+ )>[0m
    [22m[35m<!ATTLIST Table Label   CDATA #IMPLIED[0m
    [22m[35m                Only    CDATA #IMPLIED[0m
    [22m[35m                Not     CDATA #IMPLIED[0m
    [22m[35m                Align   CDATA #REQUIRED>[0m
    [22m[35m                <!-- We allow | and l,c,r, nothing else -->[0m
    [22m[35m<!ELEMENT Row   ( Item+ )>[0m
    [22m[35m<!ELEMENT HorLine EMPTY>[0m
    [22m[35m<!ELEMENT Caption ( %InnerText;)*>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  A  table  in  [1mGAPDoc[0m  consists  of an optional [22m[32mCaption[0m element followed by a
  sequence  of  [22m[32mRow[0m  and  [22m[32mHorLine[0m  elements.  A  [22m[32mHorLine[0m  element  produces  a
  horizontal  line  in the table. A [22m[32mRow[0m element consists of a sequence of [22m[32mItem[0m
  elements  as  they  also  occur  in [22m[32mList[0m and [22m[32mEnum[0m elements. The [22m[32mOnly[0m and [22m[32mNot[0m
  attributes  have  the same functionality as described in the [22m[32mList[0m element in
  [1m3.6-1[0m.
  
  The  [22m[32mAlign[0m attribute is written like a LaTeX tabular alignment specifier but
  only  the letters "[22m[32ml[0m", "[22m[32mr[0m", "[22m[32mc[0m", and "[22m[32m|[0m" are allowed meaning left alignment,
  right  alignment,  centered  alignment,  and  a  vertical  line as delimiter
  between columns respectively.
  
  If  the  [22m[32mLabel[0m  attribute is there, one can reference the table with the [22m[32mRef[0m
  element (see [1m3.5-1[0m) using its [22m[32mLabel[0m attribute.
  
  Usually  only  simple tables should be used. If you want a complicated table
  in  the  LaTeX  output  you  should  provide  alternatives for text and HTML
  output.  Note  that in HTML-4.0 there is no possibility to interpret the "[22m[32m|[0m"
  column  separators and [22m[32mHorLine[0m elements as intended. There are lines between
  all columns and rows or no lines at all.
  
  
  [1m[4m[31m3.7 Types of Text[0m
  
  This  section  covers the markup of text. Various types of "text" exist. The
  following  elements  are used in the [1mGAPDoc[0m system to mark them. They mostly
  come  in  pairs, one long name which is easier to remember and a shortcut to
  make the markup "lighter".
  
  Most  of  the  following elements are thought to contain only character data
  and  no  further  markup  elements.  It  is  however  necessary to allow [22m[32mAlt[0m
  elements to resolve the entities described in section [1m2.2-3[0m.
  
  
  [1m[4m[31m3.7-1 [22m[32m<Emph>[1m[4m[31m and [22m[32m<E>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Emph (%InnerText;)*>    <!-- Emphasize something -->[0m
    [22m[35m<!ELEMENT E    (%InnerText;)*>    <!-- the same as shortcut -->[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  is  used  to  emphasize  some  piece  of text. It may contain
  [22m[32m%InnerText;[0m (see [1m3.2-3[0m).
  
  
  [1m[4m[31m3.7-2 [22m[32m<Quoted>[1m[4m[31m and [22m[32m<Q>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Quoted (%InnerText;)*>   <!-- Quoted (in quotes) text -->[0m
    [22m[35m<!ELEMENT Q (%InnerText;)*>        <!-- Quoted text (shortcut) -->[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  is  used  to  put  some piece of text into ""-quotes. It may
  contain [22m[32m%InnerText;[0m (see [1m3.2-3[0m).
  
  
  [1m[4m[31m3.7-3 [22m[32m<Keyword>[1m[4m[31m and [22m[32m<K>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Keyword (#PCDATA|Alt)*>  <!-- Keyword -->[0m
    [22m[35m<!ELEMENT K (#PCDATA|Alt)*>        <!-- Keyword (shortcut) -->[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element is used to mark something as a [22m[36mkeyword[0m. Usually this will be a
  [1mGAP[0m  keyword  such  as "[22m[32mif[0m" or "[22m[32mfor[0m". No further markup elements are allowed
  within this element except for the [22m[32mAlt[0m element, which is necessary.
  
  
  [1m[4m[31m3.7-4 [22m[32m<Arg>[1m[4m[31m and [22m[32m<A>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Arg (#PCDATA|Alt)*>      <!-- Argument -->[0m
    [22m[35m<!ELEMENT A (#PCDATA|Alt)*>        <!-- Argument (shortcut) -->[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This element is used inside [22m[32mDescription[0ms in [22m[32mManSection[0ms to mark something as
  an  [22m[36margument[0m  (of a function, operation, or such). It is guaranteed that the
  converters  typeset  those  exactly  as  in  the definition of functions. No
  further markup elements are allowed within this element.
  
  
  [1m[4m[31m3.7-5 [22m[32m<Code>[1m[4m[31m and [22m[32m<C>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Code (#PCDATA|Alt)*>     <!-- GAP code -->[0m
    [22m[35m<!ELEMENT C (#PCDATA|Alt)*>        <!-- GAP code (shortcut) -->[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This element is used to mark something as a piece of [22m[36mcode[0m like for example a
  [1mGAP[0m expression. It is guaranteed that the converters typeset this exactly as
  in  the  [22m[32mListing[0m  element (compare section [1m3.7-9[0m. No further markup elements
  are allowed within this element.
  
  
  [1m[4m[31m3.7-6 [22m[32m<File>[1m[4m[31m and [22m[32m<F>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT File (#PCDATA|Alt)*>     <!-- Filename -->[0m
    [22m[35m<!ELEMENT F (#PCDATA|Alt)*>        <!-- Filename (shortcut) -->[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  is  used to mark something as a [22m[36mfilename[0m or a [22m[36mpathname[0m in the
  file system. No further markup elements are allowed within this element.
  
  
  [1m[4m[31m3.7-7 [22m[32m<Button>[1m[4m[31m and [22m[32m<B>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Button (#PCDATA|Alt)*>   <!-- "Button" (also Menu, Key, ...) -->[0m
    [22m[35m<!ELEMENT B (#PCDATA|Alt)*>        <!-- "Button" (shortcut) -->[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element is used to mark something as a [22m[36mbutton[0m. It can also be used for
  other items in a graphical user interface like [22m[36mmenus[0m, [22m[36mmenu entries[0m, or [22m[36mkeys[0m.
  No further markup elements are allowed within this element.
  
  
  [1m[4m[31m3.7-8 [22m[32m<Package>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Package (#PCDATA|Alt)*>   <!-- A package name -->[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  is used to mark something as a name of a [22m[36mpackage[0m. This is for
  example used to define the entities [1mGAP[0m, [1mXGAP[0m or [1mGAPDoc[0m (see section [1m2.2-3[0m).
  No further markup elements are allowed within this element.
  
  
  [1m[4m[31m3.7-9 [22m[32m<Listing>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Listing (#PCDATA)>  <!-- This is just for GAP code listings -->[0m
    [22m[35m<!ATTLIST Listing Type CDATA #IMPLIED> <!-- a comment about the type of[0m
    [22m[35m                                            listed code, may appear in[0m
    [22m[35m                                            output -->[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This  element  is used to embed listings of programs into the document. Only
  character  data and no other elements are allowed in the content. You should
  [22m[36mnot[0m  use  the character entities described in section [1m2.2-3[0m but instead type
  the  characters directly. Only the general XML rules from section [1m2.1[0m apply.
  Note  especially  the  usage  of  [22m[32m<![CDATA[[0m  sections described there. It is
  guaranteed  that  all  characters  use  a  fixed  width font for typesetting
  [22m[32mListing[0m  elements.  Compare  also  the  usage  of the [22m[32mCode[0m and [22m[32mC[0m elements in
  [1m3.7-5[0m.
  
  The  [22m[32mType[0m attribute contains a comment about the type of listed code. It may
  appear in the output.
  
  
  [1m[4m[31m3.7-10 [22m[32m<Log>[1m[4m[31m and [22m[32m<Example>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Example (#PCDATA)>  <!-- This is subject to the automatic [0m
    [22m[35m                                   example checking mechanism -->[0m
    [22m[35m<!ELEMENT Log (#PCDATA)>      <!-- This not -->[0m
  [22m[35m------------------------------------------------------------------[0m
  
  These two elements behave exactly like the [22m[32mListing[0m element (see [1m3.7-9[0m). They
  are  thought  for protocols of [1mGAP[0m sessions. The only difference between the
  two  is  that  [22m[32mExample[0m  sections  are intended to be subject to an automatic
  manual  checking  mechanism used to ensure the correctness of the [1mGAP[0m manual
  whereas [22m[32mLog[0m is not touched by this.
  
  
  [1m[4m[31m3.7-11 <Verb>[0m
  
  There is one further type of verbatim-like element.
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Verb  (#PCDATA)> [0m
  [22m[35m------------------------------------------------------------------[0m
  
  The  content  of  such  an  element  is  guaranteed to be put into an output
  version  exactly  as it is using some fixed width font. Before the content a
  new  line is started. If the line after the end of the start tag consists of
  whitespace only then this part of the content is skipped.
  
  This element is intended to be used together with the [22m[32mAlt[0m element to specify
  pre-formatted ASCII alternatives for complicated [22m[32mDisplay[0m formulae or [22m[32mTable[0ms.
  
  
  [1m[4m[31m3.8 Elements for Mathematical Formulae[0m
  
  
  [1m[4m[31m3.8-1 [22m[32m<Math>[1m[4m[31m and [22m[32m<Display>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!-- Normal TeX math mode formula -->[0m
    [22m[35m<!ELEMENT Math (#PCDATA|A|Arg|Alt)*>   [0m
    [22m[35m<!-- TeX displayed math mode formula -->[0m
    [22m[35m<!ELEMENT Display (#PCDATA|A|Arg|Alt)*>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  These  elements  are used for mathematical formulae. As described in section
  [1m2.2-2[0m they correspond to LaTeX's math and display math mode respectively.
  
  The  formulae  are  typed  in  as  in  LaTeX,  [22m[36mexcept[0m  that the standard XML
  entities,  see[1m2.1-9[0m (in particular the characters [22m[32m<[0m and [22m[32m&[0m), must be escaped
  -  either  by  using  the corresponding entities or by enclosing the formula
  between "[22m[32m<![CDATA[[0m" and "[22m[32m]]>[0m". (The main reference for LaTeX is [L85].)
  
  The only element type that is allowed within the formula elements is the [22m[32mArg[0m
  or  [22m[32mA[0m  element  (see  [1m3.7-4[0m),  which is used to typeset identifiers that are
  arguments to [1mGAP[0m functions or operations.
  
  In  text  and  HTML output these formula are shown as LaTeX source code. For
  simple formulae (and you should try to make all your formulae simple!) there
  is  the  element [22m[32mM[0m (see[1m3.8-2[0m) for which there is a well defined translation
  into  text,  which  can  be  used  for  text and HTML output versions of the
  document.  So,  if  possible  try  to avoid the [22m[32mMath[0m and [22m[32mDisplay[0m elements or
  provide  useful  text  substitutes for complicated formulae via [22m[32mAlt[0m elements
  (see[1m3.9-1[0m and[1m3.7-11[0m).
  
  
  [1m[4m[31m3.8-2 [22m[32m<M>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!-- Math with well defined translation to text output -->[0m
    [22m[35m<!ELEMENT M (#PCDATA|A|Arg|Alt)*>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  The  "[22m[32mM[0m" element type is intended for formulae in the running text for which
  there  is  a  sensible  ASCII  version.  For  the  LaTeX version of a [1mGAPDoc[0m
  document  the [22m[32mM[0m and [22m[32mMath[0m elements are equivalent. The remarks in [1m3.8-1[0m about
  special  characters and the [22m[32mArg[0m element apply here as well. A document which
  has  all  formulae  enclosed  in  [22m[32mM[0m  elements  can  be well readable in text
  terminal output and printed output versions.
  
  The  following  LaTeX  macros  have  a  sensible  ASCII  translation and are
  guaranteed to be translated accordingly by text (and HTML) converters:
  
     ---------------------------
      | \ldots          | [22m[32m...[0m | 
     ---------------------------
      | \mid            | [22m[32m|[0m   | 
     ---------------------------
      | \left           | [22m[32m[0m   | 
     ---------------------------
      | \right          | [22m[32m[0m   | 
     ---------------------------
      | \mathbb         | [22m[32m[0m   | 
     ---------------------------
      | \mathop         | [22m[32m[0m   | 
     ---------------------------
      | \limits         | [22m[32m[0m   | 
     ---------------------------
      | \cdot           | [22m[32m*[0m   | 
     ---------------------------
      | \ast            | [22m[32m*[0m   | 
     ---------------------------
      | \geq            | [22m[32m>=[0m  | 
     ---------------------------
      | \leq            | [22m[32m<=[0m  | 
     ---------------------------
      | \pmod           | [22m[32mmod[0m | 
     ---------------------------
      | \equiv          | [22m[32m=[0m   | 
     ---------------------------
      | \rightarrow     | [22m[32m->[0m  | 
     ---------------------------
      | \hookrightarrow | [22m[32m->[0m  | 
     ---------------------------
      | \to             | [22m[32m->[0m  | 
     ---------------------------
      | \longrightarrow | [22m[32m-->[0m | 
     ---------------------------
      | \Rightarrow     | [22m[32m=>[0m  | 
     ---------------------------
      | \Longrightarrow | [22m[32m==>[0m | 
     ---------------------------
      | \Leftarrow      | [22m[32m<=[0m  | 
     ---------------------------
      | \iff            | [22m[32m<=>[0m | 
     ---------------------------
      | \mapsto         | [22m[32m->[0m  | 
     ---------------------------
      | \leftarrow      | [22m[32m<-[0m  | 
     ---------------------------
      | \langle         | [22m[32m<[0m   | 
     ---------------------------
      | \rangle         | [22m[32m>[0m   | 
     ---------------------------
      | \setminus       | [22m[32m\[0m   | 
     ---------------------------
  
       [1m[4m[31mTable:[0m LaTeX macros with special text translation
  
  
  In  all other macros only the backslash is removed. Whitespace is normalized
  (to  one  blank)  but not removed. Note that whitespace is not added, so you
  may  want  to  add  a  few  more  spaces  than  you usually do in your LaTeX
  documents.
  
  Braces  [22m[32m{}[0m  are  removed  in  general,  however  pairs  of double braces are
  converted to one pair of braces. This can be used to write [22m[32m<M>x^{12}</M>[0m for
  [22m[32mx^12[0m and [22m[32m<M>x_{{i+1}}</M>[0m for [22m[32mx_{i+1}[0m.
  
  
  [1m[4m[31m3.9 Everything else[0m
  
  
  [1m[4m[31m3.9-1 [22m[32m<Alt>[1m[4m[31m[0m
  
  This  element  is  used to specify alternatives for different output formats
  within   normal  text.  See  also  sections  [1m3.6-1[0m,  [1m3.6-4[0m,  and  [1m3.6-5[0m  for
  alternatives in lists and tables.
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Alt (%InnerText;)*>  <!-- This is only to allow "Only" and[0m
    [22m[35m                                    "Not" attributes for normal text -->[0m
    [22m[35m<!ATTLIST Alt Only CDATA #IMPLIED[0m
    [22m[35m              Not  CDATA #IMPLIED>[0m
  [22m[35m------------------------------------------------------------------[0m
  
  Of  course  exactly one of the two attributes must occur in one element. The
  following  values are allowed as of now: "[22m[32mLaTeX[0m", "[22m[32mHTML[0m", and "[22m[32mText[0m". If the
  [22m[32mOnly[0m  attribute  is  specified  then  only  the corresponding converter will
  include  the  content  of  the  element into the output document. If the [22m[32mNot[0m
  attribute  is  specified the corresponding converter will ignore the content
  of the element.
  
  Within  the  element  only  [22m[32m%InnerText;[0m  (see  [1m3.2-3[0m) is allowed. This is to
  ensure  that  the same set of chapters, sections, and subsections show up in
  all output formats.
  
  
  [1m[4m[31m3.9-2 [22m[32m<Par>[1m[4m[31m and [22m[32m<P>[1m[4m[31m[0m
  
  [22m[35m-----------------------  From gapdoc.dtd  ------------------------[0m
    [22m[35m<!ELEMENT Par EMPTY>    <!-- this is intentionally empty! -->[0m
    [22m[35m<!ELEMENT P EMPTY>      <!-- this is intentionally empty! -->[0m
  [22m[35m------------------------------------------------------------------[0m
  
  This [22m[32mEMPTY[0m element marks the boundary of paragraphs. Note that an empty line
  in  the  input  does  not  mark  a  new  paragraph  as  opposed to the LaTeX
  convention.
  
  (Remark:  it  would be much easier to parse a document and to understand its
  sectioning  and  paragraph structure when there was an element whose [22m[36mcontent[0m
  is  the  text  of a paragraph. But in practice many paragraph boundaries are
  implicitly  clear  which  would  make  it  somewhat  painful to enclose each
  paragraph  in extra tags. The introduction of the [22m[32mP[0m or [22m[32mPar[0m elements as above
  delegates  this  pain  to  the  writer  of  a  conversion program for [1mGAPDoc[0m
  documents.)
  
