Go to the first, previous, next, last section, table of contents.

Snafu Document Type Declaration

The formal SGML syntax declaration follows.

<!-- Snafu DTD for papers, memos and letters.  Typical invocations:
  <!DOCTYPE spaper PUBLIC "-//Houston//DTD snafu5//EN">
  <!DOCTYPE smemo PUBLIC "-//Houston//DTD snafu5//EN">
  <!DOCTYPE sletter PUBLIC "-//Houston//DTD snafu5//EN">
  -->
<!ENTITY % em "emph | hp1 | hp2 | hp3 | hp0"-- Predefined phrases.  -->
<!ENTITY % lists "ul | ol | sl"-- Basic lists (unordered, ordered, simple). -->
<!ENTITY % refs "hdref | figref | fnref | liref" -- Most cross references.  -->
<!ENTITY % u.phrases "user-defined-phrase">
<!ENTITY % phrases "%em | %u.phrases;" -- All phrase elements.  -->
<!ENTITY % u.notes "user-defined-note">
<!ENTITY % notes "fn | annotate | note | %u.notes;" -- All notes.  -->
<!ENTITY % u.code "user-defined-code">
<!ENTITY % code "code | %u.code;" -- All code.  -->
<!ENTITY % u.listing "user-defined-listing">
<!ENTITY % listing "listing | code-lines  | %u.listing;" -- All listings.  -->
<!-- Phrase model.  -->
<!ENTITY % text "#PCDATA | q | ix | %code; | texeqn | %notes;
	| %phrases;">
<!-- Content models for architectural forms.  -->
<!ENTITY % c.phrases "(%text;)+">
<!ENTITY % c.notes "(p)+ -(%notes; | fig)">
<!ENTITY % c.code "(#PCDATA | ix | %notes;)+">
<!ENTITY % c.listing "(#PCDATA | ix | %notes;)+">
<!ELEMENT spaper O O (paperfront, body, index?)>
<!ELEMENT smemo O O (memofront, body, closing?, signed?)>
<!ELEMENT sletter O O 
	(letterfront, body, closing?, signed?, ps*, enclosure?)>
<!ATTLIST (spaper | smemo | sletter) 
	version CDATA #FIXED "5" -- Version Number.  -->
<!ELEMENT paperfront O O
        (title & docnum? & date? & author & abstract?
	 & copyrite? & thanks? & toc? & figlist?) -(%notes;)>
<!ELEMENT memofront O O
	(from & to & subject & date? & cc? & through? & docnum? & actionby?
	 & x-header*) -(%notes;)>
<!ELEMENT letterfront O O
	((sender? & dest? & subject? & cc? & date? & docnum?), opening?)
	 -(%notes;)>
<!ELEMENT body O O ((p | h1)+, appendix?)>
<!-- Name and address elements.  -->
<!-- ID and IDREF are used in the spaper DTD to associate multiple authors
     with a single address.
  -->
<!ELEMENT name O O (%text;)+ -- Name, probably a person.  -->
<!ATTLIST name address IDREF #IMPLIED>
<!ELEMENT address - O (aline)+ -- Full address.  -->
<!ATTLIST address id ID #IMPLIED>
<!ENTITY % address.comp "org | street | city | region | country | 
	postcode| postbox">
<!ELEMENT aline O O (%text; | %address.comp;)+ -- Address line.  -->
<!ELEMENT (%address.comp;) - - (%text;)+ -- Optional address components.  -->
<!-- Contact details: phone, fax, email etc.  -->
<!ELEMENT contact - O (%text;)+>
<!ATTLIST contact type CDATA #REQUIRED>
<!-- Header elements.  -->
<!ELEMENT subject - O (%text;)+>
<!ELEMENT line O O (%text;)+ -- Line of text.  -->
<!ELEMENT (docnum|date) - O (#PCDATA)>
<!ELEMENT opening - O (%text;)+>
<!ELEMENT closing - O (%text;)+>
<!ELEMENT ps - O (%text;)+>
<!ELEMENT sender - O (address, contact*)>
<!ELEMENT dest - O (name+, address?)>
<!ELEMENT signed - O (name)+>
<!ELEMENT enclosure - O EMPTY>
<!ELEMENT from - O (name)+>
<!ELEMENT to - O (name)+>
<!ELEMENT cc - O (name)+>
<!ELEMENT through - O (name)+>
<!ELEMENT actionby - O (#PCDATA)>
<!ELEMENT x-header - O (x-head-t, (name)+)-- Arbitrary header.  -->
<!ELEMENT x-head-t O O (#PCDATA)-- Tag of arbitrary header.  -->
<!ELEMENT author        - O (name, address?)+>
<!ELEMENT title         - O (line)+>
<!ELEMENT abstract      - O (p)+>
<!ELEMENT copyrite      - O (p)+ +(noprint)>
<!ELEMENT thanks        - O (p)+>
<!ELEMENT noprint       - O (p)+   -- Text to be omitted from hard-copy.  -->
<!ELEMENT (toc|figlist|index)      -- Table of contents, figure list, --
                        - O  EMPTY -- and index have generated content.  -->
<!ELEMENT ix - O (#PCDATA) -- Index entry.  -->
<!ATTLIST ix print CDATA #IMPLIED -- Printed in the text.  -->
<!-- Titled sections.  -->
<!ELEMENT h1 - O (h1t, (p | h2)+)>
<!ELEMENT h2 - O (h2t, (p | h3)+)>
<!ELEMENT h3 - O (h3t, (p | h4)+)>
<!ELEMENT h4 - O (h4t, (p | h5)+)>
<!ELEMENT h5 - O (h5t, p+)>
<!ELEMENT (h1t, h2t, h3t, h4t, h5t) O O (%text;)+>
<!ATTLIST (h1 | h2 | h3 | h4 | h5)
	id ID #IMPLIED>
<!-- Appendix.  -->
<!ELEMENT appendix - O (h1)+>
<!-- Paragraphs and short quotations. -->
<!ELEMENT p O O (%text; | %lists; | tl | %listing;
	| texeqn-display | ref | %refs; | fig)+>
<!ELEMENT q O O (%text;)+>
<!-- Program code etc., conforming to the "code" architectural form.  -->
<!ELEMENT (%code;) - - %c.code;>
<!ATTLIST (%code;)
	sarc NAME #FIXED code>
<!-- Programs etc., conforming to the "listing" architectural form.  -->
<!ELEMENT (%listing;) - - %c.listing;>
<!ATTLIST (%listing;)
	sarc NAME #FIXED listing>
<!-- TeX mathematics.  -->
<!ELEMENT (texeqn | texeqn-display) - - (#PCDATA)>
<!ATTLIST (texeqn | texeqn-display)
	content NOTATION (TeX) TeX>
<!-- Lists.  -->
<!ELEMENT (%lists;) - - (li+)>
<!ELEMENT li - O (p)+ -- List item.  -->
<!ATTLIST li id ID #IMPLIED>
<!ELEMENT tl - - (tli)+ -- Tagged list.  -->
<!ELEMENT tli - O (tlit, tlid)>
<!ELEMENT tlit O O (#PCDATA) -- Tagged list item tag.  -->
<!ELEMENT tlid O O (p)+ -- Tagged list item data.  -->
<!-- Notes, conforming to the "note" architectural form.  -->
<!ELEMENT (%notes;) - - %c.notes;>
<!ATTLIST (fn | note | %u.notes;)
	id ID #IMPLIED
	sarc NAME #FIXED note>
<!ATTLIST (annotate)
	id ID #IMPLIED
	resp CDATA #IMPLIED
	sarc NAME #FIXED note>
<!-- Phrases, conforming to the "phrase" architectural form.  -->
<!ELEMENT (%phrases;) - - %c.phrases;>
<!ATTLIST (%phrases;)
	sarc NAME #FIXED phrase>
<!-- Figures.  -->
<!ELEMENT fig - - (figbody&figcap?) -(fig)>
<!ATTLIST fig 
	id ID #IMPLIED
	float (inline, here, top, bottom, page, float) float>
<!ELEMENT figbody - O EMPTY -- Figure artwork.  -->
<!ATTLIST figbody 
	file ENTITY #IMPLIED
	space NUTOKEN #IMPLIED
	x-scale NUTOKEN 1.0
	y-scale NUTOKEN 1.0
	rotation NUTOKEN 0 -- 0 to 360.  --
	position (left, centre, right) centre>
<!ELEMENT figcap - O (p)+ -- Figure caption.  -->
<!-- Cross references.  -->
<!ELEMENT ref - O (#PCDATA)>
<!ATTLIST ref 
	refid IDREF #CONREF
	type  (count | page) count>
<!ELEMENT (%refs;) - O (#PCDATA)>
<!ATTLIST (%refs;)
	refid IDREF #CONREF
	type (page | nopage) nopage>
<!NOTATION ISO646 PUBLIC "+//ISO/IEC 646:1991//NOTATION IRV//EN">
<!-- alternatively, -->
<!NOTATION ASCII PUBLIC "+//ISO/IEC 646:1991//NOTATION IRV//EN">
<!NOTATION Latin1 PUBLIC "+//ISO/IEC 8859-1:1987//NOTATION Latin1//EN">
<!-- Plain TeX, described by the TeXbook.  -->
<!NOTATION TeX    PUBLIC "+//ISBN 0-201-13448//NOTATION TeX//EN">
<!-- Encapsulated PostScript. The ISBN refers to the PostScript Language
     Reference Manual.  The requirements for "encapsulated" PostScript
     files are described in the paper "Encapsulated PostScript Files
     Specification Version 2.0", 1989 - a copy is included in the xv 
     version 3 source code.  -->
<!NOTATION EPSF PUBLIC "+//ISBN 0-201-10174//NOTATION PostScript//EN">
<!-- Short references.  -->
<!-- Short quotations and paragraphs in the body.  -->
<!ENTITY ptag STARTTAG 'p' >
<!ENTITY qtag STARTTAG 'q'>
<!ENTITY qendtag ENDTAG 'q'>
<!SHORTREF bodymap
	'"' qtag
	'&#RS;B&#RE;' ptag
	'&#RS;&#RE;' ptag>
<!USEMAP bodymap body>
<!-- Colon ends extension header tag.  -->
<!ENTITY x-tag ENDTAG 'x-head-t'>
<!SHORTREF x-map
   ':' x-tag>
<!USEMAP x-map x-head-t>
<!-- End the document header at a blank line.  -->
<!SHORTREF headmap
	'"' qtag
	'&#RS;B&#RE;' ptag
	'&#RS;&#RE;' ptag>
<!USEMAP headmap (paperfront | memofront | letterfront)>
<!-- Seperate lines with a semicolon in some places.  -->
<!ENTITY nametag STARTTAG 'name'>
<!SHORTREF namemap
	';' nametag
	'"' qtag
	'&#RS;B&#RE;' ptag
	'&#RS;&#RE;' ptag>
<!USEMAP namemap name>
<!ENTITY linetag STARTTAG 'line'>
<!SHORTREF linemap
	';' linetag
	'"' qtag
	'&#RS;B&#RE;' ptag
	'&#RS;&#RE;' ptag>
<!USEMAP linemap line>
<!ENTITY alinetag STARTTAG 'aline'>
<!SHORTREF alinemap
	';' alinetag
	'"' qtag
	'&#RS;B&#RE;' ptag
	'&#RS;&#RE;' ptag>
<!USEMAP alinemap aline>
<!-- Blank line ends section title. May contain quotes.  -->
<!SHORTREF titlemap
	'"' qtag
	'&#RS;B&#RE;' ptag
	'&#RS;&#RE;' ptag>
<!USEMAP titlemap (h1t, h2t)>
<!SHORTREF qmap
   '"' qendtag>
<!USEMAP qmap q>
<!USEMAP #EMPTY (code | code-lines | texeqn | texeqn-display)>
<!-- Colon ends item tag in a tagged list.  -->
<!ENTITY tlittag ENDTAG 'tlit'>
<!SHORTREF tlitmap
   ':' tlittag>
<!USEMAP tlitmap tlit>
<!-- Supported character entity sets.  -->
<!ENTITY % ISOnum PUBLIC 
	"ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN">
<!ENTITY % ISOpub PUBLIC 
	"ISO 8879:1986//ENTITIES Publishing//EN">
<!ENTITY % ISOlat1 PUBLIC
       "ISO 8879:1986//ENTITIES Added Latin 1//EN">
<!ENTITY % ISOlat2 PUBLIC
       "ISO 8879:1986//ENTITIES Added Latin 2//EN">
<!ENTITY % ISOdia PUBLIC
       "ISO 8879:1986//ENTITIES Diacritical Marks//EN">
<!ENTITY % ISOtech PUBLIC
       "ISO 8879:1986//ENTITIES General Technical//EN">
%ISOnum; %ISOpub; %ISOlat1; %ISOlat2; %ISOdia; %ISOtech;
<!-- Extra (non-ISO) entities.  -->
<!ENTITY TeX SDATA "[TeX   ]">
<!ENTITY LaTeX SDATA "[LaTeX ]">
<!ENTITY smiley SDATA "[smiley]">
<!ENTITY wsp SDATA "[wsp   ]" -- Interword space.  -->


Go to the first, previous, next, last section, table of contents.