\batchmode
\documentstyle[null,qwertz,dina4]{report}
\input{epsf.tex}
\pagestyle{headings}
\title{The {\tt qwertz} SGML Document Types
\\
{\large (Version 1.2 Reference Manual)}
}
\author{Tom Gordon \\
\\
 The {\tt qwertz} Project \\
Institute for Applied Information Technology (F3) \\
\\
German National Research Center \\
for Computer Science (GMD)}


\begin{document}
\maketitle
\tableofcontents
\listoftables

\chapter{Why Not Just Use {\LaTeX}?}

The {\tt qwertz} document types are a set of Standard Generalized
Markup Language (SGML) document type definitions (DTDs) for articles,
reports, books, letters, notes, slides (or overhead transparencies),
bibliographies, and manual pages.  Except for manual pages, the
document types have been heavily influenced by the {\LaTeX} document
types of the same names \cite{Lamport86}, so {\LaTeX} users should
feel right at home.  Indeed, there is a translator, called
{\tt format}\footnote{{\tt format} is described in the ``Unix Commands''
chapter of this manual.}, which converts {\tt qwertz}
documents into {\LaTeX} and other formats.  Anyone familiar with {\LaTeX}should have no difficulty understanding the {\LaTeX} versions of
documents generated by {\tt format}; with minor exceptions, only
standard {\LaTeX} commands and environments are used.

So why not just use {\LaTeX} directly, you might ask?  Although {\LaTeX}is indeed somewhat of a {\em de facto\/} standard in some scientific
circles, it is tied to a particular formatting system, namely {\TeX}.
SGML is an ISO standard language for defining the logical structure of
documents.  There are a number of tools available for editing, parsing
and translating SGML documents.  SGML structure editors, for example,
take advantage of the logical structure of the document being edited
to offer functions similar to so-called {\em outline processors\/}, and
often use on-screen formatting, similar to WYSIWYG text editors, to
eliminate the necessity of typing and viewing the ``tags'' marking the
various regions of text (such as paragraphs, footnotes, and
citations).  Thus, users need not give up the benefits of an
intuitive, easy-to-use editor to acquire the powerful formatting
capabilities of systems such as {\TeX} or troff.  On the other hand,
SGML documents can also be written using any text editor, such as
emacs, which many authors may prefer.

Also, the use of SGML provides an amount of independence from
particular formatters.  SGML parsers and translators provide the tools
necessary to ease the job of translating documents marked-up in SGML
into any formatting language.  It is a relatively painless job to
translate an SGML document into {\TeX}, MS-Word, or troff, for example,
but can be quite difficult to translate documents formatted using one
of these systems into one of the others.\footnote{In fact, {\tt format}
now is able to generate nroff/troff versions of {\tt qwertz} documents,
in addition to {\LaTeX}.}

Finally, SGML files can be used for purposes other than printing
documents.  In {\tt qwertz}, for example, we use SGML for
{\em literate programming\/} \cite{Knuth84}, extracting and
piecing together the source code of our programs directly from their
documentation.  But there are other uses.  For example, SGML has been
used in implementations of hypertext and hypermedia.




\chapter{A Short Tour}

Suppose you would like to write a letter to a colleague.  Let's go
through the steps of writing, previewing and then printing the letter.
You may want to actually type along at your computer.  Don't worry at
this point if you don't quite understand the details of SGML syntax.

There are just two prerequisites to understanding this tour: you need
to know how to use a text editor such as {\tt textedit}, {\tt emacs}
or {\tt vi}, and you need some basic knowledge about working with a
Unix command shell, such as {\tt ksh} or {\tt csh}.  \footnote{It is
also assumed that your {\tt PATH} environment variable has been set
so as to include the directory containing the programs described in
Chapter \ref{UC}.}

Now, just start your favorite editor and type after me:

\begin{verbatim}
<!doctype qwertz system>
<letter>

<from> Dr. Alexander Hertzberg
<address> 
Institute for Insanely Great Software &nl
Research Center for Stuff Not Yet Discovered &nl
Former Capital City, Germany

<to> Prof. Wanda Wonderful
<address> 
Dept. of Eccentrics &nl
Universal University &nl
Sandy Ego, California, U.S.A.

<opening> Dear Wanda,

Have you heard about that insanely great SGML
to LaTeX translator developed by those guys at the
GMD?  They've done it again!  It does everything
and more.  I'll never go back to using a (phooey!)
WYSIWYG editor like <tt/brand name deleted/
again.

<closing> Yours truly,

</letter>
\end{verbatim}



To preview the document, there are several possibilities,
depending on what you have available.  First of all, save your file as
{\tt phooey.sgml} and shift the focus of your attention to some Unix
shell.  Then, if you have a PostScript previewer, such as
{\tt ghostview}\footnote{Ghostview is part of the Gnu system from the
Free Software Foundation.}, try:

\begin{verbatim}
format phooey | qtex > phooey.ps; ghostview phooey.ps
\end{verbatim}



If you are using Open Look, you may have the  {\tt pageview} PostScript previewer:

\begin{verbatim}
format phooey | qtex | pageview
\end{verbatim}



In either case, if you (and I) haven't made any typing errors, your
letter should soon appear on your screen.

If you do not not have a PostScript previewer, you may also be able to
preview the document using a {\tt dvi} previewer, such as
{\tt xdvi}:

\begin{verbatim}
format phooey | qtex -d > phooey.dvi;  xdvi phooey
\end{verbatim}



However, {\tt xdvi} is not effective if PostScript fonts have been
used, as is the case at our site, where letters are formatted so as to
appear to have been printed on our institute's letterhead stationery.

To view the letter on an ordinary ASCII terminal, try this:

\begin{verbatim}
format -T nroff | nroff -ms | more
\end{verbatim}



Now, to print the letter,  formatted using {\LaTeX}, just type:

\begin{verbatim}
 
format phooey | qtex | lpr
\end{verbatim}



Another common type of document is a journal article.  Appendix A
contains the SGML source of a short ``article''.  It is only a few pages
long, but contains examples of most of the elements necessary,
including sections and subsections, headers, footnotes, various kinds
of emphasis, lists, mathematical formulas, tables, figures and a
bibliography.

Perhaps this short tutorial, together with the extended example in
Appendix A, are sufficient for using this reference manual to write
{\tt qwertz} documents.  But you well may want to read one or more of
\cite{Barron89, Bryan88, Warmer89}, each of which contains an
introduction to SGML.  

\batchmode

\chapter{The {\tt qwertz} Document Type Definition}

All of the {\tt qwertz} document ``styles'', except bibliographies, 
are defined in a single SGML document type
definition (DTD), called
{\tt qwertz}.  It is essentially a SGML reconstruction of  Lamport's {\LaTeX} 
\cite{Lamport86}.  We have not attempted to include every feature
of {\LaTeX} in this DTD, but have included the features we use
regularly.  Others may of course find that something they deem
important is missing.  We welcome suggestions for improvements or
extensions.

We will be making use of several {\em parameter entities\/} in this
DTD:

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!entity % emph 
        " em | it | bf | sf | sl | tt " >

<!entity % xref
        " label | ref | pageref | cite | ncite " >

<!entity % inline 
        " (#pcdata | f | x | %emph; | sq | %xref)* " >

<!entity % list 
        " itemize | enum | descrip " >

<!entity % par  
        "  %list; | comment | lq " >

<!entity % mathpar " dm | eq " >

<!entity % thrm 
        " def | prop | lemma | coroll | proof | theorem " >

<!entity % litprog " code | verb " >

<!entity % sectpar 
        " %par; | figure | tabular | table | %mathpar; | 
          %thrm; | %litprog; ">
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



These are just macros used in the definitions of various elements,
to avoid retyping and to ease maintenance.  The {\tt emph} parameter
lists the various kinds of emphasis.  The {\tt inline} parameter is for
the elements which may be used anywhere within the document. The
{\tt list} parameter is for various kinds of lists.  {\tt par} lists
several basic kinds of elements at the level of paragraphs.  The
{\tt mathpar} parameter includes the elements for {\em displayed\/}
mathematical formulas.  The {\tt thrm} parameter is for the set of
elements used to represent such things as definitions, theorems and
proofs.  The {\tt litprog} parameter is for literate programming
elements.  Finally, the {\tt sectpar} parameter lists the elements
which may occur at the level of paragraphs within sections (or
chapters).  Notice that this parameter uses other parameters.

Several kinds of documents may be written using {\LaTeX}: articles,
reports, books, letters and slide (or transparency) presentations.  The {\tt qwertz} DTD 
includes two others as well:  {\tt notes}, for documents such as notes to yourself which do not
require a title, sections, footnotes and the like; and {\tt manpage}, for Unix manual pages.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element qwertz o o 
        (sect | chapt | article | report | 
         book | letter | telefax | slides | notes | manpage ) >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



Notice that sections ({\tt sect}) and chapters ({\tt chapt}) may
also be processed separately, before being put together into an
article, report or book.

{\LaTeX} also includes Bib{\TeX}, a program for creating
bibliographies whose entries can be easily cited in {\LaTeX} documents.
The {\tt qwertz} document type for this purpose is described in Chapter 5.




\section{General Purpose Entities and Elements}

This section describes the SGML entities and elements available in
all {\tt qwertz} documents. 

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!entity % general system -- general purpose characters -- >
%general;
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






\subsection{Characters Entities}

Most characters are created just by typing the character wanted on
the keyboard.  This simple method does not suffice when the character
wanted isn't in the character set available, or at least not
associated with a key on the keyboard, or when the character currently
has special meaning to SGML or, perhaps, {\TeX}. In this section, a
fairly large number of general purpose character entities will be
presented.  Symbols and characters which may be used only in
mathematical formulas will be discussed separately, in section \ref{MATH}.

When may it be necessary to use of an entity reference to produce
some character?  There are three cases to watch out for:

\begin{description}
\item[SGML Concrete Syntax Delimiters.] Although the SGML standard allows alternative concrete syntaxes to
be defined, we use the so-called {\em reference concrete syntax\/} in
the {\tt qwertz} document types.  In this reference syntax, {\lt} is
the {\em start tag open\/} character, and {\tt {\lt}/} is the {\em end
tag open\/} delimiter.  The other SGML delimiter authors should be
aware of is \&, the {\em entity reference open\/} delimiter of the
reference syntax. 

The appropriate entity to use to generate these characters depends
on the context.  Normally, use {\tt lt} to represent {\lt} and
{\tt amp} to get \&, when these appear in strings which might
otherwise be interpreted as starting tags or entity references.
However, within the {\tt code} or {\tt verb} elements for literate
programming, described in section \ref{LITPROG}, use the
{\tt ero} entity to represent \& and the {\tt etago} entity for
the sequence {\tt </}.

\begin{verbatim}
<!entity   lt    sdata "{\lt}" >
<!entity   amp   sdata "\&" >
<!entity   ero   sdata "&" >
<!entity   etago sdata "</" >
\end{verbatim}





\item[SGML Short Reference Delimiters.] In SGML document types {\em short reference maps\/} may be defined
which allow single characters to be interpreted as arbitrarily complex
sequences of characters, including SGML tags and entity references.
Thus, to know precisely when a certain character will be interpreted
literally or as a short reference (i.e. macro) for something else, one
has to know which map is in effect in the context of the current
element.  Just about all punctuation characters which are not used as
delimiters in the concrete syntax can be used as short reference
delimiters:

\begin{verbatim}
" # % ' ( ) * + , - : ; = @ [ ] ^ _ { | } ~
\end{verbatim}



For each of these characters, there is an SGML entity which may be
used to generate the ASCII character in the printed document, listed
in table \ref{GPC}. {\em Usually, it will not be necessary to use these
entities; the character can simply be typed and will be interpreted
literally.\/} However, if the results are not as expected, check to
see if there is a map in effect at that point in the document in which
the character has been redefined.  As maps are associated with
elements, the section in this manual describing an element will also
direct you to a description of the applicable map, if there is one.

As it turns out, one important use of character maps is to generate
exactly the character typed in the printed document.  That is, the map
is used to hide the special meaning of the character to the underlying
formatter (e.g. {\TeX}), replacing the character with the formatting
instructions for generating the character.  This has been the main use
of maps in our {\tt qwertz} document type definitions.  

\begin{verbatim}
<!entity   dquot sdata "{\tt "}" >
<!entity   num  sdata "\#"    >
<!entity   percnt sdata "\%" >
<!entity   quot sdata "{\tt '}"  >
<!entity   lpar sdata "("   >
<!entity   rpar sdata ")"   >
<!entity   ast  sdata "\mch{\ast}"    >
<!entity   plus sdata "+"   >
<!entity   comma sdata "," >
<!entity   hyphen sdata "-"  >
<!entity   colon sdata ":" >
<!entity   semi  sdata ";"  >
<!entity   equals sdata "=" >
<!entity   commat sdata "@" >
<!entity   lsqb  sdata "["  >
<!entity   rsqb  sdata "]"  >
<!entity   circ sdata "\verb+^+"   >
<!entity   lowbar sdata "\_" >  
<!entity   lcub  sdata "\{"     >
<!entity   verbar sdata "{\verbar}" >
<!entity   rcub  sdata "\}"    >
<!entity   tilde sdata "\verb+~+"   >
\end{verbatim}





\item[{\TeX} Special Characters.] Ideally, it should be possible to hide the conventions of the
underlying formatting system completely.  In fact, SGML parsers which
implement the full ISO standard have a feature which makes this
possible.  However, the SGML parser we are using does not include this
feature: the only characters which can serve as short references are
the characters allowed for this purpose by the reference concrete
syntax.  Unfortunately, this reference syntax does not allow \&,
\$ and \verb+\+ to be used as short references, which are all
special {\TeX} characters.  Thus, the entities for these three
characters ({\tt amp, dollar} and {\tt bsol}) must usually be used
to produce them. (The \$ and \verb+\+ characters may be used
directly within the {\tt verb} and {\tt code} elements, discussed
below in section \ref{LITPROG}.  Also, within these elements use
the {\tt ero} entity to represent \& in strings which might
otherwise be interpreted as entity references.)

\begin{verbatim}
<!entity   bsol sdata "\verb+\+" >
<!entity   dollar sdata "\$"     >
\end{verbatim}





\end{description}






\subsection{Spacing, Dashes and Ellipsis}

The meaning of the ordinary space character is context sensitive.
Sometimes there is a space {\em within\/} a single word.  Such spaces
can be typed using the {\em nonbreakable space\/} ({\tt nbsp}) entity
to avoid breaking the word at that point at the end of line.  There
are also contexts where one wants a certain amount of space to appear,
without it being regarded by the formatter as being space which may be
shrunk in order to clean-up the arrangement of words or characters on
the line.  There are three entities for this purpose: {\tt emsp}
denotes the amount of horizontal space required for the character ``M''.
An {\tt ensp} is just half as wide as an {\tt emsp}, and a {\em thin
space\/} ({\tt thinsp}) is $1/6$ of an {\tt emsp}.  Notice that
these are relative amounts, depending on the font being used.

There are also three different kinds of dashes: {\tt hyphen}, which
was already mentioned above, is to be used for intra-word dashes, as
in the word ``intra-word''.\footnote{However, the {\tt hyphen} entity
was not actually necessary here, as the - character was not being used
in this context as a short reference.} {\tt ndash} is to be
used for number ranges, such as ``23{--}56'', and {\tt mdash} is an
alternative delimiter for parenthetical comments {---} certainly
you've seen them used this way {---} perhaps to avoid too frequent
use of commas or parentheses.

\begin{verbatim}
<!entity   nbsp sdata  "~" >
<!entity   emsp sdata "\hspace{1em}" >
<!entity   ensp sdata "\hspace{.5em}" >
<!entity   thinsp sdata "\hspace{.167em}" >
<!entity   mdash sdata "{---}" >
<!entity   ndash sdata "{--}" >
<!entity   hellip sdata "{\ldots}" >
\end{verbatim}






\subsection{Foreign Languages}

There are a large set of entities for other Western European
languages.  Altogether, there are entities for almost all of the
foreign language characters in ISO 8859, the Latin 1 character set for
Western European languages.\footnote{Only the four Icelandic
characters are missing.} Conveniently, these entities are all
available in the usual Adobe PostScript fonts, as well as in {\TeX}.
Thus, all of the entities defined here can be printed in {\TeX}, on
PostScript printers, or displayed on any Latin 1 device.  Depending on
the computer and editor, it may also be possible to type these Latin 1
characters directly, instead of having to use these entities.  A
simple filter could translate Latin 1 files into ASCII files,
replacing non-ASCII characters by entity references. The entity names
chosen here for these characters conform to the SGML standard.

\begin{verbatim}
 
<!entity aacute  sdata '\'{a}' >
<!entity Aacute  sdata '\'{A}' >
<!entity acirc   sdata '\^{a}'  >
<!entity Acirc   sdata '\^{A}'  >
<!entity agrave  sdata '\`{a}' >
<!entity Agrave  sdata '\`{A}' >
<!entity aring   sdata '{\aa}'  >
<!entity atilde  sdata '\~{a}' >
<!entity Atilde  sdata '\~{A}' >
<!entity auml    sdata '\"{a}'   >
<!entity Auml    sdata '\"{A}'   >
<!entity aelig   sdata '{\ae}'  >
<!entity AElig   sdata '{\AE}'  >
<!entity ccedil  sdata '\c{c}' >
<!entity Ccedil  sdata '\c{C}' >
<!entity eacute  sdata '\'{e}' >
<!entity Eacute  sdata '\'{E}' >
<!entity ecirc   sdata '\^{e}'  >
<!entity egrave  sdata '\`{e}' >
<!entity Egrave  sdata '\`{E}' >
<!entity euml    sdata '\"{e}'   >
<!entity Euml    sdata '\"{E}'   >
<!entity iacute  sdata '\'{\i}' >
<!entity Iacute  sdata '\'{I}' >
<!entity icirc   sdata '\^{\i}'  >
<!entity Icirc   sdata '\^{I}'  >
<!entity igrave  sdata '\`{\i}' >
<!entity Igrave  sdata '\`{I}' >
<!entity iuml    sdata '\"{\i}'   >
<!entity Iuml    sdata '\"{I}'   >
<!entity ntilde  sdata '\~{n}' >
<!entity Ntilde  sdata '\~{N}' >
<!entity oacute  sdata '\'{o}' >
<!entity Oacute  sdata '\'{O}' >
<!entity ocirc   sdata '\^{o}'  >
<!entity Ocirc   sdata '\^{O}'  >
<!entity ograve  sdata '\`{o}' >
<!entity Ograve  sdata '\`{O}' >
<!entity oslash  sdata '{\o}' >
<!entity Oslash  sdata '{\O}' >
<!entity otilde  sdata '\^{o}' >
<!entity ouml    sdata '\"{o}'   >
<!entity Ouml    sdata '\"{O}'   >
<!entity szlig   sdata '{\ss}'  >
<!entity uacute  sdata '\'{u}' >
<!entity Uacute  sdata '\'{U}' >
<!entity ucirc   sdata '\^{u}'  >
<!entity ugrave  sdata '\`{u}' >
<!entity Ugrave  sdata '\`{U}' >
<!entity uuml    sdata '\"{u}'   >
<!entity Uuml    sdata '\"{U}'   >
<!entity yacute  sdata '\'{y}' >
<!entity Yacute  sdata '\'{Y}' >
<!entity yuml    sdata '\"{y}'   >
\end{verbatim}



The {\tt qwertz} document types were developed in a German research
center, so we have included entities for the German characters with
shorter names than the entity names used in the SGML standard.  Notice
that these are just synonyms for the standard entities, which are also
included.



\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!entity   Ae  '&Auml;' >
<!entity   ae  '&auml;' >
<!entity   Oe  '&Ouml;' >
<!entity   oe  '&ouml;' >
<!entity   Ue  '&Uuml;' >
<!entity   ue  '&uuml;' >
<!entity   sz  '&szlig;' >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






\subsection{Other Symbols}

Finally, there are entities for a few miscellaneous symbols,
such as {\S}, {\P}, {\copyright}, \mch{\neg}, \mch{\div}, \mch{\pm}, \mch{\times}, and
\mch{\mu}.  All of these entities name symbols in the Latin 1 character
set.  They may be used anywhere within a document. (In particular, the
mathematical symbols shown here need not be within one of the formula
elements described below, in section \ref{MATH}.)  The entity
names for these, and all the other character entities discussed above,
are listed in table \ref{GPC}.   {\em A document which does not
include mathematical formulas or graphics and which uses only the character
entities defined in this chapter can be displayed or printed using a
single Latin 1 font\/}.

\begin{verbatim}
<!entity   gt     sdata "{\gt}" >
<!entity   sect   sdata "{\S}">
<!entity   para   sdata "{\P}">
<!entity   copy   sdata "{\copyright}">
<!entity   iexcl  sdata "{!`}" >
<!entity   iquest sdata "{?`}" >
<!entity   cent   sdata "\hbox{\rm\rlap/c}" >
<!entity   pound  sdata "{\pounds}" >
<!entity   not    sdata "\mch{\neg}" >
<!entity   divide sdata "\mch{\div}" >
<!entity   plusmn sdata "\mch{\pm}" >
<!entity   times  sdata "\mch{\times}"  >
<!entity   mu     sdata "\mch{\mu}" >
\end{verbatim}





\begin{table}
\begin{center}
\begin{tabular}{ll|ll|ll|ll}
AElig &         {\AE} & Aacute &        \'{A} & Acirc   &       \^{A} & Ae &  \"{A}     \\ 
Agrave &        \`{A} & Atilde &        \~{A} & Auml &  \"{A} & Ccedil &        \c{C} \\ 
Eacute &        \'{E} & Egrave &        \`{E} & Euml &  \"{E} & Iacute &        \'{I} \\ 
Icirc &         \^{I} & Igrave &        \`{I} & Iuml &  \"{I} & Ntilde &        \~{N} \\ 
Oacute &        \'{O} & Ocirc &         \^{O} & Oe &  \"{O} & Ograve &  \`{O} \\ 
Oslash &        {\O} & Ouml &   \"{O} & Uacute &        \'{U} & Ue &  \"{U} \\ 
Ugrave &        \`{U} & Uuml &  \"{U} & Yacute &        \'{Y} & aacute &        \'{a} \\ 
acirc &         \^{a} & ae &  \"{a}     & aelig &       {\ae} & agrave &        \`{a} \\ 
amp &  \& & aring &     {\aa} & ast &  \mch{\ast} & atilde &    \~{a} \\ 
auml &  \"{a} & bsol &  \verb+\+ & ccedil &     \c{c} & cent &  \hbox{\rm\rlap/c} \\ 
circ &  \verb+^+ & colon &  : & comma &  , & commat &  @ \\ 
copy &  {\copyright} & divide &  \mch{\div} & dollar &  \$ & dquot &  {\tt "} \\ 
eacute &        \'{e} & ecirc &         \^{e} & egrave &        \`{e} & emsp &  \\ 
ensp &  & equals &  = & euml &  \"{e} & gt &  {\gt} \\ 
hellip &  {\ldots} & hyphen &  - & iacute &     \'{\i} & icirc &        \^{\i} \\ 
iexcl &  {!`} & igrave &        \`{\i} & iquest &  {?`} & iuml &        \"{\i} \\ 
lcub &  \{ & lowbar &  \_ & lpar &  ( & lsqb &  [ \\ 
lt &  {\lt} & mdash &  {---} & mu &  \mch{\mu} & nbsp &  \\ 
ndash &  {--} & not     &  \mch{\neg} & ntilde &        \~{n} & num &  \# \\ 
oacute &        \'{o} & ocirc &         \^{o} & oe &  \"{o} & ograve &  \`{o} \\ 
oslash &        {\o} & otilde &         \^{o} & ouml &  \"{o} & para &  {\P} \\ 
percnt &  \% & plus &  + & plusmn &  \mch{\pm} & pound &  {\pounds} \\ 
quot &  {\tt '} & rcub &  \} & rpar &  ) & rsqb &  ] \\ 
sect &  {\S} & semi &  ; & sz &  {\ss} & szlig &        {\ss} \\ 
thinsp &  & tilde &  \verb+~+ & times &  \mch{\times} & uacute &        \'{u} \\ 
ucirc &         \^{u} & ue &  \"{u} & ugrave &  \`{u} & uuml &  \"{u} \\ 
verbar &  {\verbar} & yacute &  \'{y} & yuml &  \"{y} & 
\end{tabular}
\end{center}
\caption{\label{GPC}General Purpose Characters}
\end{table}





\subsection{Sentences, Paragraphs, Emphasis and Quotations}

Sentences need not be marked up with tags.  There is no
{\tt sentence} element as such.  Rather, these are marked implicitly
using the usual conventions for beginning and ending sentences.

Paragraphs are delimited with the {\tt p} tag.  Both the starting tag
and ending tag are optional.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element p o o ( %inline | %sectpar )+ >
<!entity ptag '<p>' >
<!entity psplit '</p><p>' >

<!shortref pmap
        "&#RS;B" null
        "&#RS;B&#RE;" psplit
        "&#RS;&#RE;" psplit
        '"' qtag 
        "[" ftag
        "~" nbsp
        "_" lowbar
        "#" num
        "%" percnt
        "^" circ
        "{" lcub
        "}" rcub
        "|" verbar >

<!usemap pmap p>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



Sentences or phrases within paragraphs can be emphasized in a number
of ways.  The {\tt em} tag is used to choose the default form of
emphasis, which is usually {\em italic\/} type, but depends on the
style of the background text.  If the background text is formatted in
italics type, as it usually is in definitions, for example, than
emphasized text will be formatted using a plain, roman typeface.
However, various forms of emphasis can be explicitly chosen.  These
include: {\bf bold face} ({\tt bf}), {\it italics\/} ({\tt it}),
{\sf sans serif} ({\tt sf}), {\sl slanted} ({\tt sl}), and
{\tt typewriter} ({\tt tt}) styles.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element em - - (%inline)>
<!element bf - - (%inline)>
<!element it - - (%inline)>
<!element sf - - (%inline)>
<!element sl - - (%inline)>
<!element tt - - (%inline)>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



The {\tt tt} element simulates a ``typewriter''.  That is, with a
couple of exceptions, characters are printed exactly as they appear on
the display.  This is useful for including small segments of computer
code within paragraphs.  See the section on literate programming for
more information, \ref{LITPROG}.

Sentences within paragraphs can be quoted using the {\em short
quote\/}, ({\tt sq}) tag, as in {\tt {\lt}sq>The rain in Spain falls
mainly on the plain.{\lt}/>}, but this is usually not necessary.  In
most contexts where one will want to use quotations, there is a map
allowing the {\tt "} symbol to be used as a short reference for both
the starting and ending {\tt sq} tags.  So one can just type:
{\tt "The rain in Spain falls mainly on the plain."}

Quotations extending over a number of paragraphs are marked using the
{\em long quote\/} ({\tt lq}) element.  Long quotes are formatted in
{\LaTeX} by indenting the left and right margins.  For example, \cite[pp. xiii]{Lamport86}:

\begin{quotation}
The {\LaTeX} document preparation system is a special version of
Donald Knuth's {\TeX} program.  {\TeX} is a sophisticated program designed
to produce high-quality typesetting, especially for mathematical text.
{\ldots}

{\LaTeX} represents a balance between functionality and ease of use.
Since I implemented most of it myself, there was also a continual
compromise between what I wanted to do and what I could do in a
reasonable amount of time.  {\ldots} 


\end{quotation}



\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element sq - - (%inline)>

<!entity   ftag     '<f>'    -- formula begin -- >
<!entity   qendtag  '</sq>'>

<!shortref sqmap 
      "&#RS;B" null
      '"' qendtag 
      "[" ftag
      "~" nbsp
      "_" lowbar
      "#" num
      "%" percnt
      "^" circ
      "{" lcub
      "}" rcub
      "|" verbar >

<!usemap   sqmap    sq >

<!element lq - - (p*)>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






\subsection{Lists}

Three types of lists are supported, which differ according to the
type of label used to mark each item in the list.  Use {\tt itemize}
to create a list in which each item is marked with some symbol such as
a dash or bullet. The {\tt enum} tag is used to create an
enumeration, i.e. a list in which each item is labelled with a number
(or letter) indicating its rank or position in the list. Finally, use
{\tt descrip} to create a list in which each item is labelled by some
tag of your own choice. Lists of various types can nested.  For
example:

\begin{verbatim}
<itemize>
<item>
A level one item.
<item> Here's level two:
        <enum>
        <item> A level two item.
        <item> Here's level three:
                <enum>
                <item> A level three item.
                <item>Here's level four:
                      <descrip>
                      <tag/Red./  Is the color of my true love's hair.
                      <tag/Blue./  Is a property of some movies.
                      <tag/Yellow./  Characterizes some forms of journalism.
                      </descrip>
                <item>A last level three item
                </enum>
        <item>A last level two item
        </enum>
<item>A last level one item.
</itemize>
\end{verbatim}



This is formatted by {\LaTeX} as:

\begin{itemize}
\item A level one item.

\item Here's level two:
\begin{enumerate}
\item A level two item.

\item Here's level three:
\begin{enumerate}
\item A level three item.

\item Here's level four:
\begin{description}
\item[Red.] Is the color of my true love's hair.

\item[Blue.] Is a property of some movies.

\item[Yellow.] Characterizes some forms of journalism.

\end{description}



\item A last level three item

\end{enumerate}



\item A last level two item

\end{enumerate}



\item A last level one item.

\end{itemize}



\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element itemize - - (item+)>
<!element enum - - (item+)>
<!element descrip - - ((tag, p+)+) >
<!element item o o (p+) >
<!element tag - o (%inline)>
<!usemap global (itemize,enum,descrip)>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



For reasons having to do with our translation into {\LaTeX}, line feeds
within {\tt tag} elements are translated into spaces, using the
following short reference map:

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!entity space " ">
<!entity null "">
<!shortref bodymap
     "&#RS;B&#RE;" ptag
     "&#RS;&#RE;" ptag
      '"' qtag 
      "[" ftag
      "~" nbsp
      "_" lowbar
      "#" num
      "%" percnt
      "^" circ
      "{" lcub
      "}" rcub
      "|" verbar>

<!usemap bodymap tag>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






\subsection{Figures and Tables}

A {\tt figure} is a graphic combined with an optional caption.  Two
types of figures are currently supported.  The first, and easiest, is
to use the {\tt eps} tag to include an Encapsulated PostScript file
in the document.  Encapsulated PostScript files are centered
horizontally on the page.  The size of the graphic is its ``natural''
size; i.e. the size it would have if printed directly on a PostScript
printer.  You need only know the name of the file containing the
graphic.

Encapsulated PostScript graphics can be created using a variety of
different editors.  If you are using Unix with an X11-based graphical
user-interface, you may want to try {\tt idraw}, which stores its
documents directly as Encapsulated PostScript files. Other interesting
X11-based drawing program are {\tt xfig} and {\tt tgif}.

For example, to include the graphic contained in an Encapsulated
PostScript file named {\tt issues.ps}, you would type:

\begin{verbatim}
<figure>
        <eps file="issues">
        <caption>An <tt>idraw</> Drawing </>
</figure>
\end{verbatim}



Which would then appear as in figure \ref{ISSUES}.

\begin{figure}
\centerline{\epsffile{issues.ps}}
\caption{\label{ISSUES}An {\tt idraw} Drawing }
\end{figure}


Notice that the ``.ps'' extension is {\em not\/} to be included in the
file attribute of the {\tt eps} element, but that the actual file
must include the ``.ps'' extension.

The second possibility is to use the {\em placeholder\/} ({\tt ph})
tag to leave space in which to later paste the graphic, in the old,
reliable manner.  For example, to leave 10 cm space for
some graphic, type:

\begin{verbatim}
<figure>
        <ph vspace="10cm">
</figure>
\end{verbatim}



Be sure not to leave a space between the number and the unit of
measurement used, which may be {\tt cm}, {\tt mm} or {\tt in}.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element figure - - ((eps | ph ), caption?)>
<!element eps - o empty  >
<!attlist eps
        file cdata #required>
<!element ph - o empty >
<!attlist ph
        vspace cdata #required>

<!element caption - o (%inline)>

<!shortref oneline
     "&#RS;&#RE;" null
     "&#RS;B&#RE;" null
      '"' qtag 
      "[" ftag
      "~" nbsp
      "_" lowbar
      "#" num
      "%" percnt
      "^" circ
      "{" lcub
      "}" rcub
      "|" verbar>

<!usemap oneline caption>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



Finally, there is a {\tt tabular} element.  Using {\LaTeX}, tabulars
must be small enough to fit on a single page.  The current
{\tt tabular} element has been kept quite simple.  It certainly does
not (yet) offer all the flexibility of {\LaTeX}.  However, it may well
be that it is sufficient for most users.  More complex tables can,
depending on your choice of formatters, be created using {\LaTeX} or
Unix's {\tt tbl} program, with the {\tt x} element, or with any
program capable of generating Encapsulated PostScript, which can then
be included using an {\tt eps} element.

A {\tt tabular} consists of a number of rows, separated by the
{\tt rowsep} element, each of which consists of a number of columns
separated by the {\tt colsep} element.

The format of the tabular is controlled by the {\em column
alignment\/} ({\tt ca}) attribute.  For each column in the tabular
there is a letter in the {\tt ca} attribute: 1) {\tt c} for
centered; 2) {\tt l} for flush left; or 3) {\tt r} for flush right.
In addition, {\verbar} can be used to insert vertical lines running the
complete height of the table.  This will be made clear in the example
which is coming shortly.

First, however, let me describe the short reference map defined for
tabulars.  Rather than typing {\tt {\lt}colsep>} and
{\tt {\lt}rowsep>} explicitly, one can just type {\verbar} to separate
columns, and @ to separate rows.  Also, within tabulars, [can be used to start a mathematical formula, and {\tt "} starts short
quotes as usual.  (The other short references just hide any special
meaning the character may have to {\TeX}.)

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!entity % tabrow "(%inline, (colsep, %inline)*)" >
<!element tabular - - 
        (%tabrow, (rowsep, hline?, %tabrow)*, caption?) >

<!attlist tabular
        ca cdata #required>

<!element rowsep - o empty>
<!element colsep - o empty>
<!element hline  - o empty>

<!entity rowsep "<rowsep>">
<!entity colsep "<colsep>">

<!shortref tabmap
     "&#RE;" null
     "&#RS;&#RE;" null
     "&#RS;B&#RE;" null
     "&#RS;B" null
      "B&#RE;" null
      "BB"  space
      "@" rowsep
      "|" colsep 
      "[" ftag
      '"' qtag
      "_" thinsp
      "~" nbsp
      "#" num
      "%" percnt
      "^" circ
      "{" lcub
      "}" rcub >

<!usemap  tabmap tabular>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



The {\tt hline} element can be use to draw a horizontal line along
the length of the table, to separate rows.

A {\tt table} element consists of a {\tt tabular} followed by an
optional {\tt caption}.  Unlikes tabulars, A {\tt table} is a floating
``body'', like a figure.  It may be moved to another (near) location
within the formatted document.  A {\tt tabular}, however, appears at
the same place in the formatted document as in the SGML source file.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element table   - - (tabular, caption?) >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



Here is how table \ref{GPC}   was typed:

\begin{verbatim}
<table>
<tabular ca="ll|ll">
ae   |       &ae   | Ae   |   &Ae       @
oe   |       &oe   | Oe   |   &Oe       @
ue   |       &ue   | Ue   |   &Ue       @
sz   |       &sz   | amp  |   &amp      @
bsol |       &bsol | circ |   &circ     @
     .
     .
     .
Dagger |       &Dagger | sect  |  &sect     @
para   |       &para   | copy  |  &copy     @
mdash  |       &mdash  | tilde |  &tilde    
</tabular>
<caption><label id="GPC">
        General Purpose Characters
</caption>
</table>
\end{verbatim}








\subsection{\label{LITPROG}Literate Programming}

The original motivation behind the development of these document
types was to create an environment for literate programming in an
arbitrary programming language similar to Donald Knuth's WEB system
for literate programming in Pascal \cite{Knuth84}.  The basic
idea is to include the source code of a program inside of its
documentation, instead of the other way around: including comments
within the source code.

The features offered here to support literate programming, or merely
the documentation of existing programs, have been kept to a minimum.
Snippets of code can be mentioned within sentences using the {\tt tt}
tag.  These are formatted using a {\tt typewriter} font suitable for
program code, but the spacing and indentation of the code is not
retained.  Within {\tt tt} elements, the only characters which may not
be literally interpreted are \$, \verb+\+, \&, and {\tt {\lt}/}.
For the \$ and \verb+\+ symbols, always use the {\tt dollar} and
{\tt bsol} entities.  For the \& and {\lt} symbols, use the
{\tt amp} and {\tt lt} entities if the string in which they occur
could be mistaken for an entity reference, an element start tag or an
element end tag.

To include larger segments of code, retaining its line breaks,
tabulation and spacing, use the {\tt code} tag or the {\tt verb}
tag.  Within these tags just about all characters are interpreted
literally.  The exceptions are:

\begin{enumerate}
\item As SGML entities may be used within {\tt verb} and
{\tt code} elements, use the {\tt ero} entity to represent the \&symbol in strings which might otherwise be mistaken for entity
references.  (Notice that the {\tt amp} entity is not used to represent \&in this context.) 

\item As there must be some way of ending such elements,
use the {\tt etago} entity to represent  {\tt </} in strings
which might otherwise be interpreted as end tags.  (Do not use the
{\tt lt} entity for this purpose here.)  Start tags can be typed
literally in this context, without using entities.

\item Unfortunately {\TeX} peeks through a bit here
as well; The string {\tt \verb+\+end\{verbatim\}} may not occur within
{\tt code} or {\tt verb} elements.  Presumably this will not often
be a problem.  

\end{enumerate}



For example, to include the ``hello world'' C program in a document,
just type:

\begin{verbatim}
<code>
main ()
{
        /* This is the famous hello world program */

        printf("hello world\n");
}
</code>
\end{verbatim}



When formatted, spaces and line breaks are preserved:

\begin{verbatim}
main ()
{
        /* This is the famous hello world program */

        printf("hello world\n");
}
\end{verbatim}



Notice that no entities where required in this code.
With few exceptions, it should be possible to just wrap {\tt verb} or
{\tt code} tags around existing pieces of code without change.

The idea of literate programming is that the documentation
{\em is\/} the program, so there must be some way of extracting the
source code from the SGML document.  Just how to do this is described
in chapter \ref{UC}, below.

The user must have a means of indicating which pieces of code are
to be included in the source code, and in which order.  Our solution
to this problem is very simple: {\em Only {\tt code} elements are to
be extracted, and they are extracted in the same order as they appear
in the document.\/} That is, {\tt verb} elements are {\em not\/}
extracted, and may be used, e.g., for examples or draft versions of
the code included for explanatory or tutorial purposes. 

{\tt code} and {\tt verb} elements may be formatted differently.
Using our translation into {\LaTeX}, for example, {\tt code} elements
are distinguished by being bracketed by lines the width of the page.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element code - - rcdata>
<!element verb - - rcdata>

<!shortref ttmap
        "&#RS;B" null
        '#'     num
        '%'     percnt
        '~'     tilde
        '_'     lowbar
        '^'     circ
        '{'     lcub
        '}'     rcub
        '|'     verbar >

<!usemap ttmap  tt>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






\subsection{\label{MATH}Mathematical Formulas}

The {\tt qwertz} document types include elements for describing
mathematical formulas completely within SGML, similar to the system
described in \cite{daphne89}.  To start, there are a fairly large
number of entities for mathematical symbols. (The set of entities
chosen are for the symbols available in both {\TeX} and in the
PostScript Symbol font.)  Although this may be a minor irritation for
seasoned {\TeX} users, we have decided to follow the naming conventions
for mathematical symbols adopted in the SGML Standard  \cite{Smith88}. The complete set of mathematical symbols currently
defined, including the Greek alphabet are listed in 
tables \ref{MATHSYM}  and \ref{GREEK}, in alphabetical
order.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!entity % math system -- math symbols -- >
%math;
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



\begin{table}
\begin{center}
\begin{tabular}{ll|ll|ll|ll}
Prime &  $\prime\prime$ & aleph &  $\aleph$ & and &  $\wedge$ & ang     &  $\angle$     \\ 
ap &  $\approx$ & arr &  $\downarrow$ & bottom &  $\bot$ & bull &  $\bullet$ \\ 
cap &  $\cap$ & cir &  $\circ$ & clubs  &  $\clubsuit$  & congr &  $\cong$ \\ 
cup &  $\cup$ & diams   &  $\diamondsuit$       & divide        &  $\mch{\div}$ & dot &  $\cdot$ \\ 
empty &  $\emptyset$ & equiv &  $\equiv$ & exist &  $\exists$ & forall &  $\forall$ \\ 
ge &  $\geq$ & hArr &  $\Leftrightarrow$ & harr &  $\leftrightarrow$ & hearts   &  $\heartsuit$ \\ 
image &  $\Im$ & infin &  $\infty$ & isin &  $\in$ & lArr &  $\Leftarrow$ \\ 
lang &  $\langle$ & larr &  $\leftarrow$ & le &  $\leq$ & mid &  $\mid$ \\ 
minus &  $-$ & nabla    &  $\nabla$     & ne &  $\not=$ & nequiv &  $\not\equiv$ \\ 
not &  $\mch{\neg}$     & notin &  $\not\in$ & nsub &  $\not\subset$ & nsube &  $\not\subseteq$ \\ 
nsup &  $\not\supset$ & nsupe &  $\not\supseteq$ & nvDash &  $\not\models$ & nvdash &  $\not\vdash$ \\ 
oplus &  $\oplus$ & or &  $\vee$ & otimes &  $\otimes$ & part   &  $\partial$   \\ 
plusmn &  $\mch{\pm}$ & prime &  $\prime$ & prop &  $\propto$ & rArr &  $\Rightarrow$ \\ 
rang &  $\rangle$ & rarr &  $\rightarrow$ & real &  $\Re$ & setmn &  $\setminus$ \\ 
spades &  $\spadesuit$  & square &  $\Box$ & sub &  $\subset$ & sube &  $\subseteq$ \\ 
sup &  $\supset$ & supe &  $\supseteq$ & times &  $\mch{\times}$ & uArr &  $\Uparrow$ \\ 
uarr &  $\uparrow$ & vDash &  $\models$ & vdash &  $\vdash$ \\ 
\end{tabular}
\end{center}
\caption{\label{MATHSYM}Math Symbols}
\end{table}


\begin{table}
\begin{center}
\begin{tabular}{ll|ll|ll}
alpha &  $\alpha$ & beta &  $\beta$ & gamma &  $\gamma$ \\ 
Gamma &  $\Gamma$ & delta &  $\delta$ & Delta &  $\Delta $ \\ 
epsi &  $\varepsilon$ & zeta &  $\zeta$ & eta &  $\eta$ \\ 
thetas &  $\theta$ & Theta &  $\Theta$ & iota &  $\iota$ \\ 
kappa &  $\kappa$ & lambda &  $\lambda$ & mu &  $\mch{\mu}$ \\ 
nu &  $\nu$ & xi &  $\xi$ & Xi &  $\Xi$ \\ 
pi &  $\pi$ & Pi &  $\Pi$ & rho &  $\rho$ \\ 
sigma &  $\sigma$ & sigmav &  $\varsigma$ & Sigma &  $\Sigma$ \\ 
tau &  $\tau$ & upsi &  $\upsilon$ & Upsi &  $\Upsilon$ \\ 
phis &  $\phi$ & Phi &  $\Phi$ & chi &  $\chi$ \\ 
psi &  $\psi$ & Psi &  $\Psi$ & omega &  $\omega$ \\ 
Omega &  $\Omega$
\end{tabular}
\end{center}
\caption{\label{GREEK}Greek Letters}
\end{table}


{\TeX} symbols not in table 2 may nonetheless be generated, by
defining an entity using the {\tt mc} element.  For example, to print
the $\leadsto$ symbol, you could first define an entity,
perhaps using the name adopted for this symbol in the SGML standard:

\begin{verbatim}
<!entity rarrw "<mc/<x/\leadsto//">
\end{verbatim}



Of course, this approach is {\TeX} dependent.  But this dependency is
clearly noted at the beginning of the document, and it would be an
easy matter to replace the {\TeX} command for such entities with the
appropriate commands for some other formatter.

The {\tt mc} tag used in this entity definition is for {\em math
characters\/}.  The entity could have been defined using only the {\tt x}
tag described in section \ref{MISC}, but it is ``safer'' to use the
{\tt mc} tag when defining entities which are only to be used within
formulas, as the SGML parser will complain if they are used elsewhere.
If {\tt x} were used instead, such errors would first be caught by
{\TeX}.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element  mc  - - cdata >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



There are a number of parameters for formulas.  These will most
likely be of little interest to most users, but are stated here for
the sake of completeness.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!entity % sppos     "tu" >
<!entity % fcs       "(%sppos;)|phr" >
<!entity % fcstxt    "#pcdata|mc|%fcs;" >
<!entity % fscs      "rf|v|fi" >
<!entity % limits    "pr|in|sum" >
<!entity % fbu       "fr|lim|ar|root" >
<!entity % fph       "unl|ovl|sup|inf" >
<!entity % fbutxt    "(%fbu;) | (%limits;) | 
                      (%fcstxt;)|(%fscs;)|(%fph;)" >
<!entity % fphtxt    "p|#pcdata" >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



There are three elements for representing formulas: {\tt f}, for
ordinary short formulas appearing ``in-line''; {\tt dm} for
{\em displayed formulas\/} to be centered on a line (or lines) by
themselves; and {\tt eq} for displayed formulas which are to be
numbered sequentially throughout the document (i.e. so-called
``equations'').

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element  f        - - ((%fbutxt;)*) -(footnote) >

<!entity   fendtag  '</f>'   -- formula end -- >

<!shortref fmap 
      "&#RS;B" null
      "_" thinsp
      "~" nbsp
      "]" fendtag
      "#" num
      "%" percnt
      "^" circ
      "{" lcub
      "}" rcub
      "|" verbar>

<!usemap   fmap     f >

<!element  dm       - - ((%fbutxt;)*) -(footnote)>
<!element  eq       - - ((%fbutxt;)*) -(footnote)>

<!shortref dmmap
     "&#RE;" space
      "_" thinsp
      "~" nbsp
      "]" fendtag
      "#" num
      "%" percnt
      "^" circ
      "{" lcub
      "}" rcub
      "|" verbar>

<!usemap dmmap (dm,eq)>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



Usually it is not necessary to type the starting and ending tags of
the {\tt f} element explicitly: [ and ] are short
reference delimiters, allowing one to simply type, for example,
{\tt [\&alpha \&rarr \&beta]}, instead of
{\tt {\lt}f>\&alpha \&rarr \&beta{\lt}/f>} to represent
$\alpha \rightarrow \beta$.\footnote{{\TeX} users will appreciate that this
notation is no more verbous than {\TeX}.}

The only characters of interest in {\tt fmap} are \_ \verb+~+and ].  \_ is a short reference for {\tt thinsp}, which adds a
little extra horiztonal space.  \verb+~+ means {\tt nbsp}, which in
turn denotes a non-breaking space.  {\TeX} will not start a new line at
a {\tt nbsp}.  Finally, ] is used to end the formula.  The other
characters in this map just protect us from any special meaning {\TeX}gives them.

The {\tt dmmap} is much the same as the {\tt fmap}.  There are
just two differences:  1) ] is not a short reference for the {\tt f}
closing tag (and instead has its literal meaning), and 2) carriage
returns and new lines are replaced by spaces, for reasons having to do
with the way {\TeX} formats formulas.   Use the {\tt tu} element,
defined a bit later, to force line breaks in formulas.

Of course, formulas consist of more than just a string of math
symbols.  There are elements for representing fractions ({\tt fr}),
products ({\tt pr}), integrals ({\tt in}), sums ({\tt sum}), roots
({\tt root}) and arrays ({\tt ar}).  Each of these will be described
next.

A fraction consists of a numerator ({\tt nu}) and a denominator
({\tt de}).   For example, $12/37$ can be written as:

\begin{verbatim}
[<fr><nu>12<de>37</fr>]
\end{verbatim}



Of course, this is rather lengthy.  For simple fractions such as
this, you may prefer to just type {\tt [12/37]}, which is
formatted by {\LaTeX} in the same way.\footnote{On the other hand, if
you are a SGML purist, you may prefer not to do this, as it makes
assumptions about the formatting system being used.}

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element  fr       - - (nu,de) >
<!element  nu       o o ((%fbutxt;)*) >
<!element  de       o o ((%fbutxt;)*) >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



Products, integrals and sums all have similiar structure,
consisting of a {\em lower limit\/} ({\tt ll}), an {\em upper limit\/}
({\tt ul}) and an optional {\em operand\/} ({\tt opd}).

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element  ll       o o ((%fbutxt;)*) >
<!element  ul       o o ((%fbutxt;)*) >
<!element  opd      - o ((%fbutxt;)*) >
<!element  pr       - - (ll,ul,opd?) >
<!element  in       - - (ll,ul,opd?) >
<!element  sum      - - (ll,ul,opd?) >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



So, for example, 

\[         \sum_{i=1}^{n}x_{i} =         \int_{0}^{1}f \]

was typed as:
\begin{verbatim}
<dm>
        <sum><ll>i=1<ul>n<opd>x<inf>i</></sum> =
        <in><ll>0<ul>1<opd>f</in>
</dm>
\end{verbatim}



This example also shows how to represent subscripts, using the
{\tt inf} tag.  There is also a {\tt sup} tag for superscripts.



For operators with upper and lower limits other than products, sums
or integrals, use the {\tt lim} element.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element  lim      - - (op,ll,ul,opd?) >
<!element  op       o o (%fcstxt;|rf|%fph;) -(tu) >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



For example,
\[         \bigcup_{i=0}^{n}\{\alpha_{i} \rightarrow \beta\} \]

was typed as
\begin{verbatim}
<!entity bigcup "<mc>\bigcup</>">  
...
<dm>
        <lim>&bigcup<ll>i=0<ul>n</>
             <opd>{&alpha<inf>i</> &rarr &beta}</>
        </lim>
</dm>
\end{verbatim}


Notice that it isn't necessary to type the {\tt op} tag here.

Roots can be represented using the, what else, {\tt root} element.
By default, {\tt root} produces square roots.  The {\tt n} attribute
of {\tt root} can be used for other roots.  For example, type
{\tt [{\lt}root n=3/x+y/]} to get $\sqrt[3]{x+y}$.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element  root     - - ((%fbutxt;)*) >
<!attlist  root
        n cdata "">
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



Arrays, or matrices, consist of a sequence of rows, each of which
contains a sequence of columns.   Every row in the array must contain
the same number of columns.   Rows are {\em separated\/} by the
{\tt arr} tag; columns by the {\tt arc} tag.  The array itself is
delimited by the {\tt ar} tag.   

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element col o o ((%fbutxt;)*) >
<!element row o o (col, (arc, col)*) >

<!element  ar       - - (row, (arr, row)*) >
<!attlist  ar
    ca     cdata    #required >
<!element  arr      - o empty >
<!element  arc      - o empty >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



This is a place where an SGML short reference map has proven
useful:

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!entity   arr "<arr>" >
<!entity   arc "<arc>" >

<!shortref arrmap
     "&#RE;" space
      "@" arr
      "|" arc 
      "_" thinsp
      "~" nbsp
      "#" num
      "%" percnt
      "^" circ
      "{" lcub
      "}" rcub >

<!usemap   arrmap   ar >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



Columns can be separated using the {\verbar} character; rows
with the @ character.   

For example, this matrix
\[ 
\begin{array}{clcr}
a+b+c    & uv       & x-y      & 27       \\ 
a+b      & u+v      & z        & 134      \\ 
a        & 3u+vw    & xyz      & 2,978   
\end{array}
 \]

was typed as:
\begin{verbatim}
<ar ca=clcr>
a+b+c  |  uv     |  x-y  |  27     @
a+b    |  u+v    |  z    |  134    @
a      |  3u+vw  |  xyz  |  2,978   
</ar>
\end{verbatim}



The {\em column alignment\/} of an array must be specified using the
{\tt ca} attribute, as shown in the example.  For each column in the
array, there is a letter in the {\tt ca} attribute.  There are three
alternatives:  1) {\tt c} for centered; 2) {\tt l} for flush left;
and 3) {\tt r} for flush right. 

There remain a few miscellaneous math elements to describe.
{\tt sup} and {\tt inf}, for superscripts and subscripts, were
mentioned above.  {\tt unl} and {\tt ovl} can be used to
{\em underline\/} or {\em overline\/} formulas.  {\tt rf} is used for
identifiers, such as function names (e.g. {\tt cos} or {\tt sin})
within formulas.  Similarly, {\tt phr} is used to delimit phrases of
ordinary text within formulas.  (Both of these are necessary, as
strings of characters within formulas denote sequences of variables,
not words.)  The {\tt v} tag can be used to denote a {\em vector\/},
as in $\vec{x}$.  Calligraphic characters, such as ${\cal L}$, can be
denoted using the {\tt fi} tag.  Finally, line breaks can be inserted
into formulas using the {\tt tu} element.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element  sup      - - ((%fbutxt;)*) -(tu) >
<!element  inf      - - ((%fbutxt;)*) -(tu) >
<!element  unl - - ((%fbutxt;)*) >
<!element  ovl - - ((%fbutxt;)*) >
<!element  rf  - o (#pcdata) >
<!element  phr - o ((%fphtxt;)*) >
<!element  v   - o ((%fcstxt;)*) 
        -(tu|%limits;|%fbu;|%fph;) >
<!element  fi  - o (#pcdata) >
<!element  tu  - o empty >

<!usemap global (rf,phr)>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






\subsection{Definitions, Lemmas and Theorems}

There are a number of elements useful for representing
{\em definitions\/} ({\tt def}), {\em propositions\/} ({\tt prop}),
{\em lemmas\/} ({\tt lemma}), {\em corollaries\/} ({\tt coroll}),
{\em proofs\/} ({\tt proof}), and {\em theorems\/} ({\tt theorem}).

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element def - - (thtag?, p+) >
<!element prop - - (thtag?, p+) >
<!element lemma - - (thtag?, p+) >
<!element coroll - - (thtag?, p+) >
<!element proof - - (p+) >
<!element theorem - - (thtag?, p+) >
<!element thtag - - (%inline)>

<!usemap global (def,prop,lemma,coroll,proof,theorem)>
<!usemap bodymap thtag>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



With the exception of {\tt proof}, these all have the same
structure: an optional {\tt thtag} followed by some paragraph level
elements.  Here is an example:

\begin{theorem}[Alexander's Theorem]
Let ${\cal G}$ be a set of nontrivially achievable
subgoals and {\lt} an order on ${\cal G}$.  {\lt} is
abstractly indicative if and only if it is a
linearization of ${\lt} _{ {\cal G} }^{\mch{\ast} }$.



\end{theorem}



This was typed as:

\begin{verbatim}
<theorem><thtag>Alexander's Theorem</>

 Let [<fi/G/] be a set of nontrivially achievable
subgoals and &lt an order on [<fi/G/].  &lt
is abstractly indicative if and only if it is a
linearization of 
[<lim>&lt <ll> <fi/G/ <ul> &ast </lim>].

</theorem>
\end{verbatim}






\subsection{The {\tt global} Short Reference Map}

The {\tt global} short reference map, which is the default map in
effect within {\tt qwertz} documents, allows the {\tt "} symbol to be
used to start a {\em short quote\/} ({\tt sq}) and [ to start a
{\em formula\/} ({\tt f}).  Also, \verb+~+ is used for non-breaking
spaces.  The rest of the short references just serve to hide any
special meaning {\TeX} gives these characters, allowing them to be
directly typed without having to use entity references.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!entity   qtag     '<sq>' >

<!shortref global
      "&#RS;B" null  -- delete leading blanks --
      '"' qtag 
      "[" ftag
      "~" nbsp
      "_" lowbar
      "#" num
      "%" percnt
      "^" circ
      "{" lcub
      "}" rcub
      "|" verbar>

<!usemap global qwertz>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}








\section{Cross References}

Places within a document can be marked using the {\tt label}
element.  Labels have an {\tt id} attribute for naming the label.
The SGML parser will check that these identifiers are unique within
the document, and that they are referenced.  That is, the parser will
complain if there is no reference to a label.  For this reason, labels
should probably be created on demand, rather than in anticipation of
the need for a reference to the element.

There are two kinds of references: {\tt ref} for
references to the number of some element, such as a section, figure or
theorem, and {\tt pageref}, for references to the number of the page
on which the text around the label occurs when the document is
printed.  Both types of references have an {\tt id} attribute for
stating the identifier of the label being referenced.  The number of
the element or page will be printed at the place of the {\tt ref} or
{\tt pageref}.  

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element label - o empty>
<!attlist label id id #required>

<!element ref - o empty>
<!attlist ref   
        id idref #required>

<!element pageref - o empty>
<!attlist pageref
        id idref #required>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



For example, a reference to the section on miscellaneous elements
of this manual, section \ref{MISC}, would be typed as:

\begin{verbatim}
... section <ref id=misc>, would be ...
\end{verbatim}



The label itself was typed as:

\begin{verbatim}
<sect><heading><label id="misc">
        Miscellaneous Elements</>
\end{verbatim}






\section{\label{MISC}Miscellaneous Elements}

There are just a couple general purpose elements remaining to be
discussed, which don't seem to have found a suitable home yet
elsewhere in this manual.

Editorial comments and reminders to oneself can be marked with the
{\tt comment} tag.  These comments will be printed using a different
type style than the body of the text.  In the {\tt qwertz} mapping
into {\TeX}, they are printed using the {\sl slanted type style}. 

If you do not want the comment to be printed, use the standard
SGML notation for comments instead: {\tt {\lt}!--  {\ldots} --{\gt}}.

Finally, there is an ``escape'' element, allowing you to include raw
formatting code at any place in your document, the {\tt x} element.  This
code will be passed on to the formatter, such as {\TeX}, inline, at the point it appears in
your document.  Of course, this ``feature'' should be used judiciously, as it limits the formatter
independence of the document.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element comment - - (%inline)>
<!element x - - ((#pcdata | mc)*) >
<!usemap   #empty   x >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



Notice that math character ({\tt mc}) elements may appear within
{\tt x} elements.  This allows you to use SGML entity references for
math characters, to help avoid having to rememember both the SGML and
the formatter's names for these symbols.  Other entities may also be used, so
long as they expand to character data.




\section{Articles, Reports and Books}

Articles, reports and books are structurally very similar.  They
may be formatted differently, of course, but this is of little
importance during the writing phase of primary interest to authors.
Seen abstractly, each type of document consists of a {\em title
page\/}, for such information as the title of the document, the names
of the authors and so on, followed perhaps by an {\em abstract\/}, and
then by a sequence of {\em chapters\/} or {\em sections\/}.  There may
be {\em citations\/}, which are references to documents listed at the
end, in a {\em bibliography\/}.  Perhaps there are one or more
{\em appendices\/}.  Finally, these documents may also contain
{\em footnotes\/}.   

Let us first precisely describe the overall structure of these document
types, before moving on to describe their various components.   The
article element is defined as:

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element article - -
        (titlepag, header?, abstract?, 
         toc?, lof?, lot?, p*, sect*, 
         (appendix, sect+)?, biblio?) +(footnote)>

<!attlist article
        opts cdata "null">
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



The {\em options\/} attribute ({\tt opts}) of {\tt article}
provides a place to state {\em formatting\/} options, which are passed
on to {\LaTeX}.    The particular options available depends on the
installation of {\LaTeX} being used, but the following should
always be available:

\begin{description}
\item[{\tt 11pt, 12pt.}] Set the ``normal'' font size to eleven, or twelve, point, instead of
the default 10 point size.



\item[{\tt twoside.}] Formats the document for printing on both sides of a page.



\item[{\tt twocolumn.}] Formats the document with two columns per page, as is common in
the proceedings of scientific conferences, for example.



\item[{\tt titlepage.}] Causes the title page  and abstract to be printed on a
separate page.



\end{description}



Other options which may be supported include:

\begin{description}
\item[{\tt dina4.}] Formats the document for printing on {\bf DIN A4} size paper.  (As
this is the size paper used at our installation, this option is
included automatically during the translation.)



\item[{\tt german.}] Causes the {\TeX} hyphenation algorithm to ``think German'', and
sections, bibliographies and such to be labelled using the
appropriate German terms.



\item[{\tt times, bookman, palatino {\ldots}}] Causes the ``main'' font to be the selected PostScript font, instead
of the standard {\TeX} font, Computer Modern, and maps all other type faces
to some suitable PostScript font or type style.  



\end{description}



For example, the starting tag for some article might be:

\begin{verbatim}
<article opts="bookman,11pt">
\end{verbatim}



Reports are just like articles, except that they consist of a
sequence of chapters ({\tt chapt}), instead of sections
({\tt sect}):

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element report - - 
        (titlepag, header?, abstract?, toc?, lof?, lot?, p*,
         chapt*, (appendix, chapt+)?, biblio?) +(footnote)>

<!attlist report
        opts cdata "null">
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



Books are similar to reports, except that they may not include an
abstract:

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element book  - - 
        (titlepag, header?, toc?, lof?, lot?, p*, chapt*, 
         (appendix, chapt+)?, biblio?) +(footnote) >

<!attlist book
        opts cdata "null">
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



The options attribute ({\tt opt}) for {\tt report} and
{\tt book} elements is the same as that for articles, just described,
except the {\tt titlepage} option, which is applicable only for
articles.



The rest of this chapter describes the common elements of articles,
reports and books, starting with title pages.




\subsection{Title Pages}

A title page ({\tt titlepag}) consists of a title and
a number of authors ({\tt author}).  The title may refer to a
footnote and may also include a {\tt subtitle}.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element titlepag o o (title, author)>
<!element title - o (%inline, subtitle?) +(newline)>
<!element subtitle - o (%inline)>
<!usemap oneline titlepag>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



The {\tt author} element includes the {\tt name} and, optionally,
institution ({\tt inst}) of the author.  If there are multiple
authors, these are separated with the {\tt and} tag.   Also,
acknowledgements can be expressed using the {\tt thanks} element.
These are formatted by {\LaTeX} as footnotes on the title page.The {\tt author} element includes the {\tt name} and, optionally,
institution ({\tt inst}) of the author.  If there are multiple
authors, these are separated with the {\tt and} tag.   Also,
acknowledgements can be expressed using the {\tt thanks} element.
These are formatted by {\LaTeX} as footnotes on the title page.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element author - o (name, thanks?, inst?, 
                        (and, name, thanks?, inst?)*)>
<!element name o o (%inline) +(newline)>
<!element and - o empty>
<!element thanks - o (%inline)>
<!element inst - o (%inline) +(newline)>
<!usemap global thanks>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



Within the {\tt titlepag}, the {\tt title}, {\tt subtitle},
{\tt author} and {\tt inst} elements can be broken into multiple lines
using the {\tt newline} element or, if you prefer, the {\tt nl}
entity.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
 
<!element newline - o empty >
<!entity nl "<newline>"> 
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



The title page of this manual was typed as:

\begin{verbatim}
<title>The <tt/qwertz/ SGML Document Types
<subtitle>(Version 1.1 Reference Manual)
<author>Tom Gordon
<inst> Institute for Applied Information Technology (F3) &nl&nl
        German National Research Center  &nl
           for Computer Science (GMD)
\end{verbatim}



Notice the {\tt titlepag} tags are optional. The simplest title
page would include a title and author:

\begin{verbatim}
<title> A Very Short Title Page
<author> Snoopy
\end{verbatim}






\subsection{Abstracts}

Articles and reports, but not books, may have an abstract, which
consists of one or more paragraphs, including the various kinds of
lists, mathematical formulas and elements for literate programming:

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element abstract - - (p+)>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






\subsection{Table of Contents}

There are three elements for stating whether or not a table of
contents, list of figures or list of tables should be included in the
document.  These tables and lists are generated by {\LaTeX}.  Therefore
the contents of these elements is empty.  They are only used to
specify that the list or table should be included.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element toc - o empty>
<!element lof - o empty>
<!element lot - o empty>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






\subsection{Headers}

A {\tt header} element specifies what should be printed at the top
of each page.  It consists of a left heading ({\tt lhead}) and a
right heading ({\tt rhead}).  Both elements are required, if a heading is
used at all, but either may be left empty, so that the effect of
having only a left or right heading can be achieved easily enough.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element header - - (lhead, rhead) >
<!element lhead - o (%inline)>
<!element rhead - o (%inline)>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



As we will see, an initial header can be given after the title
page.  Afterwards, a new header can be given for each new chapter or
section.  The header printed on a page is the one which is in effect
at the end of the current page.  So that the header will be that of
the last section starting on the page.




\subsection{Sectioning}

The naming scheme we have adopted for sections is a bit different
than that of {\LaTeX}, because the names of SGML identifiers may be
at most only eight characters long.  But we think the scheme we have
chosen has its advantages.   In books and reports, the top-level
sectional unit is the {\em chapter\/} ({\tt chapt}).  In articles, it
is the {\em section\/} ({\tt sect}).  The lower sectional units are
{\tt sect1}, {\tt sect2}, {\tt sect3}, and {\tt sect4}, in that
order. 

Each section (or chapter) consists of a {\tt heading}, followed by
an optional {\tt header}, a number of paragraphs (including such things as
graphics), and then sections of the next lower level. 

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!entity % sect "heading, header?, p* " >
<!element heading o o (%inline)>
<!element chapt - o (%sect, sect*) +(footnote)> 
<!element sect  - o (%sect, sect1*) +(footnote)>
<!element sect1 - o (%sect, sect2*)>
<!element sect2 - o (%sect, sect3*)>
<!element sect3 - o (%sect, sect4*)>
<!element sect4 - o (%sect)>
<!usemap bodymap (chapt,sect,sect1,sect2,sect3,sect4)>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



Don't confuse the headers with headings.  The {\tt heading} is
just the text printed at the point where the section begins, naming
the section.  The {\tt header} changes the text printed at the top of
each page.

If there are cross references to the section, put the
{\tt label} in the heading.  For example, you could type:

\begin{verbatim}
<sect><heading><label id=mysect>My First Section</>
\end{verbatim}



If a label isn't required, you can leave the {\tt heading} tag
implicit:
\begin{verbatim}
<sect>My First Section
\end{verbatim}



The {\tt appendix} element marks the begin of a sequence of
appendices.  These are chapters or sections, depending on whether the
document is an article, report or book, and differ from ordinary
chapters or sections only in the way the are numbered, and of course
their placement at the end of the document.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element appendix - o empty >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






\subsection{Footnotes}

The tag for footnotes is, simply enough,
{\tt footnote}.\footnote{To be sure the marker for the footnote is
formatted propertly, be sure not to leave a space between the
character after which the footnote marker is to appear and the
beginning of the footnote element itself.}

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element footnote - - (%inline)>
<!usemap global footnote>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



Footnotes can appear anywhere within a section (or chapter).  The
{\tt usemap} declaration is required to cancel the {\tt lines} map
used in title pages.




\subsection{Citation}

Literature references can be made using the {\tt cite} and
{\tt ncite} elements.  The only difference between them is that the
{\tt ncite} allows a short {\em note\/} to be included in the
reference, for such things as page numbers. 

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element cite - o empty>
<!attlist cite 
        id cdata #required>

<!element ncite - o empty>
<!attlist ncite 
        id cdata #required
        note cdata #required>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



For example, one might type 
\begin{verbatim}
        <ncite id="Bryan88" note="pg.68">
\end{verbatim}

 
to refer to page 88 of Martin Bryan's
book on SGML.  This would appear, using {\LaTeX}, as \cite[pg. 68]{Bryan88} in the printed document.

The {\tt id} attribute of a {\tt cite} or {\tt ncite} is a
reference to an identifier of a Bib{\TeX} bibliography file.  There is a
{\tt qwertz} SGML document type for creating such bibliographies,
described below.

The bibliography itself, or list of references, is generated by
including a {\tt biblio} element near the end of the document, before
the appendix.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element biblio - o empty>
<!attlist biblio
        style cdata "qwertz"
        files cdata "">
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



The {\tt files} attribute of {\tt biblio} is a list of the names
of the bibliographies used, separated by commas.  The names should not
include any file suffixes, such as ``.bib'' or ``.sgml''.   For example,
to cite publications on artificial intelligence and cognitive
science, where the bibliograhies are maintained in two files,
{\tt ai.sgml} and {\tt cogsci.sgml}, you would type:

\begin{verbatim}
<biblio files="ai,cogsci">
\end{verbatim}



The {\tt style} attribute determines how the bibliography is
formatted.  Five styles are supported:

\begin{description}
\item[{\tt plain}] Entries are sorted alphabetically and labeled with numbers.



\item[{\tt unsrt}] The same as {\tt plain} except the entries are ordered as they
appear in the document, rather than alphabetically.



\item[{\tt alpha}] The same as {\tt plain}, except that labels are made from the author's
name and the year of publication.



\item[{\tt abbrv}] The same as {\tt plain} except that first names, month names, and
journal names are abbreviated.



\item[{\tt qwertz}] The same as {\tt plain} except that all words of the entry are
capitalized exactly as they appear in the source file of the
bibliography.  The {\tt plain} style applies capitalization rules
which are inappropriate, e.g., for German titles.



\end{description}






\section{Slides}

The {\tt slides} element is for making a series of slides or, more
commonly, overhead transparencies.  Although you may often prefer to
use some other program for preparing presentations, this approach has
its advantages when you want to include parts of an existing article
or book on your transparencies. You can just ``cut and paste'' the SGML
source from an article onto a slide.  You may also prefer this
approach if your presentation includes mathematical formulas, to be
able to take advantage of {\TeX}'s excellent mathematics typesetting.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element slides - - (slide*) >

<!attlist slides
        opts cdata "null">
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



Each slide consists of an optional title, followed by one or more
{\tt slpar} elements:

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element slide - o (title?, p+) >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



Notice that not every element available in an article or book is also
available here.  In particular, there are no sectioning elements,
cross references, footnotes or a bibliography.\footnote{Our
translation into {\TeX} does not use Sli{\TeX}, so as to allow slides to
include tables and figures.  }

The {\tt title} element will be centered on the line.  You can break
up the title into multiple lines with {\tt newline} elements.  The
various type style elements, such as {\tt em} and {\tt bf}, can also
be used here; indeed anywhere on a slide.  




\section{Letters and Electronic Messages}

The {\tt letter} element is for making letters and e-mail
messages.  Just how a letter is formatted may depend on whether it is
a business or personal letter.  If it is a business letter, it may be
printed to appear as if the company's letterhead stationery had been
used.

The structure of a letter can be quite complex, but most the
elements to be described here are optional.  Using an example from
\cite{Lamport86}, a simple letter would be typed like this:

\begin{verbatim}
<letter>
<from> 
        R. (Ma) Dillo 
        <address> 1234 Ave.~of the Armadillos &nl
                  Gnu York, G.Y. 56789
<to>    
        Dr.~G. Nathaniel Picking
        <address> Acme Exterminators &nl
                  33 Swat Street &nl
                  Hometown, Illinois 62301
        
<cc> Jimmy Carter &nl
     Richard M. Nixon
        
<opening> Dear Nat,
                
 I'm afraid that the armadillo problem is still 
with us.  I did everything ... 
                
 ... and I hope we can get rid of the nasty beasts 
this time.
                
<closing> Best regards,
                
</letter>
\end{verbatim}



The {\tt from} and {\tt to} elements are for the sender's and
receiver's names and addresses, respectively.  The address may be
either a street address, using {\tt address}, or an electronic mail
address, using {\tt email}, or both.  You may also include a telephone
number, using the {\tt phone} element. (If you are using your company's
letterhead stationery, it may be that you should type only your
extension, rather than your complete telephone number.) Finally, a
telefax number can be provided, using the {\tt fax} element.

Notice that in the {\tt closing} you must type a comma yourself,
if you want one.  Also, do not type your name again after the closing;
the {\tt name} of the sender will be printed after the closing as
expected.

There are several optional elements which may be of interest:

\begin{description}
\item[{\tt subject}] For the purpose or, well, subject of the letter.   If you would
like this subject line to appear as ``re: {\ldots}'', for example, you
must type the ``re: '' yourself, as part of the subject.   



\item[{\tt sref, rref, rdate}] These are tags for the {\em sender's reference\/}, {\em receiver's
reference\/} and {\em receiver's date\/} where you can include whatever
code is used by your, or the recipient's, company or institution to
uniquely identify letters.  For example, if this letter is a response
to some other letter, you may use the {\tt rref} and {\tt rdate}
elements to identify the original letter.  There is no {\tt sdate}
tag, as the date this letter is printed will be included in the letter
at some appropriate place by the formatter.



\item[{\tt cc}] This used to be an acronym for ``carbon copies'', which were to be
sent to persons other than the principal recipient of the letter.  The
{\tt cc} tag can be used to list these other recipients, even though
the copies they receive today are perhaps printed by a laser printer
on recycled paper.  As in the above example, you can separate the
names of these recipients with {\tt newline} elements (using the
{\tt nl} entity if you prefer).



\item[{\tt encl}] Use this tag to list {\em enclosures\/}.  These can also be separated
with {\tt newline} elements, or simply with commas, if you prefer.



\item[{\tt ps}] A postscript, not to be confused with PostScript, can be included
with this tag.  Any kind of element which can appear in the body
of the letter (i.e. {\tt sectpar} elements) can also be used here.



\end{description}



To summarize, here are the relevant SGML declarations:

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!entity  % addr "(address?, email?, phone?, fax?)" >  
        
<!element letter - - 
        (from, %addr, to, %addr, cc?, subject?, sref?, rref?,
         rdate?, opening, p+, closing, encl?, ps?)>

<!attlist letter
        opts cdata "null">
        
<!element from          - o (#pcdata) >
<!element to            - o (#pcdata) >
        
<!usemap oneline (from,to)>
        
<!element address       - o (#pcdata) +(newline) >
<!element email         - o (#pcdata) >
<!element phone         - o (#pcdata) >
<!element fax           - o (#pcdata) >
        
<!element subject       - o (#pcdata) >
<!element sref          - o (#pcdata) >
<!element rref          - o (#pcdata) >
<!element rdate         - o (#pcdata) >
        
<!element opening       - o (#pcdata) >
<!usemap bodymap opening>
        
<!element closing - o (#pcdata) >
<!element cc - o (#pcdata) +(newline) >
<!element encl - o (#pcdata) +(newline) >
        
<!element ps - o (p+) >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}








\section{Telefax Messages}

The structure of a telefax message is the same as for letters and
e-mail messages, except that the {\tt fax} number of the recipient is,
of course, required, rather than optional.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element telefax - - 
        (from, %addr, to, address, email?, 
         phone?, fax, cc?, subject?, 
         sref?, rref?, rdate?,
         opening, p+, closing, ps?)>

<!attlist telefax 
        opts cdata "null"
        length cdata "2">
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






\section{Notes }

The {\tt notes} element is a new top-level document ``style'', like
articles, books and letters.  It is useful for miscellaneous purposes,
such as jotting down notes to oneself, where the complex structure of
the other styles is unnecessary.  Notes here simply a sequence of
section paragraphs (i.e. paragraphs, lists, comments, long quotations,
figures, tables, displayed mathematical formulas, and program code).
An optional title is also available.  The contents of a notes document
can be copied and pasted into a section or chapter of a book or article.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element notes - - (title?, p+) >
<!attlist notes
        opts cdata "null" >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






\section{Manual Pages}

The {\tt manpage} element is for Unix manual pages.  Here we see again
an advantage of SGML.  Using this element, the very same manual
page can be viewed on just about every terminal, using {\tt nroff},
or be included as a section of an article, report or book to be
formatted by {\TeX}. 

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element manpage - - (sect1*) 
        -(sect2 | f | %mathpar | figure | tabular | 
          table | %xref | %thrm )>


<!attlist manpage
        opts cdata "null"
        title cdata ""
        sectnum cdata "1" >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}



A manpage consists of a sequence of sections.  There are two SGML
attributes, for the command name and manual section number,
respectively.  Each section of the manual page is delimited by a
{\tt sect1} element.  {\em Notice that these sections may not contain
further subsections.\/}   Sections are represented as {\tt sect1}
elements, rather than {\tt sect}, to allow the manual page to be
easily cut and pasted into a {\tt sect} section of an article, report
or book.  (Of course, if the manual page is to be used a chapter of a
book, then these sections of the manual page will need to be replaced
with {\tt sect} elements.)

Notice that Many elements, such as tables, figures and
mathematical formulas, cannot be used within manual pages, because of
limitations of ASCII terminals, or the Unix {\tt man} macro package for
{\tt nroff}.

There is a short reference map in effect within the scope of the
{\tt manpage}.  With the exception of [, which is not used here
to start formulas, this map {\em has the same effect\/} as the
{\tt global} map.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!shortref manpage
      "&#RS;B" null
      '"' qtag 
      "[" ftag
      "~" nbsp
      "_" lowbar
      "#" num
      "%" percnt
      "^" circ
      "{" lcub
      "}" rcub
      "|" verbar>

<!usemap manpage  manpage >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






\subsection{Manual Page Conventions}

For detailed information about the conventions for Unix manual
pages, see your Unix documentation.  But here is a brief summary.  The
typical manual page has the following sections, in this order:

\begin{description}
\item[ NAME.] The name, or list of names, by which the command or function is
called, followed by a dash and then a one-line summary of its purpose.



\item[ SYNOPSIS.] For the syntax of the command and its arguments. (The Sun
documentation suggests that literals be formatted using boldface type,
and that variables be formatted using italics type.  Use the {\tt tt}
and {\tt em} elements, respectively, here for this purpose.)



\item[ DESCRIPTION.] An overview of the command or function's purpose, effects and use.



\item[ OPTIONS.] A list and description of all command-line options.



\item[ FILES.] A list of files associated with the command which may be of
interest to users.



\item[ SEE ALSO.] A comma-separated list of related Unix commands, and references to
other relevant publications.



\item[ DIAGNOSTICS.] A list and explanation of any diagnositic messages the command may
write to the standard error output file.





\item[ BUGS.] A description of any known bugs, problems, or limitations.



\end{description}



Some of you may be asking yourselves why {\tt manpage} wasn't
designed so that each of these conventional sections of a manual page
is represented by its own SGML element.  That certainly would have
been possible, but on the other hand the approach taken has the
advantage that users can simply cut and paste sections between manual
pages and article, reports and books.  Of course it would have been
easy to write a filter to convert between these formats, but it was
felt that the benefits of a special {\tt manpage} format would be too
small to warrant even this limited effort.  After all, unless one is
using an SGML structure editor, users must refer to the SGML document
type definition to know what is expected in the manual page.  It is
just as easy to check this documentation to see what sections
conventionally appear in manual pages.  There is also a file which can
be used as a template or form for writing manual pages.  See the Unix
Commands chapter for details.

The only reason there is a {\tt manpage} document type, instead
of just another translation of, say, the {\tt article} document type
into {\tt nroff} is that the {\tt man} macros used for the Unix
documentation are not powerful enough to format all of the features
available in our {\tt latex} document type.  Having this separate
{\tt manpage} document type provides a means of checking whether the
manual page can be formatted by {\tt nroff} using these {\tt man}
macros.  Again, as this document type is designed to be a subset of
the {\tt latex} document type, the sections of a manual page can also
be included within instances of the {\tt latex} document type.




\subsection{Manual Page Example}

Here is how the manual page for the {\tt cd} command could have
been typed using this document type definition:

\begin{verbatim}
<manpage title="CD">
        
<sect1> NAME
        
cd &mdash change working directory
        
<sect1> SYNOPSIS
        
 cd [ <em>directory</> ] 
        
<sect1> DESCRIPTION
        
 <em>directory</> becomes the new working directory.  The process
must have execute (search) permission in <em>directory</>.  If cd is
used without arguments, it returns you to your login directory.
        
...
        
<sect1> SEE ALSO
        
 csh(1), pwd(1), sh(1)
</manpage>
\end{verbatim}



This is the end of the {\tt qwertz} document type definition.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!-- end of qwertz dtd -->
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






\batchmode

\chapter{Bibliographies}



 This chapter describes an SGML document type definition for
bibliographies.  The logical structure of these bibliographies is the
same as in Bib{\TeX}.  There is a Unix tool, described in the ``Unix
Commands'' chapter, for translating bibliographies in this SGML format
into Bib{\TeX}'s {\tt bib} format or, if you prefer, into Unix's
{\tt refer} format.



 Why use this SGML format instead of the {\tt bib} format
directly?  There may be a few reasons.  If you are using SGML to write
your articles, then it is probably easier to use this SGML document
type for your bibliographies.  The syntax of Bib{\TeX}'s {\tt bib}
files is, not surprisingly, completely different.  Also, here too SGML
offers the possibility of easily translating these bibliographies into
some other format, such as Unix's {\tt refer} format. 
Finally, some may prefer to maintain their bibliographies in a
semi-WYSIWYG way, using an SGML structure editor.



 This chapter is divided into an overview followed by a reference
section.  The overview contains a simplified description of the
structure of bibliographies; it is correct as far as it goes, but
certain details are not discussed.  The reference section contains the
complete SGML Document Type Definition for bibliographies and should
be consulted for further information or clarification.




\section{Overview}



 First, an example.   A typical bibliographic item may be a journal article, which is
entered like this:

\begin{verbatim}
<article id="Knuth84">
<author>  Donald E. Knuth 
<title> Literate Programming 
<journal> The Computer Journal 
<vol>  27 
<no>  2 
<pp>  97-111 
<year> 1984  
\end{verbatim}





 The entry is started with the {\tt {\lt}article id="Knuth84"{\gt}}
{\em tag\/}.  It is used to state the type of the entry, here an article,
and give it a unique identifier.\footnote{Conveniently, the SGML
parser will complain if the identifier is not unique.} There
are many other types of entries, in addition to articles, such as
books, reports and Ph.D. theses.  A complete list will follow shortly.



This entry has seven {\em fields\/}: author, title, journal, volume,
number, pages, and year.  (The names of some of these fields are
abbreviated in the entry.)  The fields required for an entry depends
on the type of the entry.  In the case of articles, the {\tt author},
{\tt title}, {\tt journal} and {\tt year} fields must be
included.\footnote{The order of fields is no longer fixed; they may
appear in any order, so long as each required field is
present.} The {\tt vol}, {\tt no}, and {\tt pp} fields are
optional.  



 Within each field, just about every ASCII character can be used.
There are only a few exceptions to be aware of.  The most important in
practice is \&, the ampersand sign.  Use the {\tt amp} entity to
obtain this character.  Foreign language {---} that is, non-English
{---} characters must be entered using SGML entities.  For example,
German characters can be entered as follows: \"{a} ({\tt ae}), \"{A}({\tt Ae}), \"{o} ({\tt Oe}), \"{O} ({\tt Oe}), \"{u} ({\tt ue}), \"{U} ({\tt Ue}),
and {\ss} ({\tt sz}).  There are also entities for several general
purpose symbols, such as {\pounds}, {\P} and {\S}.  See the
{\em General Purpose Characters\/} table in Chapter 4 for a complete
list.  The table also include entity names for several ASCII symbols.
Use these entities if some ASCII is not being printed as expected.
Mathematical formulas cannot be used within bibliographies.



 Multiple authors or editors are separated by {\tt and} elements, as
in this example:

\begin{verbatim}
<book id="Smith88">
<author>  Joan M. Smith <and> Robert Stutely 
<title> SGML: the user's guide to ISO 8879
<publish> Ellis Horwood
<year> 1988
\end{verbatim}





 Altogether, there are almost 30 different fields available.  Which
of these are required or optional depends on the entry type.  A book,
for example, requires different fields than a Ph.D. thesis.  An
alphabetical list describing all of the fields follows.  After this
list, the role these fields play in each of the entry types will be
explained.  First, here are the fields:

\begin{description}
\item[{\tt address}] 

 The address of the publisher.  For large publishers, just provide
a city.  For smaller publishers, type the full address.



\item[{\tt annote}] 

 An annotation.  However, it is not included in the list of
references, using any of the standard styles.



\item[{\tt author}] 

 The name of the author or authors.   Each author's name can be
typed in full without using tags to separate the first and last names.
However, sometimes Bib{\TeX} needs help parsing names correctly, in which
case you can use the {\tt first} and {\tt last} tags to unambiguously
delimit the parts of the name.   If there are mulitple authors, use
the {\tt and} tag to separate them, as in the previous example.



\item[{\tt btitle}] 

 The book title, when the entry is for a part of the book, such as
a chapter.  If the entry is for the book itself, its title is given
using the {\tt title} element.



\item[{\tt chap}] 

 The {\em number\/} of the chapter in a book.



\item[{\tt edition}] 

 The edition of the publication, such as ``second''.



\item[{\tt editor}] 

 The editor (or editors) of the publication.  See the description
for the {\tt author} field above for information about how to enter
names.



\item[{\tt howpub}] 

 To describe how the document was published, if not by a publisher
or some institution.



\item[{\tt id}] 

 The library identification number of the book, for {\em your\/}
library.  This will not be included in entry as it is printed in the list
of references, at least not when using one of the standard styles.



\item[{\tt inst}] 

 The {\em institution\/} which published the item, such as a
university or research institute, if not a commercial publisher.



\item[{\tt journal}] 

 The name of the journal or magazine in which an article was
published.



\item[{\tt key}] 

 Used for alphabetizing and creating a label when there is no {\tt author}
or {\tt editor}.



\item[{\tt keywrds}] 

A list of {\em key words\/} for categorizing the item.  These words
are not included in the list of references when using one of the
standard styles.  



\item[{\tt loc}] 

 The current {\em location\/} of the document.  Useful for keeping
track of who has borrowed your books!  Not printed in the list of
references when using one of the standard styles.



\item[{\tt month}] 

 The month the work was published or, if unpublished, written.



\item[{\tt note}] 

 Additional information which may be useful to the reader.  Shorter
than an annotation, using {\tt annote}.



\item[{\tt no}] 

 The {\em number\/} of a journal, magazine or technical report.  An
issue of a journal is usually identified by both its {\em volume\/}
(using the {\tt vol} element described below) and number.



\item[{\tt organ}] 

 The {\em organization\/} sponsoring a conference.  Used in the
entries for proceedings.



\item[{\tt pp}] 

 One or more page numbers or range of page numbers, such as 
\begin{verbatim}
<pp> 34,58,62
\end{verbatim}


or
\begin{verbatim}
<pp> 56-108
\end{verbatim}





 Notice that it is not necessary here to use the {\tt ndash}
entity between the page numbers.  An ordinary hyphen will be
interpreted here by Bib{\TeX} as a dash for number ranges.



\item[{\tt private}] 

 For reminders or comments to yourself, that you do not want to
appear in an annoted bibliography (using {\tt annote}).



\item[{\tt publish}] 

 The name of the publisher.



\item[{\tt school}] 

 The name of the university where a thesis or disseration was
written.



\item[{\tt series}] 

 The name of a series or set of books.



\item[{\tt title}] 

 The item's title.



\item[{\tt type}] 

 The type of a technical report; for example ``Research Note''.



\item[{\tt vol}] 

 The volume of a journal or multivolume book.



\item[{\tt year}] 

 The year the entry was published, or if it was never published,
written.   This should consist only of numbers, such as ``1984''.



\end{description}





 Including articles and books, there are thirteen types of
bibliographic entries.  Each type is described below, including a list
of required and optional fields.  The order in which the fields are
listed is no longer significant.  A question mark behind the field
name means the field is optional.  Alternative fields are connected by
a {\verbar} symbol, as in {\tt (author {\verbar} editor)}.  Finally, every
entry, regardless of its type, can include any of these optional
fields: {\tt  note?, annote?, keywrds?, loc?, id?, private?}.

\begin{description}
\item[ {\tt  article }] 

 For an article from a book, magazine, or journal.   Use
{\tt inproc} for article in conference proceedings, and {\tt incoll}
for a chapter or part of a book with its own title.    The fields of an article are:
{\tt author, title, journal, vol?, no?, pp?, month?, year}



\item[ {\tt  book }] 

 For published books, with a known publisher.  If the book has yet
to be publised, or the publisher is unknown, use an {\tt unpub} or
{\tt booklet} element.  The fields of a book entry are:
{\tt (author {\verbar} editor), title, edition?, pubish, series?, vol?, address?, month?, year}



\item[ {\tt  booklet }] 

 For documents without a named publisher or sponsoring institution.
If the {\tt author} is not known, a {\tt key} is required so
that the entry can be ordered alphabetically in the list of references.  Its fields are:
{\tt (author {\verbar} key), title, howpub?, address?, month?, year?}



\item[ {\tt  inbook }] 

 A part of a book, either a chapter or some range of pages.   The fields are: {\tt (author
{\verbar} editor), title, ((chap, pp?) {\verbar} pp), edition?, publish, series?, vol?, address?,
month?, year}



\item[ {\tt  incoll }] 

 A part of a book with its own title.   Its fields are: {\tt author, title, editor?, btitle, chap?,
edition?, publish, address?, month?, year, pp?}



\item[ {\tt  inproc }] 

 An article in the proceedings of a conference.   An {\tt inproc} entry consists of:
{\tt author, title, editor?, btitle, organ?, publish?, address?, month?, year, pp?}



\item[ {\tt  manual }] 

 For user manuals and other technical documentation.  Its fields are: {\tt (author {\verbar} key),
title, edition?, address?, month?, year?, organ?}



\item[ {\tt  masters }] 

 For a master thesis. The fields are: {\tt author, title, school, address?, month?, year}



\item[ {\tt  misc }] 

 For documents which don't seem to be one of the other entry types: {\tt (author {\verbar} key),
title?, month?, year?, howpub?}



\item[ {\tt  phd }] 

 For a Ph.D. thesis.  The fields are the same as for {\tt masters} entries:  {\tt author, title, 
school, address?, month?, year}



\item[ {\tt  proc }] 

 The proceedings of a conference: {\tt (editor {\verbar} key), title,
organ?, publish?, address?, month?, year}



\item[ {\tt  report }] 

 For technical reports published by a university or research
institute.  These are usually numbered within a series.  Its fields are: {\tt  author, title?, inst,
address?, type?, no?, month?, year}



\item[ {\tt  unpub }] 

 Unpublished documents: {\tt author, title, month?, year}



\end{description}






\section{Reference Section}



 This reference section is annotated SGML source code of the
{\tt biblio} document type definition.




\subsection{Entities and Short Reference Maps}



 As this document type is completely independent of the
{\tt qwertz} DTD described in chapter 4, we must redefine here the
entities and short reference maps required. These are almost exactly
the same as those described in chapter 4, so you may want to just skip
this section.  The only difference you should be aware of, is that
mathematical formulas cannot be used within bibliographies.  Thus, the
entities for mathematical symbols defined in chapter 4 
cannot be used here.  On the other hand, as the [ symbol is not
need as a short reference for starting formulas, it can be typed
literally.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!entity % general system -- general purpose characters -- >
%general;

<!entity   Ae  '&Auml;' >
<!entity   ae  '&auml;' >
<!entity   Oe  '&Ouml;' >
<!entity   oe  '&ouml;' >
<!entity   Ue  '&Uuml;' >
<!entity   ue  '&uuml;' >
<!entity   sz  '&szlig;' >

<!entity   qtag     '<sq>'   -- short quote begin -- >
<!entity   qendtag  '</sq>'>

<!shortref global
      '"' qtag 
      "_" emsp
      "~" nbsp
      "#" num
      "%" percnt
      "^" circ
      "{" lcub
      "}" rcub
      "|" verbar>

<!usemap global biblio >

<!shortref sqmap 
      '"' qendtag 
      "_" emsp
      "~" nbsp
      "#" num
      "%" percnt
      "^" circ
      "{" lcub
      "}" rcub
      "|" verbar >

<!usemap   sqmap    sq >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






\subsection{Entry Types }



 There are thirteen different types of entries:

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!entity % etype
   "( article | book | booklet | inbook | incoll | 
      inproc  | manual | masters | misc | phd | 
      proc | report | unpub )" >

<!attlist %etype  id cdata #required >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}





 The {\tt id} attribute of each entry type is required.  It is the
identifier used in a {\tt cite} or {\tt ncite} element (cf. chapter
4, section 4.7) to refer to the entry.



 A bibliography file consists of one or more entries. 

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element biblio - - ((%etype)+) +(x)>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}





 Notice that {\tt x} elements, for inline formatting code, can be
included anywhere within the bibliography.



 A following {\em parameter entities\/}, will be used in the
definitions of the entry types below.  

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!entity % info   
        "note? & annote? & keywrds? & loc? & id? & private?" >

<!entity % emph " em | it | bf | sf | sl | tt " >

<!entity % inline " (#pcdata | %emph; | sq )* " >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}





 A description of each entry type is in the overview section, above.  The fields used in
these entries are defined in the following section.  

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element article - o  
        (author & title & journal & vol? & no? &  
         pp? & month? & year & %info )>

<!element book  - o 
        ((author | editor) &  title &  edition? & 
         publish & series? & vol? & address? &  
         month? &  year & %info )>

<!element booklet - o   
        ((author | key) & title & howpub? & 
         address? & month? & year? & %info )>

<!element inbook - o
        ((author|editor) & title & ((chap, pp?) | pp) & 
         edition? & publish & series? & vol? & address? & 
         month? & year & %info )> 

<!element incoll - o 
        (author & title & editor? & btitle & chap? & 
        edition? & publish & address? &  month? & 
        year & pp? & %info )>

<!element inproc - o 
        (author & title & editor? & btitle & organ? & 
         publish? & address? & month? & year & pp? & %info )> 

<!element manual - o
        ((author | key) & title & edition? & address? &
         month? & year? & organ? & %info )>

<!element masters - o
        (author & title & school & address? & month? & 
         year & %info )>

<!element misc   - o 
        ((author | key) & title? & month? & year? & 
         howpub? & %info )>

<!element phd    - o
        (author & title & school & address? & month? & 
         year & %info )>

<!element proc  - o 
        ((editor | key) & title &  organ? & publish? & 
         address? & month? & year & %info )>

<!element report - o  
        (author & title & inst & address? & type? & no? & 
         month? & year & %info )>

<!element unpub  - o    
        (author & title & month? & year & %info)>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}








\subsection{Fields}



 Here we describe the purpose of the elements used in the entry
types above.  First of all, {\tt x}, {\tt sq} and various sorts of
emphasis, such as {\tt tt} and {\tt em}, can be used in most fields of
an entry.  (Recall, however, that the {\tt global} and {\tt sqmap} short
reference maps are designed so that you need not type the {\tt sq}
starting and ending tags.   Just use the {\tt "} symbol as usual.)

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element x  - - rcdata   >
<!element sq - - (%inline)>
<!element em - - (%inline)>
<!element bf - - (%inline)>
<!element it - - (%inline)>
<!element sf - - (%inline)>
<!element sl - - (%inline)>
<!element tt - - (%inline)>
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}





 The fields available are described in the overview, above.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!element address       - o (%inline) >
<!element annote        - o (%inline) >
<!element author        - o (names) >
<!element names         o o 
        ((%inline | (first, last)),(and, names)?) >
<!element last          - o (%inline)>
<!element first         - o (%inline)>
<!element and           - o empty >
<!element btitle        - o (%inline) >
<!element chap          - o (%inline) >
<!element edition       - o (%inline) >
<!element editor        - o (names) >
<!element howpub        - o (%inline) >
<!element id            - o (#pcdata) >
<!element inst          - o (%inline)  >
<!element journal       - o (%inline) >
<!element key           - o (#pcdata) >
<!element keywrds       - o (#pcdata) >
<!element loc           - o (%inline) >
<!element month         - o (#pcdata) >
<!element note          - o (%inline) >
<!element no            - o (#pcdata) >
<!element organ         - o (%inline) >
<!element pp            - o (#pcdata) >
<!element private       - o (%inline) >
<!element publish       - o (%inline) >
<!element series        - o (%inline) >
<!element school        - o (%inline) >
<!element title         - o (%inline) >
<!element type          - o (%inline) >
<!element vol           - o (#pcdata) >
<!element year          - o (#pcdata) >
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}





 Here is the end of the {\tt biblio} document type definition.

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
<!-- end of biblio dtd -->
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}










\chapter{\label{UC}Unix Commands}

The {\tt qwertz} document processing system consists of a suite of
four Unix shell scripts:

\begin{description}
\item[{\tt format}] translates {\tt qwertz} documents into various formats, including {\LaTeX}
and various versions of {\tt roff}.  {\tt format} can also be used to
simply check that a document is a correct instance of the {\tt qwertz} DTD.



\item[{\tt qtex}] is a front-end to {\LaTeX} and Bib{\TeX} which may be used as a filter
in Unix pipes.   By default, it translates {\LaTeX} documents into
PostScript, which can then be piped to {\tt lpr} for printing.
Alternatively, a {\tt dvi} file can be generated.



\item[{\tt qroff}] is a front-end to {\tt groff}, analogous to {\tt qtex}.  By default, it
translates {\tt groff} documents using the {\tt ms} macro package into a
formatted {\tt ascii} file suitable for electronic messages.  It can
also be used to generate PostScript, to obtain an alternative layout
style to that produced by {\LaTeX}.



\item[{\tt extract}] extracts source code from {\tt qwertz} documents.  It is useful
for ``literate programming''.



\item[{\tt biblio}] translates a bibliography written using our {\tt biblio} document
type definition into your choice of Bib{\TeX}'s {\tt bib} format or
Unix's {\tt refer} format.



\item[{\tt fax}] sends a message, in PostScript format, to a telefax machine.



\end{description}



The next few sections are the manual pages for each of these
commands.




\section{Formatting, Previewing and Printing}

\batchmode

\subsection{NAME
format {---} translate SGML into LaTeX or nroff/troff}




\subsection{SYNOPSIS}

\begin{verbatim}
format [-c] [-t int] [-T format] file[.sgml]
\end{verbatim}






\subsection{DESCRIPTION}

{\tt format} translates an SGML file of the {\tt qwertz}
document type into LaTeX and various forms of {\tt nroff/troff}.  The
``.sgml'' file name extension is optional. It first checks that the file
is a syntactically correct instance of the {\tt qwertz} document type.
The default action is to write LaTeX to the standard output.  To
print a {\tt qwertz} file named {\tt foo.sgml}, using LaTeX, just type

\begin{verbatim}
format foo | qtex | lpr
\end{verbatim}



{\tt qtex} is a front-end to LaTeX designed to be used as a filter
in this way.  See {\tt qtex(1)} for more information.

If you need more control over printing than is available using
{\tt lpr} alone, you can first create a {\tt dvi} file, and then
print the file using a {\tt dvi} to PostScript converter, such as
{\tt dvips}.  For example, to print pages 3 to 10 of {\tt foo}, you
could type

\begin{verbatim}
format foo | qtex -d > foo.dvi
dvips -p 3 -n 8 foo | lpr
\end{verbatim}



If there is a PostScript previewer available, such as
{\tt ghostview}, from the GNU distribution, you can preview the
document by typing

\begin{verbatim}
format foo | qtex > foo.ps; ghostview foo.ps
\end{verbatim}



Or, you may also preview the document using a {\tt dvi} previewer
such as {\tt xdvi} by typing

\begin{verbatim}
format foo | qtex -d > foo.dvi;  xdvi foo
\end{verbatim}



You can also use {\tt nroff} to view the document on an ASCII
terminal:

\begin{verbatim}
format -T nroff foo | nroff -ms | more
\end{verbatim}



Finally, {\tt nroff} may also be suitable for sending the document to
someone by electronic mail:

\begin{verbatim}
format -T nroff foo | nroff -ms | mail thomas@gmdzi.gmd.de
\end{verbatim}






\subsection{OPTIONS}

In the following, it is assumed that the file to be formatted is
named {\tt foo.sgml}, or simply {\tt foo}.

\begin{description}
\item[{\tt -help}] If this is the only option, a short message listing all the
options available, and their purpose, is printed to the standard out.



\item[{\tt -c}] Just {\em check\/} the syntax of the document, to see that it is a
correct instance of the {\tt qwertz} document type.



\item[{\tt -T [latex {\verbar} nroff {\verbar} grops {\verbar} man]}] Use {\tt -T} to select the format in which to translate the
{\tt qwertz} document.  By default, LaTeX is used.  {\tt nroff} is
appropriate for ASCII devices.  {\tt grops} is a {\tt troff} format for
{\tt groff}, a reconstruction of {\tt troff} from the Free Software
Foundation.  {\tt grops} uses {\tt groff's} names for non-ASCII
characters and symbols.  To use {\tt groff} to generate an ASCII
version of the document, use the {\tt nroff} format, as in:

\begin{verbatim}
format -T nroff foo | groff -ms -T ascii | more 
\end{verbatim}



Both the {\tt grops} and {\tt nroff} formats use the {\tt ms} macro
package. Also, documents containing tables and formulas will need to
be preprocesed by {\tt tbl(1)} and {\tt eqn(1)}, respectively.

The {\tt man} format generates {\tt nroff} using the {\tt man} macro
package for Unix manual pages.   Manual pages may also be formatted
using any of the other formats.

By default, {\tt format} looks in the {\tt \$FORMAT/rep}
directory for the files controlling the translation of {\tt qwertz}
documents into various formats.  If you wish to customize the
appearance of your documents, or support additional formats, you may
create your own mappings.  Just set the {\tt REPDIR} shell variable to
the directory containing your formats.  For each format, {\tt f}, there
should be a subdirectory named {\tt f} in the {\tt REPDIR} directory.
Within this subdirectory, there must be three files, named:
{\tt mapping}, {\tt general} and {\tt math}.  The {\tt mapping} file is a
simple table from SGML start and end tags into instructions or
commands for the goal formatting system.  (The table must be in the
format first used by the Amsterdam SGML Parser.)
See {\tt \$FORMAT/rep/qwertz/latex/mapping} and
{\tt \$FORMAT/rep/qwertz/grops/mapping} for examples.  The
{\tt general} and {\tt math} files are SGML files containing the
formatter specific definitions of general purpose characters and
mathematical symbols, respectively.  Again, see the examples in
{\tt \$FORMAT/rep/qwertz/latex}.



\item[{\tt -t }{\em n\/}] {\tt format} always pipes the input document through {\tt expand}
to replace tabs by spaces.  By default, each {\em tab\/} is replaced by eight
spaces.  You can change this by using this option.



\end{description}






\subsection{SEE ALSO}

\begin{verbatim}
 
qtex(1), nroff(1), tbl(1), eqn(1), groff(1), dvips(1),
expand(1), sed(1), lpr(1), ghostview(1), xdvi(1) 
\end{verbatim}






\subsection{DIAGNOSTICS}

SGML syntax errors are reported to standard out.  Each error message
mentions the line number containing the error.




\subsection{BUGS}

The LaTeX produced for {\tt qwertz} documents consisting of just a
single {\tt chapt} or {\tt sect} element must be edited before being
processed by LaTeX.  Otherwise, LaTeX will complain that the
{\tt \verb+\+begin\{document\}} is missing. Also, to include such a
chapter or section in another LaTeX document, certain declarations at
the beginning of the LaTeX version of the chapter or section must be
deleted.  Finally, these {\tt chapt} or {\tt sect} files may not
contain cross references to other parts of the complete document and
other parts may not refer to this particular {\tt chapt} or {\tt sect}.
This is a problem with the SGML parser; it not only complains about
unresolved references, but terminates without trying to parse the rest
of the file.  So, at the moment, {\tt format} can be used to just
check the syntax of {\tt chapt} and {\tt sect} files, so long as
there are no cross-references, by using the {\tt -c} option.  To
print single chapters or sections, you may prefer to use one of the
{\tt roff} formatters.








\section{Processing {\LaTeX} files}

\batchmode

\subsection{NAME
qtex {---} translate a LaTeX file into PostScript}




\subsection{SYNOPSIS}

\begin{verbatim}
qtex [-dsxgbv] file[.tex] | lpr
cat file.tex | qtex [-dsxgbv] | lpr
\end{verbatim}






\subsection{DESCRIPTION}

{\tt qtex} is a front-end to LaTeX, BibTeX and a {\tt dvi} to
PostScript driver, which makes them considerably easier, and more
Unix-like, to use.  Unlike LaTeX, it can also process LaTeX files
read from the standard input file, or in a Unix pipe.  By default,
{\tt qtex} writes PostScript to the standard output file, but there is
a command line switch, described below, for generating the usual TeX{\tt dvi} file instead.   The ``.tex'' file extension is optional.  If
LaTeX finds an error in your input file, a message will be printed to
the standard error file and execution is terminated, with a non-zero
exit status.   There will be a ``.log'' file in the same directory as
the input file describing the errors.




\subsection{OPTIONS}

\begin{description}
\item[{\tt -help}] If this is the only option, a short message listing all the
options available, and their purpose, is printed to the standard out.



\item[{\tt -d}] Create a TeX device-independent file, i.e. a {\tt dvi} file,
instead of PostScript.  This is piped to the standard output
file.  To save the {\tt dvi} file, write, for example:

\begin{verbatim}
qtex -d foo > foo.dvi
\end{verbatim}





\item[{\tt -s}] {\em Save\/} all temporary files, such as {\tt foo.tex},
{\tt foo.dvi}, and {\tt foo.aux}.   PostScript is generated and
written to standard out as usual.



\item[{\tt -x}] Use this option if the input file contains {\em cross
references\/}.  This option causes the LaTeX file to be processed by
TeX twice, to resolve the references.



\item[{\tt -g}] Use this option if the document is written in {\em German\/}.  It
causes TeX to use another algorithm for hyphenation.  Remember to
{\em also\/} use the {\tt german} option in the options list of the
document itself. 



\item[{\tt -b}] Use this option if the file includes a list of references or
{\em bibliography\/}.  The option causes LaTeX, then BibTeX and then
LaTeX (twice) again to be run.   The bibliography referenced in the
document is expected to be a BibTeX {\tt bib} file in the same
directory as the document.   If your bibliography is being
maintained in the {\tt biblio} SGML format, use the {\tt biblio}
command to first translate it into {\tt bib} format.  The {\tt -b}
option implies the {\tt -x} option, for cross-references, described above.



\item[{\tt -v}] {\em Verbose\/} mode.  If your document is particularly long, you
may want to use this mode to be kept posted about just what
{\tt qtex} is doing at the moment.  The messages are written to
standard error, so that they are not mixed with the PostScript being
piped to the printer!

\end{description}










\section{Generating Formatted {\tt ASCII} Files}

\batchmode

\subsection{NAME
qroff {---} translate a {\tt groff ms} file into ASCII}




\subsection{SYNOPSIS}

\begin{verbatim}
format -T nroff file | qroff [-b <sgml bibliography>] 
format -T grops file | qroff -p [-b <sgml bibliography>] | lpr
\end{verbatim}






\subsection{DESCRIPTION}

{\tt qroff} is a greatly simplified front end to {\tt groff} and
{\tt grefer}.  Its primary purpose is to generate formatted {\tt ASCII}
versions of {\tt qwertz} SGML documents suitable, e.g., for electronic
messages.  However, it may also be used as an alternative to LaTeX for printing the document.  Some may prefer {\tt groff}'s layout style.
(Unfortunately, {\tt groff} does not support cross-references, so if
you use these, you will need to LaTeX .)

{\tt qroff} only reads from the standard input; it is designed to be
used in a pipe, as in the examples in the synopsis, above.  




\subsection{OPTIONS}

\begin{description}
\item[{\tt -help}] If this is the only option, a short message listing all the
options available, and their purpose, is printed to the standard out.



\item[{\tt -p}] Create a PostScript file, instead of {\tt ASCII}.



\item[{\tt -b {\lt}sgml bibliography>}] If the document contains a list of references, you will need to use
this option to provide the name of the file containing the
bibliography, which must be in the format defined in the {\tt biblo}
document type definition.  See also {\tt biblio (1)}.



\end{description}






\subsection{SEE ALSO}

\begin{verbatim}
grefer(1), gtbl(1), geqn(1), groff(1), biblio(1)
\end{verbatim}










\section{Extracting Source Code}

\batchmode

\subsection{NAME
extract {---} filter the source code out of a ``literate program''}




\subsection{SYNOPSIS}

\begin{verbatim}
extract file[.sgml]
\end{verbatim}






\subsection{DESCRIPTION}

Extracts the source code out of a literate program written using
the {\tt qwertz} SGML document type.  The syntax of the document is
checked while the source code is being extracted.  If syntax errors
are found, error messages are written to standard error and the
program may terminate before all code has been extracted.  The code
being extracted is written to standard out, but this will usually be
redirected to a file with some appropriate file name extension,
depending on the programming language being used. The ``.sgml'' filename
extension of the input file is optional.

For example, if the input file is named {\tt foo.sgml} and
contains the source code of a C program, you could extract and compile
the program by typing:

\begin{verbatim}
extract foo > foo.c
cc foo
\end{verbatim}



In this example, as standard error has not been redirected, error
messages will appear on the terminal.




\subsection{DIAGNOSTICS}

SGML syntax errors are written to standard error.  If the input file
contains such errors, {\tt extract} will terminate with exit status 1
before all the code has been extracted from the file.










\section{Converting Bibliographies}

\batchmode

\subsection{NAME
biblio {---} convert SGML bibliographies }




\subsection{SYNOPSIS}

\begin{verbatim}
biblio [-T (bibtex | refer | ps | ascii)] file[.sgml] 
\end{verbatim}






\subsection{DESCRIPTION}

{\tt biblio} translates a bibliograhy written using the
{\tt biblio} SGML document type into BibTeX's {\tt bib} format,
Unix's {\tt refer} format, PostScript, and an ASCII representation
suitable electronic mail. By default, {\tt biblio} generates {\tt bib}
files.  Use the {\tt -T} option to select another format.  The ``.sgml''
extenstion of the input file is optional.  {\tt biblio} writes to the
standard output.  To create a {\tt bib} file from a {\tt foo.sgml} file,
type:

\begin{verbatim}
biblio foo > foo.bib
\end{verbatim}



To print a formatted version of the bibliography on a PostScript
printer, type:

\begin{verbatim}
biblio -T ps foo | lpr
\end{verbatim}



To send a formatted version of the bibliography to someone via
email, type, for example:

\begin{verbatim}
biblio -T ascii foo | mail joe@somewhere
\end{verbatim}






\subsection{SEE ALSO}

{\tt bibtex (1)}, {\tt refer (1)}, {\tt mail (1)}, {\tt lpr (1)},
{\tt lookbib (1)}








\section{Sending Fax Messages}

\batchmode

\subsection{NAME
fax {---} send a Telefax message}




\subsection{SYNOPSIS}

\begin{verbatim}
format file | qtex | fax [-a]
\end{verbatim}






\subsection{DESCRIPTION}

{\tt fax} is simple front-end to the {\tt lpr} command, customized for
sending Telefax messages.   It is designed to be used within a Unix
pipe, as shown in the synopsis.




\subsection{OPTIONS}

\begin{description}
\item[{\tt -help}] If this is the only option, a short message listing all the
options available, and their purpose, is printed to the standard out.



\item[{\tt -a}] Send an acknowledgement, by electronic mail, if the fax message was
received without difficulty.



\end{description}






\subsection{BUGS}

The telefax number is written to a file named ``.fax=num'', in the
current directory, by {\tt qtex}.  This file is read and then deleted
by this {\tt fax} program.   Should there coincidentally be a file
with this name which is not write protected, it will be removed.






\subsection{SEE ALSO}

\begin{verbatim}
format(1), qtex(1)
\end{verbatim}










 \appendix 

\chapter{A Sample Article}

\begin{verbatim}
<!doctype qwertz system 
[
<!entity TeX "TeX" >
<!entity LaTeX "LaTeX">
<!entity et "&etago;">
<!entity lhead "The <tt/qwertz/ Document Types">
]>

<report opts="times,11pt">
        
<title>The <tt/qwertz/ SGML Document Types
<subtitle>(Version 1.1 Reference Manual)
<author>Tom Gordon
<inst>The <tt>qwertz</> Project &nl
Institute for Applied Information Technology (F3) &nl&nl
German National Research Center &nl
for Computer Science (GMD)
        
<chapt>Why Not Just Use &LaTeX;?
        
 The <tt/qwertz/ document types are a set of Standard
Generalized Markup Language (SGML) document type definitions (DTDs)
for articles, reports, books, letters, notes, slides (or overhead
transparencies), bibliographies, and manual pages.  Except for manual
pages, the document types have been heavily influenced by the
&LaTeX document types of the same names <cite id="Lamport86">, so
&LaTeX users should feel right at home.  Indeed, we presently
translate most <tt/qwertz/ documents into &LaTeX for
printing and the &LaTeX produced is quite readable by anyone
familiar with &LaTeX;.
        
&hellip;
        
<chapt>The <tt/qwertz/ Document Type Definition
<header><lhead>&lhead<rhead>The <tt/qwertz/ DTD</header>
        
 &hellip
        
We will be making use of several <em/parameter entities/ in this
DTD:
        
<code>
<!entity % emph 
        " em | it | bf | sf | sl | tt " >
        
<!entity % inline 
        " f | x | %emph; | sq | label | ref | 
          pageref | cite | ncite " >
</code>
        
&hellip
        
<sect> General Purpose Entities and Elements
<header><lhead>&lhead<rhead>General Purpose Entities</header>
        
&hellip
        
When may it be necessary to use of an entity reference to produce some
character?  There are three cases to watch out for:
        
<descrip>
        
<tag>SGML Concrete Syntax Delimiters.
        
Although the SGML standard allows alternative concrete syntaxes to be
defined, we use the so-called <em/reference concrete syntax/ in the
<tt/qwertz/ document types.  &hellip
        
<tag>SGML Short Reference Delimiters.
        
In SGML document types <em/short reference maps/ may be defined which
allow single characters to be interpreted as arbitrarily complex
sequences of characters, including SGML tags and entity references.
&hellip
        
<verb>
" # % ' ( ) * + , - : ; = @ [ ] ^ _ { | } ~
</verb>
        
For each of these characters, there is an SGML entity which may be
used to generate the ASCII character in the printed document, listed
in table <ref id="GPC">. <em/Usually, it will not be necessary to use these
entities; the character can simply be typed and will be interpreted
literally./ However, &hellip;
        
<tag>&TeX Special Characters.
        
Ideally, it should be possible to hide the conventions of the
underlying formatting system completely.  In fact, SGML parsers which
implement the full ISO standard have a feature which makes this
possible. &hellip
        
</descrip>
        
<sect1>Spacing, Dashes and Ellipsis
<header><lhead>&lhead<rhead>Spacing, Dashes and Ellipsis</header>
        
&hellip
        
There are also three different kinds of dashes: <tt/hyphen/ which was
already mentioned above, is to be used for intra-word dashes, as in
the word "intra-word".<footnote>However, the <tt/hyphen/ entity was
not actually necessary here, as the - character was not being used in
this context as a short reference.</footnote>
        
&hellip
        
<sect1> Foreign Characters
<header><lhead>&lhead<rhead>Foreign Characters</header>
        
There are a large set of entities for other Western European
languages.  Altogether, there are entities for almost all of the
foreign language characters in ISO 8859, the Latin 1 character set for
Western European languages.<footnote>Only the four
Icelandic characters are missing.</> &hellip
        
<table>
<tabular ca="ll|ll|ll|ll">
AElig   |       &AElig  |
Aacute  |       &Aacute |
Acirc   |       &Acirc  |
Ae      |       &Ae     @
Ntilde  |       &Ntilde |
Oacute  |       &Oacute |
Ocirc   |       &Ocirc  |
Oe      |       &Oe     @
Ue      |       &Ue     |
Ugrave  |       &Ugrave |
Uuml    |       &Uuml   |
Yacute  |       &Yacute @
aacute  |       &aacute |
acirc   |       &acirc  |
ae      |       &ae     | 
aelig   |       &aelig  @
oe      |       &oe     | 
ograve  |       &ograve |
oslash  |       &oslash |
otilde  |       &otilde @
sz      |       &sz     | 
szlig   |       &szlig  |
thinsp  |               |
tilde   |       &tilde  @
times   |       &times  |
uacute  |       &uacute |
ucirc   |       &ucirc  |
ue      |       &ue     @ 
</tabular>
<caption><label id="GPC">(Some) General Purpose Characters</caption>
</table>
        
 &hellip
        
<sect1>Sentences, Paragraphs, Footnotes and Emphasis
<header>
<lhead>&lhead
<rhead>Sentences &hellip Emphasis
</header>
        
&hellip
        
Sentences or phrases within paragraphs can be emphasized in a number
of ways.  The <tt/em/ tag is used to choose the default form of
emphasis, which is usually <em/italic/ type, but depends on the style
of the background text.  If the background text is formatted in
italics type, as it usually is in definitions, for example, than
emphasized text will be formatted using a plain, roman typeface.
However, various forms of emphasis can be explicitly chosen.  These
include: <bf/bold face/ (<tt/bf/), <it/italics/ (<tt/it/), <sf/sans
serif/ (<tt/sf/), <sl/slanted/ (<tt/sl/), and <tt/typewriter/>
(<tt/tt/) styles.
        
&hellip
        
Long quotes are formatted in &LaTeX by indenting the left and
right margins.  For example, <ncite id="Lamport86" note="pp. xiii">:
        
<lq>

The &LaTeX document preparation system is a special version of
Donald Knuth's &TeX program.  &TeX is a sophisticated program
designed to produce high-quality typesetting, especially for
mathematical text.  &hellip
        
&LaTeX represents a balance between functionality and ease of use.
Since I implemented most of it myself, there was also a continual
compromise between what I wanted to do and what I could do in a
reasonable amount of time.  &hellip
</lq>
        
<sect1>Lists
<header><lhead>&lhead<rhead>Lists</header>
        
Three types of lists are supported, which differ according to the
type of label used to mark each item in the list.  Use <tt/itemize/
to create a list in which each item is marked with some symbol such as
a dash or bullet. The <tt/enum. tag is used to create an
enumeration, i.e. a list in which each item is labelled with a number
(or letter) indicating its rank or position in the list. Finally, use
<tt/descrip/ to create a list in which each item is labelled by some
tag of your own choice. Lists of various types can nested.  For
example:
        
&hellip
        
<itemize>
<item> A level one item.
<item> Here's level two:
        <enum>
        <item> A level two item.
        <item> Here's level three:
                <enum>
                <item> A level three item.
                <item>Here's level four:
                      <descrip>
                      <tag/Red./  Is the color of my true love's hair.
                      <tag/Blue./  Is a property of some movies.
                      <tag/Yellow./  Characterizes some forms of journalism.
                      </descrip>
                <item>A last level three item
                </enum>
        <item>A last level two item
        </enum>
<item>A last level one item.
</itemize>
        
&hellip
        
<sect1>Figures and Tables
        
Encapsulated PostScript graphics can be created using a variety of
different editors.  If you are using Unix with an X11-based graphical
user-interface, you may want to try <tt/idraw/, which stores its
documents directly as Encapsulated PostScript files. Another
interesting X11-based drawing program is <tt/tgif/.
        
&hellip
        
Which would then appear as in figure <ref id="issues">.
        
<figure>
        <eps file="issues">
        <caption><label id="issues">An <tt/idraw/ Drawing </>
</figure>
        
<sect1>Literate Programming
        
        
The original motivation behind the development of these document types
was to create an environment for literate programming in an arbitrary
programming language similar to Donald Knuth's WEB system for literate
programming in Pascal <cite id="Knuth84">.  &hellip
        
When formatted, spaces and line breaks are preserved:
        
<verb>
main ()
{
        /* This is the famous hello world program */
        
        printf("hello world\n");
}
</verb>
        
<sect1>Mathematical Formulas
        
The <tt/qwertz/ document types include elements for describing
mathematical formulas completely within SGML, similar to the system
described in <cite id="daphne89">.  &hellip
        
So, for example, 
        
<dm>
        <sum><ll>i=1<ul>n<opd>x<inf>i</></sum> =
        <in><ll>0<ul>1<opd>f</in>
</dm>
was typed as:
<verb>
<dm>
        <sum><ll>i=1<ul>n<opd>x<inf>i&et>&et;sum> =
        <in><ll>0<ul>1<opd>f&et;in>
&et;dm>
</verb>
        
&hellip
        
<biblio files="lit">
</report>
\end{verbatim}





\bibliographystyle{qwertz}
\bibliography{lit}
\end{document}
