Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 5e1854624d3bc613bdd0dd13d1ef9ac7 > files > 350

gap-system-4.4.12-5mdv2010.0.i586.rpm

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>GAP (GAPDoc) - Chapter 2: How To Type a GAPDoc Document</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
</head>
<body>


<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chap6.html">6</a>  <a href="chap7.html">7</a>  <a href="chapA.html">A</a>  <a href="chapB.html">B</a>  <a href="chapC.html">C</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<div class="chlinkprevnexttop">&nbsp;<a href="chap0.html">Top of Book</a>&nbsp;  &nbsp;<a href="chap1.html">Previous Chapter</a>&nbsp;  &nbsp;<a href="chap3.html">Next Chapter</a>&nbsp;  </div>

<p><a id="X7890CF967F3E2FED" name="X7890CF967F3E2FED"></a></p>
<div class="ChapSects"><a href="chap2.html#X7890CF967F3E2FED">2 <span class="Heading">How To Type a <strong class="pkg">GAPDoc</strong> Document</span></a>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap2.html#X7B3A544986A1A9EA">2.1 <span class="Heading">General XML Syntax</span></a>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap2.html#X84E8D39687638CF0">2.1-1 <span class="Heading">Head of XML Document</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap2.html#X780C79EB85C32138">2.1-2 <span class="Heading">Comments</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap2.html#X82DBCCAD8358BB63">2.1-3 <span class="Heading">Processing Instructions</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap2.html#X7A0FB16C7FEC0B53">2.1-4 <span class="Heading">Names in XML and Whitespace</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap2.html#X79B130FC7906FB4C">2.1-5 <span class="Heading">Elements</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap2.html#X7DD1DCB783588BD5">2.1-6 <span class="Heading">Start Tags</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap2.html#X7E5A567E83005B62">2.1-7 <span class="Heading">End Tags</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap2.html#X843A02A88514D919">2.1-8 <span class="Heading">Combined Tags for Empty Elements</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap2.html#X78FB56C77B1F391A">2.1-9 <span class="Heading">Entities</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap2.html#X84A95A19801EDE76">2.1-10 <span class="Heading">Special Characters in XML</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap2.html#X7F49E7AD785AED22">2.1-11 <span class="Heading">Rules for Attribute Values</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap2.html#X82E77E707A062908">2.1-12 <span class="Heading"><code class="code">CDATA</code></span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap2.html#X8709BD337DA09ED5">2.1-13 <span class="Heading">Encoding of an XML Document</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap2.html#X8561F07A81CABDD6">2.1-14 <span class="Heading">Well Formed and Valid XML Documents</span></a>
</span>
</div>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap2.html#X7BDE59B17CF1D5D2">2.2 <span class="Heading">Entering <strong class="pkg">GAPDoc</strong> Documents</span></a>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap2.html#X79171E047B069F94">2.2-1 <span class="Heading">Other special characters</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap2.html#X7EAE0C5A835F126F">2.2-2 <span class="Heading">Mathematical Formulae</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap2.html#X7BDFF6D37FBED400">2.2-3 <span class="Heading">More Entities</span></a>
</span>
</div>
</div>

<h3>2 <span class="Heading">How To Type a <strong class="pkg">GAPDoc</strong> Document</span></h3>

<p>In this chapter we give a more formal description of what you need to start to type documentation in <strong class="pkg">GAPDoc</strong> XML format. Many details were already explained by example in Section <a href="chap1.html#X7B47AFA881BFC9DC"><b>1.2</b></a> of the introduction.</p>

<p>We do <em>not</em> answer the question "How to <em>write</em> a <strong class="pkg">GAPDoc</strong> document?" in this chapter. You can (hopefully) find an answer to this question by studying the example in the introduction, see <a href="chap1.html#X7B47AFA881BFC9DC"><b>1.2</b></a>, and learning about more details in the reference Chapter <a href="chap3.html#X7859CFF180D52D49"><b>3</b></a>.</p>

<p>The definite source for all details of the official XML standard with useful annotations is:</p>

<p><span class="URL"><a href="http://www.xml.com/axml/axml.html">http://www.xml.com/axml/axml.html</a></span></p>

<p>Although this document must be quite technical, it is surprisingly well readable.</p>

<p><a id="X7B3A544986A1A9EA" name="X7B3A544986A1A9EA"></a></p>

<h4>2.1 <span class="Heading">General XML Syntax</span></h4>

<p>We will now discuss the pieces of text which can occur in a general XML document. We start with those pieces which do not contribute to the actual content of the document.</p>

<p><a id="X84E8D39687638CF0" name="X84E8D39687638CF0"></a></p>

<h5>2.1-1 <span class="Heading">Head of XML Document</span></h5>

<p>Each XML document should have a head which states that it is an XML document in some encoding and which XML-defined language is used. In case of a <strong class="pkg">GAPDoc</strong> document this should always look as in the following example.</p>


<table class="example">
<tr><td><pre>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE Book SYSTEM "gapdoc.dtd"&gt;
</pre></td></tr></table>

<p>See <a href="chap2.html#X8709BD337DA09ED5"><b>2.1-13</b></a> for a remark on the "encoding" statement.</p>

<p>(There may be local entity definitions inside the <code class="code">DOCTYPE</code> statement, see Subsection <a href="chap2.html#X7BDFF6D37FBED400"><b>2.2-3</b></a> below.)</p>

<p><a id="X780C79EB85C32138" name="X780C79EB85C32138"></a></p>

<h5>2.1-2 <span class="Heading">Comments</span></h5>

<p>A "comment" in XML starts with the character sequence "<code class="code">&lt;!--</code>" and ends with the sequence "<code class="code">--&gt;</code>". Between these sequences there must not be two adjacent dashes "<code class="code">--</code>".</p>

<p><a id="X82DBCCAD8358BB63" name="X82DBCCAD8358BB63"></a></p>

<h5>2.1-3 <span class="Heading">Processing Instructions</span></h5>

<p>A "processing instruction" in XML starts with the character sequence "<code class="code">&lt;?</code>" followed by a name ("<code class="code">xml</code>" is only allowed at the very beginning of the document to declare it being an XML document, see <a href="chap2.html#X84E8D39687638CF0"><b>2.1-1</b></a>). After that any characters may follow, except that the ending sequence "<code class="code">?&gt;</code>" must not occur within the processing instruction.</p>

<p> </p>

<p>And now we turn to those parts of the document which contribute to its actual content.</p>

<p><a id="X7A0FB16C7FEC0B53" name="X7A0FB16C7FEC0B53"></a></p>

<h5>2.1-4 <span class="Heading">Names in XML and Whitespace</span></h5>

<p>A "name" in XML (used for element and attribute identifiers, see below) must start with a letter (in the encoding of the document) or with a colon "<code class="code">:</code>" or underscore "<code class="code">_</code>" character. The following characters may also be digits, dots "<code class="code">.</code>" or dashes "<code class="code">-</code>".</p>

<p>This is a simplified description of the rules in the standard, which are concerned with lots of unicode ranges to specify what a "letter" is.</p>

<p>Sequences only consisting of the following characters are considered as <em>whitespace</em>: blanks, tabs, carriage return characters and new line characters.</p>

<p><a id="X79B130FC7906FB4C" name="X79B130FC7906FB4C"></a></p>

<h5>2.1-5 <span class="Heading">Elements</span></h5>

<p>The actual content of an XML document consists of "elements". An element has some "content" with a leading "start tag" (<a href="chap2.html#X7DD1DCB783588BD5"><b>2.1-6</b></a>) and a trailing "end tag" (<a href="chap2.html#X7E5A567E83005B62"><b>2.1-7</b></a>). The content can contain further elements but they must be properly nested. One can define elements whose content is always empty, those elements can also be entered with a single combined tag (<a href="chap2.html#X843A02A88514D919"><b>2.1-8</b></a>).</p>

<p><a id="X7DD1DCB783588BD5" name="X7DD1DCB783588BD5"></a></p>

<h5>2.1-6 <span class="Heading">Start Tags</span></h5>

<p>A "start-tag" consists of a less-than-character "<code class="code">&lt;</code>" directly followed (without whitespace) by an element name (see <a href="chap2.html#X7A0FB16C7FEC0B53"><b>2.1-4</b></a>), optional attributes, optional whitespace, and a greater-than-character "<code class="code">&gt;</code>".</p>

<p>An "attribute" consists of some whitespace and then its name followed by an equal sign "<code class="code">=</code>" which is optionally enclosed by whitespace, and the attribute value, which is enclosed either in single or double quotes. The attribute value may not contain the type of quote used as a delimiter or the character "<code class="code">&lt;</code>", the character "<code class="code">&amp;</code>" may only appear to start an entity, see <a href="chap2.html#X78FB56C77B1F391A"><b>2.1-9</b></a>. We describe in <a href="chap2.html#X7F49E7AD785AED22"><b>2.1-11</b></a> how to enter special characters in attribute values.</p>

<p>Note especially that no whitespace is allowed between the starting "<code class="code">&lt;</code>" character and the element name. The quotes around an attribute value cannot be omitted. The names of elements and attributes are <em>case sensitive</em>.</p>

<p><a id="X7E5A567E83005B62" name="X7E5A567E83005B62"></a></p>

<h5>2.1-7 <span class="Heading">End Tags</span></h5>

<p>An "end tag" consists of the two characters "<code class="code">&lt;/</code>" directly followed by the element name, optional whitespace and a greater-than-character "<code class="code">&gt;</code>".</p>

<p><a id="X843A02A88514D919" name="X843A02A88514D919"></a></p>

<h5>2.1-8 <span class="Heading">Combined Tags for Empty Elements</span></h5>

<p>Elements which always have empty content can be written with a single tag. This looks like a start tag (see <a href="chap2.html#X7DD1DCB783588BD5"><b>2.1-6</b></a>) <em>except</em> that the trailing greater-than-character "<code class="code">&gt;</code>" is substituted by the two character sequence "<code class="code">/&gt;</code>".</p>

<p><a id="X78FB56C77B1F391A" name="X78FB56C77B1F391A"></a></p>

<h5>2.1-9 <span class="Heading">Entities</span></h5>

<p>An "entity" in XML is a macro for some substitution text. There are two types of entities.</p>

<p>A "character entity" can be used to specify characters in the encoding of the document (can be useful for entering non-ASCII characters which you cannot manage to type in directly). They are entered with a sequence "<code class="code">&amp;#</code>", directly followed by either some decimal digits or an "<code class="code">x</code>" and some hexadecimal digits, directly followed by a semicolon "<code class="code">;</code>". Using such a character entity is just equivalent to typing the corresponding character directly.</p>

<p>Then there are references to "named entities". They are entered with an ampersand character "<code class="code">&amp;</code>" directly followed by a name which is directly followed by a semicolon "<code class="code">;</code>". Such entities must be declared somewhere by giving a substitution text. This text is included in the document and the document is parsed again afterwards. The exact rules are a bit subtle but you probably want to use this only in simple cases. Predefined entities for <strong class="pkg">GAPDoc</strong> are described in <a href="chap2.html#X84A95A19801EDE76"><b>2.1-10</b></a> and <a href="chap2.html#X7BDFF6D37FBED400"><b>2.2-3</b></a>.</p>

<p><a id="X84A95A19801EDE76" name="X84A95A19801EDE76"></a></p>

<h5>2.1-10 <span class="Heading">Special Characters in XML</span></h5>

<p>We have seen that the less-than-character "<code class="code">&lt;</code>" and the ampersand character "<code class="code">&amp;</code>" start a tag or entity reference in XML. To get these characters into the document text one has to use entity references, namely "<code class="code">&amp;lt;</code>" to get "<code class="code">&lt;</code>" and "<code class="code">&amp;amp;</code>" to get "<code class="code">&amp;</code>". Furthermore "<code class="code">&amp;gt;</code>" must be used to get "<code class="code">&gt;</code>" when the string "<code class="code">]]&gt;</code>" appears in element content (and not as delimiter of a <code class="code">CDATA</code> section explained below).</p>

<p>Another possibility is to use a <code class="code">CDATA</code> statement explained in <a href="chap2.html#X82E77E707A062908"><b>2.1-12</b></a>.</p>

<p><a id="X7F49E7AD785AED22" name="X7F49E7AD785AED22"></a></p>

<h5>2.1-11 <span class="Heading">Rules for Attribute Values</span></h5>

<p>Attribute values can contain entities which are substituted recursively. But except for the entities &amp;lt; or a character entity it is not allowed that a &lt; character is introduced by the substitution (there is no XML parsing for evaluating the attribute value, just entity substitutions).</p>

<p><a id="X82E77E707A062908" name="X82E77E707A062908"></a></p>

<h5>2.1-12 <span class="Heading"><code class="code">CDATA</code></span></h5>

<p>Pieces of text which contain many characters which can be misinterpreted as markup can be enclosed by the character sequences "<code class="code">&lt;![CDATA[</code>" and "<code class="code">]]&gt;</code>". Everything between these sequences is considered as content of the document and is not further interpreted as XML text. All the rules explained so far in this section do <em>not apply</em> to such a part of the document. The only document content which cannot be entered directly inside a <code class="code">CDATA</code> statement is the sequence "<code class="code">]]&gt;</code>". This can be entered as "<code class="code">]]&amp;gt;</code>" outside the <code class="code">CDATA</code> statement.</p>


<table class="example">
<tr><td><pre>
A nesting of tags like &lt;a&gt; &lt;b&gt; &lt;/a&gt; &lt;/b&gt; is not allowed.
</pre></td></tr></table>

<p><a id="X8709BD337DA09ED5" name="X8709BD337DA09ED5"></a></p>

<h5>2.1-13 <span class="Heading">Encoding of an XML Document</span></h5>

<p>We suggest to use the UTF-8 encoding for writing <strong class="pkg">GAPDoc</strong> XML documents. But the tools described in Chapter <a href="chap5.html#X845E7FDC7C082CC4"><b>5</b></a> also work with ASCII or the various ISO-8859-X encodings (ISO-8859-1 is also called latin1 and covers most special characters for western European languages).</p>

<p><a id="X8561F07A81CABDD6" name="X8561F07A81CABDD6"></a></p>

<h5>2.1-14 <span class="Heading">Well Formed and Valid XML Documents</span></h5>

<p>We want to mention two further important words which are often used in the context of XML documents. A piece of text becomes a "well formed" XML document if all the formal rules described in this section are fulfilled.</p>

<p>But this says nothing about the content of the document. To give this content a meaning one needs a declaration of the element and corresponding attribute names as well as of named entities which are allowed. Furthermore there may be restrictions how such elements can be nested. This <em>definition of an XML based markup language</em> is done in a "document type definition". An XML document which contains only elements and entities declared in such a document type definition and obeys the rules given there is called "valid (with respect to this document type definition)".</p>

<p>The main file of the <strong class="pkg">GAPDoc</strong> package is <code class="file">gapdoc.dtd</code>. This contains such a definition of a markup language. We are not going to explain the formal syntax rules for document type definitions in this section. But in Chapter <a href="chap3.html#X7859CFF180D52D49"><b>3</b></a> we will explain enough about it to understand the file <code class="file">gapdoc.dtd</code> and so the markup language defined there.</p>

<p><a id="X7BDE59B17CF1D5D2" name="X7BDE59B17CF1D5D2"></a></p>

<h4>2.2 <span class="Heading">Entering <strong class="pkg">GAPDoc</strong> Documents</span></h4>

<p>Here are some additional rules for writing <strong class="pkg">GAPDoc</strong> XML documents.</p>

<p><a id="X79171E047B069F94" name="X79171E047B069F94"></a></p>

<h5>2.2-1 <span class="Heading">Other special characters</span></h5>

<p>As <strong class="pkg">GAPDoc</strong> documents are used to produce LaTeX and HTML documents, the question arises how to deal with characters with a special meaning for other applications (for example "<code class="code">&amp;</code>", "<code class="code">#</code>", "<code class="code">$</code>", "<code class="code">%</code>", "<code class="code">~</code>", "<code class="code">\</code>", "<code class="code">{</code>", "<code class="code">}</code>", "<code class="code">_</code>", "<code class="code">^</code>", "<code class="code"> </code>" (this is a non-breakable space, "<code class="code">~</code>" in LaTeX) have a special meaning for LaTeX and "<code class="code">&amp;</code>", "<code class="code">&lt;</code>", "<code class="code">&gt;</code>" have a special meaning for HTML (and XML). In <strong class="pkg">GAPDoc</strong> you can usually just type these characters directly, it is the task of the converter programs which translate to some output format to take care of such special characters. The exceptions to this simple rule are:</p>


<ul>
<li><p>&amp; and &lt; must be entered as <code class="code">&amp;amp;</code> and <code class="code">&amp;lt;</code> as explained in <a href="chap2.html#X84A95A19801EDE76"><b>2.1-10</b></a>.</p>

</li>
<li><p>The content of the <strong class="pkg">GAPDoc</strong> elements <code class="code">&lt;M&gt;</code>, <code class="code">&lt;Math&gt;</code> and <code class="code">&lt;Display&gt;</code> is LaTeX code, see <a href="chap3.html#X8145F6B37C04AA0A"><b>3.8</b></a>.</p>

</li>
<li><p>The content of an <code class="code">&lt;Alt&gt;</code> element with <code class="code">Only</code> attribute contains code for the specified output type, see <a href="chap3.html#X850E69017945AE3E"><b>3.9-1</b></a>.</p>

</li>
</ul>
<p>Remark: In former versions of <strong class="pkg">GAPDoc</strong> one had to use particular entities for all the special characters mentioned above (<code class="code">&amp;tamp;</code>, <code class="code">&amp;hash;</code>, <code class="code">&amp;dollar;</code>, <code class="code">&amp;percent;</code>, <code class="code">&amp;tilde;</code>, <code class="code">&amp;bslash;</code>, <code class="code">&amp;obrace;</code>, <code class="code">&amp;cbrace;</code>, <code class="code">&amp;uscore;</code>, <code class="code">&amp;circum;</code>, <code class="code">&amp;tlt;</code>, <code class="code">&amp;tgt;</code>). These are no longer needed, but they are still defined for backwards compatibility with older <strong class="pkg">GAPDoc</strong> documents.</p>

<p><a id="X7EAE0C5A835F126F" name="X7EAE0C5A835F126F"></a></p>

<h5>2.2-2 <span class="Heading">Mathematical Formulae</span></h5>

<p>Mathematical formulae in <strong class="pkg">GAPDoc</strong> are typed as in LaTeX. They must be the content of one of three types of <strong class="pkg">GAPDoc</strong> elements concerned with mathematical formulae: "<code class="code">Math</code>", "<code class="code">Display</code>", and "<code class="code">M</code>" (see Sections <a href="chap3.html#X7AA02845868AA533"><b>3.8-1</b></a> and <a href="chap3.html#X7ABF42328467E966"><b>3.8-2</b></a> for more details). The first two correspond to LaTeX's math mode and display math mode. The last one is a special form of the "<code class="code">Math</code>" element type, that imposes certain restrictions on the content. On the other hand the content of an "<code class="code">M</code>" element is processed in a well defined way for text terminal or HTML output.</p>

<p>Note that the content of these element is LaTeX code, but the special characters "<code class="code">&lt;</code>" and "<code class="code">&amp;</code>" for XML must be entered via the entities described in <a href="chap2.html#X84A95A19801EDE76"><b>2.1-10</b></a> or by using a <code class="code">CDATA</code> statement, see <a href="chap2.html#X82E77E707A062908"><b>2.1-12</b></a>.</p>

<p><a id="X7BDFF6D37FBED400" name="X7BDFF6D37FBED400"></a></p>

<h5>2.2-3 <span class="Heading">More Entities</span></h5>

<p>In <strong class="pkg">GAPDoc</strong> there are some more predefined entities:</p>

<div class="pcenter"><table class="GAPDocTable">
<caption class="GAPDocTable"><b>Table: </b>Predefined Entities in the <strong class="pkg">GAPDoc</strong> system</caption>
<tr>
<td class="tdleft"><code class="code">&amp;GAP;</code></td>
<td class="tdleft"><strong class="pkg">GAP</strong></td>
</tr>
<tr>
<td class="tdleft"><code class="code">&amp;GAPDoc;</code></td>
<td class="tdleft"><strong class="pkg">GAPDoc</strong></td>
</tr>
<tr>
<td class="tdleft"><code class="code">&amp;TeX;</code></td>
<td class="tdleft">TeX</td>
</tr>
<tr>
<td class="tdleft"><code class="code">&amp;LaTeX;</code></td>
<td class="tdleft">LaTeX</td>
</tr>
<tr>
<td class="tdleft"><code class="code">&amp;BibTeX;</code></td>
<td class="tdleft">BibTeX</td>
</tr>
<tr>
<td class="tdleft"><code class="code">&amp;MeatAxe;</code></td>
<td class="tdleft"><strong class="pkg">MeatAxe</strong></td>
</tr>
<tr>
<td class="tdleft"><code class="code">&amp;XGAP;</code></td>
<td class="tdleft"><strong class="pkg">XGAP</strong></td>
</tr>
<tr>
<td class="tdleft"><code class="code">&amp;copyright;</code></td>
<td class="tdleft">©</td>
</tr>
<tr>
<td class="tdleft"><code class="code">&amp;nbsp;</code></td>
<td class="tdleft">" "</td>
</tr>
<tr>
<td class="tdleft"><code class="code">&amp;ndash;</code></td>
<td class="tdleft">–</td>
</tr>
</table><br /><p>&nbsp;</p><br />
</div>

<p>Here <code class="code">&amp;nbsp;</code> is a non-breakable space character.</p>

<p>Additional entities are defined for some mathematical symbols, see <a href="chap3.html#X8145F6B37C04AA0A"><b>3.8</b></a> for more details.</p>

<p>One can define further local entities right inside the head (see <a href="chap2.html#X84E8D39687638CF0"><b>2.1-1</b></a>) of a <strong class="pkg">GAPDoc</strong> XML document as in the following example.</p>


<table class="example">
<tr><td><pre>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;!DOCTYPE Book SYSTEM "gapdoc.dtd"
  [ &lt;!ENTITY MyEntity "some longish &lt;E&gt;text&lt;/E&gt; possibly with markup"&gt;
  ]&gt;
</pre></td></tr></table>

<p>These additional definitions go into the <code class="code">&lt;!DOCTYPE</code> tag in square brackets. Such new entities are used like this: <code class="code">&amp;MyEntity;</code></p>


<div class="chlinkprevnextbot">&nbsp;<a href="chap0.html">Top of Book</a>&nbsp;  &nbsp;<a href="chap1.html">Previous Chapter</a>&nbsp;  &nbsp;<a href="chap3.html">Next Chapter</a>&nbsp;  </div>


<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chap6.html">6</a>  <a href="chap7.html">7</a>  <a href="chapA.html">A</a>  <a href="chapB.html">B</a>  <a href="chapC.html">C</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<hr />
<p class="foot">generated by <a href="http://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>