<chapt id="markup">

  <heading>SGML markup and metacharacters</heading>

  <p>
    As entered in a text editor SGML document consists of text
    interspersed with tags denoting the start and end of elements.
  </p>

  <p>
    Tags take the form <tt>&lt;<var>element</var>&gt;</tt> to start
    the element <var>element</var> and
    <tt>&lt;<var>/element</var>&gt;</tt> to finish it.
  </p>

  <p>
    There are some shorthands you can use:
    <tt>&lt;<var>element/</var><var>contents/</var></tt> specifies an
    element <var>element</var> with contents <var>contents</var> - but
    the <var>contents</var> may not contain a slash
    <tt>/</tt>. <tt>&lt;/&gt;</tt> closes the innermost currently open
    element.
  </p>

  <p>
    Some types of element start tag can have attributes; these appear
    inside the closing angle bracket, and are separated from the
    element name by whitespace.  The attributes allowed in a
    particular element's start tag are described along with the
    element.
  </p>

  <p>
    If you want to include SGML's markup characters (angle brackets
    <tt>&lt;</tt> <tt>&gt;</tt> and ampersands <tt>&amp;</tt>) as text
    you must refer to them by name (this is called an entity reference
    in SGML-speak). <tt>&amp;<var>name</var>;</tt> produces the
    character whose name is <var>name</var>.
  </p>

  <p>
    Some useful character names are:
    <taglist compact="compact">
      <tag>
	<tt>lt</tt>
      </tag>
      <item>
	<p>
	  less than sign (left angle bracket) <tt>&lt;</tt>
	</p>
      </item>
      <tag>
	<tt>gt</tt>
      </tag>
      <item>
	<p>
	  greater than sign (right angle bracket) <tt>&gt;</tt>
	</p>
      </item>
      <tag>
	<tt>amp</tt>
      </tag>
      <item>
	<p>
	  ampersand <tt>&amp;</tt>
	</p>
      </item>
      <tag>
	<tt>copy</tt>
      </tag>
      <item>
	<p>
	  copyright symbol <tt>&copy;</tt>
	</p>
      </item>
    </taglist>
  </p>
  
  <p>
    DebianDoc-SGML supports the full set of ISO entities as defined
    in the files <file>/usr/share/sgml/entities/*ml-iso-entities-*.*/ISO*</file>.
  </p>
  
  <p>
    You can also use <tt>&amp;#<var>number</var>;</tt> to refer to the
    character whose number is <var>number</var> (in
    ISO-LATIN-1). <var>number</var> should be in decimal.
  </p>

</chapt>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-namecase-general:t
sgml-general-insert-case:lower
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:("../debiandoc-sgml.en.sgml" "book" "chapt")
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->
