Annotation of Amaya/doc/languages.html, revision 1.1

1.1     ! cvs         1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Draft//EN">
        !             2: <HTML>
        !             3: <HEAD>
        !             4: <TITLE>The Languages of Thot</TITLE>
        !             5: </HEAD>
        !             6: <BODY>
        !             7: 
        !             8: <DIV class="frontmatter" align=center>
        !             9: <H1>The Languages of Thot</H1>
        !            10: 
        !            11: <H3>Vincent Quint</H3>
        !            12: 
        !            13: <H4>translated by Ethan Munson</H4>
        !            14: 
        !            15: <H4>Version of December 14, 1996</H4>
        !            16: 
        !            17: <HR>
        !            18: </DIV>
        !            19: 
        !            20: <DIV class="chapter">
        !            21: <H1>The document model of Thot</H1>
        !            22: 
        !            23: <P>
        !            24: All of the services which Thot provides to the user are based on the system's
        !            25: internal document representation.  This representation is itself derived from
        !            26: the document model which underlies Thot.  The model is presented here, prior
        !            27: to the description of the languages which permit the generic specification of
        !            28: documents.</P>
        !            29: 
        !            30: <DIV class="section">
        !            31: <H2>The logical structure of documents</H2>
        !            32: 
        !            33: <P>
        !            34: The document model of Thot is primarily designed to allow the user to operate
        !            35: on those entities which he has in mind when he works on a document. The model
        !            36: makes no assumptions about the nature of these entities. It is essentially
        !            37: these logical entities, such as paragraphs, sections, chapters, notes, titles,
        !            38: and cross-references which give a document its logical structure.</P>
        !            39: <P>
        !            40: Because of this model, the author can divide his document into chapters,
        !            41: giving each one a title.  The content of these chapters can be further divided
        !            42: into sections, subsections, etc..  The text is organized into successive
        !            43: paragraphs, as a function of the content. In the writing phase, the lines,
        !            44: pages, margins, spacing, fonts, and character styles are not very important.
        !            45: In fact, if the system requires documents to be written in these terms, it
        !            46: gets in the way. So, Thot's model is primarily based on the logical aspect of
        !            47: documents.  The creation of a model of this type essentially requires the
        !            48: definition :</P>
        !            49: <UL>
        !            50: <LI>of the entities which can appear in the documents,
        !            51: <LI>and the relations between these entities.
        !            52: </UL>
        !            53: <P>
        !            54: The choice of entities to include in the model can be subtle.  Some documents
        !            55: require chapters, while others only need various levels of sections. Certain
        !            56: documents contain appendices, others don't.  In different documents the same
        !            57: logical entity may go by different names (e.g. ``Conclusion'' and
        !            58: ``Summary'').  Certain entities which are absolutely necessary in some
        !            59: documents, such as clauses in a contract or the address of the recipient in a
        !            60: letter, are useless in most other cases.</P>
        !            61: <P>
        !            62: The differences between documents result from more than just the entities that
        !            63: appear in them, but also from the relationships between these entities and the
        !            64: ways that they are linked.  In certain documents, notes are spread throughout
        !            65: the document, for example at the bottom of the page containing the
        !            66: cross-reference to them, while in other documents they are collected at the
        !            67: end of each chapter or even at the end of the work.  As another example, the
        !            68: introduction of some documents can contain many sections, while in other
        !            69: documents, the introduction is restricted to be a short sequence of
        !            70: paragraphs.</P>
        !            71: <P>
        !            72: All of this makes it unlikely that a single model can describe any document at
        !            73: a relatively high level.  It is obviously tempting to make up a list of widely
        !            74: used entities, such as chapters, sections, paragraphs, and titles, and then
        !            75: map all other entities onto the available choices.  In this way, an
        !            76: introduction can be supported as a chapter and a contract clause supported as
        !            77: a paragraph or section. However, in trying to widen the range of usage of
        !            78: certain entities, their meaning can be lost and the power of the model
        !            79: reduced.  In addition, while this widening partially solves the problem of
        !            80: choosing entities, it does not solve the problem of their organization: when a
        !            81: chapter must be composed of sections, how does one indicate that an
        !            82: introduction has none when it is merely another chapter?  One solution is to
        !            83: include introductions in the list of supported entities. But then, how does
        !            84: one distinguish those introductions which are allowed to have sections from
        !            85: those which are not.  Perhaps this could be done by defining two types of
        !            86: introduction. Clearly, this approach risks an infinite expansion of the list
        !            87: of widely used entities.</P>
        !            88: </DIV>
        !            89: 
        !            90: <DIV class="section">
        !            91: <H2>Generic and specific structures</H2>
        !            92: 
        !            93: <P>
        !            94: Thus, it is apparently impossible to construct an exhaustive inventory of all
        !            95: those entities which are necessary and sufficient to describe any document. It
        !            96: also seems impossible to specify all possible arrangements of these entities
        !            97: in a document.  This is why Thot uses a <EM>meta-model</EM> instead, which
        !            98: permits the description of numerous <EM>models</EM>, each one describing a
        !            99: <EM>class</EM> of documents.</P>
        !           100: <P>
        !           101: A <EM>class</EM> is a set of documents having very similar structure. Thus,
        !           102: the collection of research reports published by a laboratory constitutes a
        !           103: class; the set of commercial proposals by the sales department of a company
        !           104: constitutes another class; the set of articles published by a journal
        !           105: constitutes a third class.  Clearly, it is not possible to enumerate every
        !           106: possible document class.  It is also clear that new document classes must be
        !           107: created to satisfy new needs and applications.</P>
        !           108: <P>
        !           109: To give a more rigorous definition of classes, we must introduce the ideas of
        !           110: <EM>generic structure</EM> and <EM>specific structure</EM>.  Each document has
        !           111: a <EM>specific structure</EM> which organizes the various parts which comprise
        !           112: it.  We illustrate this with the help of a simple example comparing two
        !           113: reports, A and B (<A href="#specstruct">see Figure</A>). The report A contains
        !           114: an introduction followed by three chapters and a conclusion.  The first
        !           115: chapter contains two sections, the second, three sections.  That is the
        !           116: <EM>specific</EM> structure of document A. Similarly, the structure of
        !           117: document B is: an introduction, two chapters, a conclusion; Chapter 1 has
        !           118: three sections while Chapter 2 has four.  The specific structures of these two
        !           119: documents are thus different.</P>
        !           120: 
        !           121: <DIV class="figure">
        !           122: <HR>
        !           123: <PRE>
        !           124:         Report A                 Report B
        !           125:              Introduction              Introduction
        !           126:              Chapter 1                 Chapter 1
        !           127:                   Section 1.1               Section 1.1
        !           128:                   Section 1.2               Section 1.2
        !           129:              Chapter 2                      Section 1.3
        !           130:                   Section 2.1          Chapter 2
        !           131:                   Section 2.2               Section 2.1
        !           132:                   Section 2.3               Section 2.2
        !           133:              Chapter 3                      Section 2.3
        !           134:              Conclusion                     Section 2.4
        !           135:                                        Conclusion
        !           136: </PRE>
        !           137: <P align=center>
        !           138: <EM><A name="specstruct">Two specific structures</A></EM></P>
        !           139: <HR>
        !           140: </DIV>
        !           141: <P>
        !           142: The <EM>generic structure</EM> defines the ways in which specific structures
        !           143: can be constructed.  It specifies how to generate specific structures.  The
        !           144: reports A and B, though different, are constructed in accordance with the same
        !           145: generic structure, which specifies that a report contains an introduction
        !           146: followed by a variable number of chapters and a conclusion, with each chapter
        !           147: containing a variable number of sections.</P>
        !           148: <P>
        !           149: There is a one-to-one correspondence between a class and a generic structure:
        !           150: all the documents of a class are constructed in accordance with the same
        !           151: generic structure.  Hence the definition of the class: a class is a set of
        !           152: documents whose specific structure is constructed in accordance with the same
        !           153: generic structure.  A class is characterized by its generic structure.</P>
        !           154: <P>
        !           155: Thus, a generic structure can be considered to be a model at the level which
        !           156: interests us, but only for one class of documents.  When the definition is
        !           157: limited to a single class of documents, it is possible to define a model which
        !           158: does a good job of representing the documents of the class, including the
        !           159: necessary entities and unencumbered by useless entities.  The description of
        !           160: the organization of the documents in the class can then be sufficiently
        !           161: precise.</P>
        !           162: </DIV>
        !           163: 
        !           164: <DIV class="section">
        !           165: <H2>Logical structure and physical structure</H2>
        !           166: 
        !           167: <P>
        !           168: Generic structures only describe the <EM>logical</EM> organization of
        !           169: documents, not their <EM>physical</EM> presentation on a screen or on sheets
        !           170: of paper.  However, for a document to be displayed or printed, its graphic
        !           171: presentation must be taken into account.</P>
        !           172: <P>
        !           173: An examination of current printed documents shows that the details of
        !           174: presentation essentially serve to bring out their logical structure. Outside
        !           175: of some particular domains, notably advertising, the presentation is rarely
        !           176: independent of the logical organization of the text.  Moreover, the art of
        !           177: typography consists of enhancing the organization of the text being set,
        !           178: without catching the eye of the reader with overly pronounced effects.  Thus,
        !           179: italic and boldface type are used to emphasize words or expressions which have
        !           180: greater significance than the rest of the text: keywords, new ideas,
        !           181: citations, book titles, etc.  Other effects highlight the organization of the
        !           182: text: vertical space, margin changes, page breaks, centering, eventually
        !           183: combined with the changes in the shapes or weight of the characters. These
        !           184: effects serve to indicate the transitions between paragraphs, sections, or
        !           185: chapters: an object's level in the logical structure of the document is shown
        !           186: by the markedness of the effects.</P>
        !           187: <P>
        !           188: Since the model permits the description of all of the logical structure of the
        !           189: document, the presentation can be derived from the model without being
        !           190: submerged in the document itself.  It suffices to use the logical structure of
        !           191: the document to make the desired changes in its presentation: changes in type
        !           192: size, type style, spacing, margin, centering, etc.</P>
        !           193: <P>
        !           194: Just as one cannot define a unique generic logical structure for all document
        !           195: classes, one cannot define universal presentation rules which can be applied
        !           196: to all document classes.  For certain types of documents the chapter titles
        !           197: will be centered on the page and printed in large, bold type.  For other
        !           198: documents, the same chapter titles will be printed in small, italic type and
        !           199: aligned on the left margin.</P>
        !           200: <P>
        !           201: Therefore, it is necessary to base the presentation specifications for
        !           202: documents on their class.  Such a specification can be very fine-grained,
        !           203: because the presentation is expressed in terms of the entities defined in the
        !           204: generic logical structure of the class.  Thus, it is possible to specify a
        !           205: different presentation for the chapter titles and the section titles, and
        !           206: similarly to specify titles for the sections according to their level in the
        !           207: section hierarchy.  The set of rules which specify the presentation of all the
        !           208: elements defined in a generic logical structure is called a <EM>generic
        !           209: presentation</EM>.</P>
        !           210: <P>
        !           211: There are several advantages derived from having a presentation linked to the
        !           212: generic structure and described by a generic presentation. Homogeneity is the
        !           213: first.  Since every document in a class corresponds to the same generic
        !           214: logical structure, a homogenous presentation for different documents of the
        !           215: same class can be assured by applying the same generic presentation to all
        !           216: documents of the class.  Homogeneity of presentation can also be found among
        !           217: the entities of a single document: every section title will be presented  in
        !           218: the same way, the first line of every paragraph of the same type will have the
        !           219: same indentation, etc.</P>
        !           220: <P>
        !           221: Another advantage of this approach to presentation is that it facilitates
        !           222: changes to the graphical aspect of documents.  A change to the generic
        !           223: presentation rules attached to each type of entity will alter the presentation
        !           224: of the entire document, and will do so homogenously.  In this case, the
        !           225: internal homogeneity of the class is no longer assured, but the way to control
        !           226: it is simple.  It suffices to adopt a single generic presentation for the
        !           227: entire class.</P>
        !           228: <P>
        !           229: If the presentation of the class does not have to be homogenous, then the
        !           230: appearance of the document can be adapted to the way it will be used or to the
        !           231: device used to render it.  This quality is sufficient to allow the existence
        !           232: of <A name="mulpres">many generic presentations</A> for the same document
        !           233: class. By applying one or the other of these presentations to it, the document
        !           234: can be seen under different graphical aspects.  It must be emphasized that
        !           235: this type of modification of the presentation is not a change to the document
        !           236: itself (in its specific logical structure or its content), but only in its
        !           237: appearance at the time of editing or printing.</P>
        !           238: </DIV>
        !           239: 
        !           240: <DIV class="section">
        !           241: <H2>Document structures and object structures</H2>
        !           242: 
        !           243: <P>
        !           244: So far, we have only discussed the global structure of documents and have not
        !           245: considered the contents found in that structure.  We could limit ourselves to
        !           246: purely textual contents by assuming that a title or a paragraph contains a
        !           247: simple linear text.  But this model would be too restrictive.  In fact,
        !           248: certain documents contain not only text, but also contain tables,  diagrams,
        !           249: photographs, mathematical formulas, and program fragments.  The model must
        !           250: permit the representation of such <EM>objects</EM>.</P>
        !           251: <P>
        !           252: Just as with the whole of the document, the model takes into account the
        !           253: logical structure of objects of this type.  Some are clearly structured,
        !           254: others are less so.  Logical structure can be recognized in mathematical
        !           255: formulas, in tables, and in certain types of diagrams.  On the other hand, it
        !           256: is difficult to define the structure of a photograph or of some drawings.  But
        !           257: in any case, it does not seem possible to define one unique structure which
        !           258: can represent every one of these types of objects.  The approach taken in the
        !           259: definition of meta-structure and document classes also applies to objects.
        !           260: Object classes can be defined which put together objects of similar type,
        !           261: constructed from the same generic logical structure.</P>
        !           262: <P>
        !           263: Thus, a mathematical class can be defined and have a generic logical structure
        !           264: associated with it.  But even if a single generic structure can represent a
        !           265: sufficient variety of mathematical formulas, for other objects with less
        !           266: rigorous structure, multiple classes must be defined.  As for documents, using
        !           267: multiple classes assures that the model can describe the full range of objects
        !           268: to be presented.  It also permits the system to support objects which were not
        !           269: initially anticipated.  Moreover, this comment applies equally to mathematics:
        !           270: different classes of formulas can be described depending on the domain of
        !           271: mathematics being described.</P>
        !           272: <P>
        !           273: Since objects have the same level of logical representation as documents, they
        !           274: gain the same advantages.  In particular, it is possible to define the
        !           275: presentation separately from the objects themselves and attach it to the
        !           276: class.  Thus, as for documents, objects of the same type have a uniform
        !           277: presentation and the presentation of every object in a given class can be
        !           278: changed simply by changing the generic presentation of the class.  Another
        !           279: advantage of using this document model is that the system does not bother the
        !           280: user with the details of presentation, but rather allows the user to
        !           281: concentrate on the logical aspect of the document and the objects.</P>
        !           282: <P>
        !           283: It is clear that the documents in a class do not necessarily use the same
        !           284: classes of objects: one technical report will contain tables while another
        !           285: report will have no tables but will use mathematical formulas. The usable
        !           286: object classes are not mentioned in a limiting way in the generic logical
        !           287: structure of documents.  Rather, they can be chosen freely from a large set,
        !           288: independent of the document class.</P>
        !           289: <P>
        !           290: Thus, the object classes will be made commonplace and usable in every
        !           291: document. The notion of ``object'' can be enlarged to include not only
        !           292: non-textual elements, but also certain types of textual elements which can
        !           293: appear in practically every document, whatever their class.  Among these
        !           294: textual elements, one can mention certain elements defined by LaTeX as
        !           295: <EM>environments</EM>: enumerations, descriptions, examples, quotations, even
        !           296: paragraphs.</P>
        !           297: <P>
        !           298: Thus, the document model is not a single, general model describing every type
        !           299: of document in one place.  Rather, it is a meta-model which can be used to
        !           300: describe many different models each of which represents either a class of
        !           301: similar documents or a class of similar objects which every document can
        !           302: include.</P>
        !           303: </DIV>
        !           304: <HR>
        !           305: </DIV>
        !           306: 
        !           307: <DIV class="chapter">
        !           308: <H1>The S language</H1>
        !           309: 
        !           310: 
        !           311: <DIV class="section">
        !           312: <H2>Document meta-structure</H2>
        !           313: 
        !           314: <P>
        !           315: Since the concept of meta-structure is well suited to the task of describing
        !           316: documents at a high level of abstraction, this meta-structure must be
        !           317: precisely defined.  Toward that end this section first presents the basic
        !           318: elements from which documents and structured objects are composed and then
        !           319: specifies the ways in which these basic elements are assembled into structures
        !           320: representing complete documents and objects.</P>
        !           321: 
        !           322: <DIV class="subsection">
        !           323: <H3>The basic types</H3>
        !           324: 
        !           325: <P>
        !           326: At the lowest level of a document's structure, the first atom considered is
        !           327: the character.  However, since characters are seldom isolated, usually
        !           328: appearing as part of a linear sequence, and in order to reduce the complexity
        !           329: of the document structure, <EM>character strings</EM> are used as atoms and
        !           330: consecutive characters belonging to the same structural element are grouped in
        !           331: the same character string.</P>
        !           332: <P>
        !           333: If the structure of a document is not refined to go down to  the level of
        !           334: words or phrases, the contents of a simple paragraph can be considered to be a
        !           335: single character string.  On the other hand, the title of a chapter, the title
        !           336: of the first section of that chapter, and the text of the first paragraph of
        !           337: that section constitute three different character strings, because they belong
        !           338: to distinct structural elements.</P>
        !           339: <P>
        !           340: If, instead, a very fine-grained representation for the structure of a
        !           341: document is sought, character strings could be defined to contain only a
        !           342: single word, or even just a single character.  This is the case, for example,
        !           343: in programs,  for which one wants to retain a structure very close to the
        !           344: syntax of the programming language.  In this case, a assignment statement
        !           345: initializing a simple variable to zero would be composed of two structural
        !           346: elements, the identifier of the variable (a short character string) and the
        !           347: assigned value (a string of a single character, `0').</P>
        !           348: <P>
        !           349: The character string is not the only atom necessary for representing those
        !           350: documents that interest us.  It suffices for purely textual documents, but as
        !           351: soon as the non-textual objects which we have considered arise, there must be
        !           352: other atoms; the number of objects which are to be represented determines the
        !           353: number of types of atoms that are necessary.</P>
        !           354: <P>
        !           355: Primitive <EM>graphical elements</EM> are used for tables and figures of
        !           356: different types.  These elements are simple geometric shapes like horizontal
        !           357: or vertical lines, which are sufficient for tables, or even oblique lines,
        !           358: arrows, rectangles, and circles for use in figures. From these elements and
        !           359: character strings, graphical objects and tables can be constructed.</P>
        !           360: <P>
        !           361: Photographs, though having very little structure, must still appear in
        !           362: documents.  They are supported by <EM>image</EM> elements, which are
        !           363: represented as matrices of points.</P>
        !           364: <P>
        !           365: Finally, mathematical notations require certain elements which are
        !           366: simultaneously characters and graphical elements, the <EM>symbols</EM>. By way
        !           367: of example, Radicals, integration signs, or even large parentheses are
        !           368: examples of this type of atom.  The size of each of these symbols is
        !           369: determined by its environment, that is to say, by the expression to which it
        !           370: is attached.</P>
        !           371: <P>
        !           372: To summarize, the primitive elements which are used in the construction of
        !           373: documents and structured objects are:</P>
        !           374: <UL>
        !           375: <LI>character strings,
        !           376: <LI>graphical elements,
        !           377: <LI>images,
        !           378: <LI>and mathematical symbols.
        !           379: </UL>
        !           380: </DIV>
        !           381: 
        !           382: <DIV class="subsection">
        !           383: <H3>Constructed elements</H3>
        !           384: 
        !           385: <P>
        !           386: A document is evidently formed from primitive elements.  But the model of Thot
        !           387: also proposes higher level elements.  Thus, in a document composed of several
        !           388: chapters, each chapter is an element, and in the chapters each section is also
        !           389: an element, and so on.  A document is thus an organized set of elements.</P>
        !           390: <P>
        !           391: In a document there are different sorts of elements.  Each element has a
        !           392: <EM>type</EM> which indicates the role of the element within the document as a
        !           393: whole.  Thus, we have, for example, the chapter and section types.  The
        !           394: document is made up of typed elements: elements of the type chapter and
        !           395: elements of the type section, among others, but also character string elements
        !           396: and graphical elements: the primitive elements are typed elements just as
        !           397: well.  At the other extreme, the document itself is also considered to be a
        !           398: typed element.</P>
        !           399: <P>
        !           400: The important difference between the primitive elements and the other elements
        !           401: of the document is that the primitive elements are atoms (they cannot be
        !           402: decomposed), whereas the others, called <EM>constructed elements</EM>, are
        !           403: composed of other elements, which can either be primitive elements or
        !           404: constructed elements.  A constructed element of type chapter (or more simply,
        !           405: ``a chapter'') is composed of sections, which are also constructed elements. A
        !           406: paragraph, a constructed element, can be made up of character strings, which
        !           407: are primitive elements, and of equations, which are constructed elements.</P>
        !           408: <P>
        !           409: A parallel can be made between the element types and the data types of
        !           410: programming languages, such as C.  The four primitive types of Thot are
        !           411: comparable to the standard primitive types of C: integer, character, and real,
        !           412: for instance.  The types of constructed elements are comparable to the
        !           413: structured types of C which each programmer defines from the primitive
        !           414: types.</P>
        !           415: <P>
        !           416: A document is also a constructed element.  This is an important point. In
        !           417: particular, it allows a document to be treated as part of another document,
        !           418: and conversely, permits a part of a document to be treated as a complete
        !           419: document.  Thus, an article presented in a journal is treated by its author as
        !           420: a document in itself, while the editor of the journal considers it to be part
        !           421: of an issue.  A table or a figure appearing in a document can be extracted and
        !           422: treated as a complete document, for example to prepare transparencies for a
        !           423: conference.</P>
        !           424: <P>
        !           425: These thoughts about types and constructed elements apply just as well to
        !           426: objects as they do to documents.  A table is a constructed element made up of
        !           427: other constructed elements, rows and columns.  A row is formed of cells, which
        !           428: are also constructed elements which contain primitive elements (character
        !           429: strings) and/or constructed elements like equations.</P>
        !           430: </DIV>
        !           431: 
        !           432: <DIV class="subsection">
        !           433: <H3>Logical structure constructors</H3>
        !           434: 
        !           435: <P>
        !           436: Having defined the primitive elements and the constructed elements, it is now
        !           437: time to define the types of organization which allow the building of
        !           438: structures.  For this, we rely on the notion of the <EM>constructor</EM>.  A
        !           439: constructor defines a way of assembling certain elements in a structure.  It
        !           440: resides at the level of the meta-structure: it does not describe the existing
        !           441: relations in a given structure, but rather defines  how elements are assembled
        !           442: to build a structure that conforms to a model.  In comparison with C, the
        !           443: constructors correspond to the methods for building structured data types:
        !           444: arrays and structures.</P>
        !           445: <P>
        !           446: In defining the overall organization of documents, the first two constructors
        !           447: considered are the aggregate and the list.</P>
        !           448: 
        !           449: <DIV class="subsubsection">
        !           450: <H4>Aggregate and List</H4>
        !           451: 
        !           452: <P>
        !           453: The <EM>aggregate</EM> constructor is used to define constructed element types
        !           454: which are collections of a given number of other elements. These collections
        !           455: may or may not be ordered.  The elements may be either constructed or
        !           456: primitive and are specified by their type.  A report (that is, a constructed
        !           457: element of the report type) has an aggregate structure.  It is formed from a
        !           458: title, an author's name, an introduction, a body, and a conclusion, making it
        !           459: a collection of five element types.  This type of constructor is found in
        !           460: practically every document, and generally at several levels in a document.</P>
        !           461: <P>
        !           462: The <EM>list</EM> constructor is used to define constructed elements which are
        !           463: ordered sequences of elements (constructed or primitive) having the same type.
        !           464: The minimum and maximum numbers of elements for the sequence can be specified
        !           465: in the list constructor or the number of elements can be left unconstrained.
        !           466: The body of a report is a list of chapters and is typically required to
        !           467: contain a minimum of two chapters (is a chapter useful if it is the only one
        !           468: in the report?) The chapter itself can contain a list of sections, each
        !           469: section containing a list of paragraphs.  The list constructor corresponds to
        !           470: a one-dimensional array in C.  In the same way as the aggregate, the list is a
        !           471: very frequently used constructor in every type of document.  However, these
        !           472: two constructors are not sufficient to describe every document structure; thus
        !           473: other constructors supplement them.</P>
        !           474: </DIV>
        !           475: 
        !           476: <DIV class="subsubsection">
        !           477: <H4><A name="schemasandunits">Choice, Schema, and Unit</A></H4>
        !           478: 
        !           479: <P>
        !           480: The <EM>choice</EM> constructor is used to define the structure of an element
        !           481: type for which one alternative is chosen from several possibilities. Thus, a
        !           482: paragraph can be either a simple text paragraph, or an enumeration, or a
        !           483: citation.  The choice constructor can be compared to the variant parts of
        !           484: structures in C.</P>
        !           485: <P>
        !           486: The choice constructor indicates the complete list of possible options, which
        !           487: can be too restrictive in certain cases, the paragraph being one such case.
        !           488: Two constructors, <EM>unit</EM> and <EM>schema</EM>, address this
        !           489: inconvenience.  They allow more freedom in the choice of an element type.  If
        !           490: a paragraph is defined by a schema constructor, it is possible to put in the
        !           491: place of a paragraph a table, an equation, a drawing or any other object
        !           492: defined by another generic logical structure.  It is also possible to define a
        !           493: paragraph as a sequence of units, which could be character strings, symbols,
        !           494: or images.  The choice constructor alone defines a generic logical structure
        !           495: that is relatively constrained; in contrast, using units and schemas, a very
        !           496: open structure can be defined.</P>
        !           497: <P>
        !           498: The <EM>schema</EM> constructor represents an object defined by a generic
        !           499: logical structure chosen freely from among those available.</P>
        !           500: <P>
        !           501: The <EM>unit</EM> constructor represents an element whose type can be either a
        !           502: primitive type or an element type defined as a unit in the generic logical
        !           503: structure of the document, or in another generic logical structure used in the
        !           504: document.  Such an element may be used in document objects constructed
        !           505: according to other generic structures.</P>
        !           506: <P>
        !           507: Thus, for example, if a cross-reference to a footnote is defined in the
        !           508: generic logical structure ``Article'' as a unit, a table (an object defined by
        !           509: another generic structure) can contain cross-references to footnotes, when
        !           510: they appear in an article.  In another type of document, a table defined by
        !           511: the same generic structure can contain other types of elements, depending on
        !           512: the type of document into which the table is inserted.  All that is needed is
        !           513: to declare, in the generic structure for tables, that the contents of cells
        !           514: are units.  In this way, the generic structure of objects is divided up
        !           515: between different types of documents which are able to adapt themselves to the
        !           516: environment into which they are inserted.</P>
        !           517: </DIV>
        !           518: 
        !           519: <DIV class="subsubsection">
        !           520: <H4>Reference and Inclusion</H4>
        !           521: 
        !           522: <P>
        !           523: The <EM>reference</EM> is the last constructor.  It is used to define document
        !           524: elements that are cross-references to other elements, such as a section, a
        !           525: chapter, a bibliographic citation, or a figure.  The reference can be compared
        !           526: to the pointer in C, but in contrast to the pointer, the reference is
        !           527: bi-directional.  The reference can be used to access both the element being
        !           528: cross-referenced and each of the elements which make use of the
        !           529: cross-reference.</P>
        !           530: <P>
        !           531: References can be either <EM>internal</EM> or <EM>external</EM>.  That is,
        !           532: they can designate elements which appear in the same document or in another
        !           533: document.</P>
        !           534: <P>
        !           535: The <EM><A name="inclusion">inclusion</A></EM> constructor is a special type
        !           536: of reference.  Like the reference, it is an internal or external bidirectional
        !           537: link, but it is not a cross-reference.  This link represents the ``live''
        !           538: inclusion of the designated element; it accesses the most recent version of
        !           539: that element and not a ``dead'' copy, fixed in the state in which it was found
        !           540: at the moment the copy was made.  As soon as an element is modified, all of
        !           541: its inclusions are automatically brought up to date.  It must be noted that,
        !           542: in addition to inclusion, the Thot editor permits the creation of ``dead''
        !           543: copies.</P>
        !           544: <P>
        !           545: There are three types of inclusions: inclusions with full expansion,
        !           546: inclusions with partial expansion, and inclusions without expansion. During
        !           547: editing, inclusions without expansion are represented on the screen by the
        !           548: name of the included document, in a special color, while inclusions with
        !           549: expansion (full or partial) are represented by a copy (full or partial) of the
        !           550: included element (also in a special color). The on-screen representation of a
        !           551: partial inclusion is a <A href="#skeleton">``skeleton''</A> image of the
        !           552: included document.</P>
        !           553: <P>
        !           554: Inclusion with complete expansion can be used to include parts of the same
        !           555: document or of other documents.  Thus, it can be either an internal or an
        !           556: external link.  It can be used to include certain bibliographic entries of a
        !           557: scientific article in another article, or to copy part of a mathematical
        !           558: formula into another formula of the same document, thus assuring that both
        !           559: copies will remain synchronized.</P>
        !           560: <P>
        !           561: Inclusion without expansion or with partial expansion is used to include
        !           562: complete documents.  It is always an external link.  It is used primarily to
        !           563: divide very large documents into sub-documents that are easier to manipulate,
        !           564: especially when there are many authors.  So, a book can include some chapters,
        !           565: where each chapter is a different document which can be edited separately.
        !           566: When viewing the book on the screen, it might be desirable to see only the
        !           567: titles of the chapters and sections.  This can be achieved using inclusion
        !           568: with partial expansion.</P>
        !           569: <P>
        !           570: During printing, inclusions without expansion or with partial expansion can be
        !           571: represented either as they were shown on the screen or by a complete (and
        !           572: up-to-date) copy of the included element or document.</P>
        !           573: <P>
        !           574: The inclusion constructor, whatever its type, respects the generic structure:
        !           575: only those elements authorized by the generic structure can be included at a
        !           576: given position in a document.</P>
        !           577: </DIV>
        !           578: 
        !           579: <DIV class="subsubsection">
        !           580: <H4>Mark pairs</H4>
        !           581: 
        !           582: <P>
        !           583: It is often useful to delimit certain parts of a document independently from
        !           584: the logical structure.  For example, one might wish to attach some information
        !           585: (in the form of an <A href="#attributes">attribute,</A>) or a particular
        !           586: treatment to a group of words or a set of consecutive paragraphs. <EM>Mark
        !           587: pairs</EM> are used to do this.</P>
        !           588: <P>
        !           589: Mark pairs are elements which are always paired and are terminals in the
        !           590: logical structure of the document.  Their position in the structure of the
        !           591: document is defined in the generic structure.  It is important to note that
        !           592: when the terminals of a mark pair are <EM>extensions</EM> (see the next
        !           593: section), they can be used quite freely.</P>
        !           594: </DIV>
        !           595: 
        !           596: <DIV class="subsubsection">
        !           597: <H4><A name="restrictionextensions">Restrictions and Extensions</A></H4>
        !           598: 
        !           599: <P>
        !           600: The primitive types and the constructors presented so far permit the
        !           601: definition of the logical structure of documents and objects in a rigorous
        !           602: way.  But this definition can be very cumbersome in certain cases, notably
        !           603: when trying to constrain or extend the authorized element types in a
        !           604: particular context.  <EM>Restrictions</EM> and <EM>extensions</EM> are used to
        !           605: simplify these cases.</P>
        !           606: <P>
        !           607: A restriction associates with a particular element type <EM>A</EM>, a list of
        !           608: those element types which elements of type <EM>A</EM> may not contain, even if
        !           609: the definition of type <EM>A</EM> and those of its components authorize them
        !           610: otherwise.  This simplifies the writing of generic logical structures and
        !           611: allows limitations to be placed, when necessary, on the choices offered by the
        !           612: schema and unit constructors.</P>
        !           613: <P>
        !           614: Extensions are the inverse of restrictions.  They identify a list of element
        !           615: types whose presence <EM>is</EM> permitted, even if its definition and those
        !           616: of its components do not authorize them otherwise.</P>
        !           617: </DIV>
        !           618: 
        !           619: <DIV class="subsubsection">
        !           620: <H4>Summary</H4>
        !           621: 
        !           622: <P>
        !           623: Thus, four constructors are used to construct a document:</P>
        !           624: <UL>
        !           625: <LI>the aggregate constructor,
        !           626: <LI>the list constructor,
        !           627: <LI>the choice constructor and its extensions, the unit and
        !           628: schemaconstructors,
        !           629: <LI>the reference constructor and its variant, the inclusion.
        !           630: </UL>
        !           631: <P>
        !           632: These constructors are also sufficient for objects.  Thus, these constructors
        !           633: provide a homogenous meta-model which can describe both the organization of
        !           634: the document as a whole and that of the various types of objects which it
        !           635: contains.  After presenting the description language for generic structures,
        !           636: we will present several examples which illustrate the appropriateness of the
        !           637: model.</P>
        !           638: <P>
        !           639: The first three constructors (aggregate, list and choice) lead to tree-like
        !           640: structures for documents and objects, the objects being simply the subtrees of
        !           641: the tree of a document (or even of other objects' subtrees).  The reference
        !           642: constructor introduces other, non-hierarchical, relations which augment those
        !           643: of the tree: when a paragraph makes reference to a chapter or a section, that
        !           644: relation leaves the purely tree-like structure.  Moreover,  external reference
        !           645: and inclusion constructors permit the establishment of links between different
        !           646: documents, thus creating a hypertext structure.</P>
        !           647: </DIV>
        !           648: </DIV>
        !           649: 
        !           650: <DIV class="subsection">
        !           651: <H3><A name="assocelem">Associated Elements</A></H3>
        !           652: 
        !           653: <P>
        !           654: Thanks to the list, aggregate and choice constructors, the organization of the
        !           655: document is specified rigorously, using constructed and primitive elements.
        !           656: But a document is made up of more than just its elements; it clearly also
        !           657: contains links between them.  There exist elements whose position in the
        !           658: document's structure is not determinable.  This is notably the case for
        !           659: figures and notes.  A figure can be designated at many points in the same
        !           660: document and its place in the physical document can vary over the life of the
        !           661: document without any effect on the meaning or clarity of the document.  At one
        !           662: time, it can be placed at the end of the document along with all other
        !           663: figures.  At another time, it can appear at the top of the page which follows
        !           664: the first mention of the figure.  The figures can be dispersed throughout the
        !           665: document or can be grouped together.  The situation is similar for notes,
        !           666: which can be printed at the bottom of the page on which they are mentioned or
        !           667: assembled together at the end of the chapter or even the end of the work.  Of
        !           668: course, this brings up questions of the physical position of elements in
        !           669: documents that are broken into pages, but this reflects the structural
        !           670: instability of these elements.  They cannot be treated the same way as
        !           671: elements like paragraphs or sections, whose position in the structure is
        !           672: directly linked to the semantics of the document.</P>
        !           673: <P>
        !           674: Those elements whose position in the structure of the document is not fixed,
        !           675: even though they are definitely part of the document, are called
        !           676: <EM>associated elements</EM>.  Associated elements are themselves structures,
        !           677: which is to say that their content can be organized logically by the
        !           678: constructors from primitive and constructed elements.</P>
        !           679: <P>
        !           680: It can happen that the associated elements are totally disconnected from the
        !           681: structure of the document, as in a commentary or appraisal of the entire work.
        !           682: But more often, the associated elements are linked to the content of the
        !           683: document by references.  This is generally the case for notes and figures,
        !           684: among others.</P>
        !           685: <P>
        !           686: Thus, associated elements introduce a new use for the reference constructor.
        !           687: It not only serves to create links between elements of the principal structure
        !           688: of the document, but also serves to link the associated elements to the
        !           689: primary structure.</P>
        !           690: </DIV>
        !           691: 
        !           692: <DIV class="subsection">
        !           693: <H3><A name="attributes">Attributes</A></H3>
        !           694: 
        !           695: <P>
        !           696: There remain logical aspects of documents that are not entirely described by
        !           697: the structure.  Certain types of semantic information, which are not stated
        !           698: explicitly in the text, must also be taken into account.  In particular, such
        !           699: information is shown by typographic effects which do not correspond to a
        !           700: change between structural elements.  In fact, certain titles are set in bold
        !           701: or italic or are printed in a different typeface from the rest of the text in
        !           702: order to mark them as structurally distinct.  But these same effects
        !           703: frequently appear in the middle of continuous text (e.g. in the interior of a
        !           704: paragraph).  In this case, there is no change between structural elements; the
        !           705: effect serves to highlight a word, expression, or phrase.  The notion of an
        !           706: <EM>attribute</EM> is used to express this type of information.</P>
        !           707: <P>
        !           708: An attribute is a piece of information attached to a structural element which
        !           709: augments the type of the element and clarifies its function in the document.
        !           710: Keywords, foreign language words, and titles of other works can all be
        !           711: represented by character strings with attached attributes.  Attributes may
        !           712: also be attached to constructed elements.  Thus, an attribute indicating the
        !           713: language can be attached to a single word or to a large part of a
        !           714: document.</P>
        !           715: <P>
        !           716: In fact, an attribute can be any piece of information which is linked to a
        !           717: part of a document and which can be used by agents which work on the document.
        !           718: For example, the language in which the document is written determines the set
        !           719: of characters used by an editor or formatter.  It also determines the
        !           720: algorithm or hyphenation dictionary to be used.  The attribute ``keyword''
        !           721: facilitates the work of an information retrieval system.  The attribute
        !           722: ``index word'' allows a formatter to automatically construct an index at the
        !           723: end of the document.</P>
        !           724: <P>
        !           725: As with the types of constructed elements, the attributes and the values they
        !           726: can take are defined separately in each generic logical structure, not in the
        !           727: meta-model, according to the needs of the document class or the nature of the
        !           728: object.</P>
        !           729: <P>
        !           730: Many types of attributes are offered: numeric, textual, references, and
        !           731: enumerations:</P>
        !           732: <UL>
        !           733: <LI><EM>Numeric attributes</EM> can take integer values (negative,positive, or
        !           734: null).
        !           735: <LI><EM>Textual attributes</EM> have as their values character strings.
        !           736: <LI><EM>Reference attributes</EM> designate an element of the
        !           737: logicalstructure.
        !           738: <LI><EM>Enumeration attributes</EM> can take one value from a limitedlist of
        !           739: possible values, each value being a name.
        !           740: </UL>
        !           741: <P>
        !           742: In a generic structure, there is a distinction between <EM>global
        !           743: attributes</EM> and <EM>local attributes</EM>.  A global attribute can be
        !           744: applied to every element type defined in the generic structure where it is
        !           745: specified.  In contrast, a local attribute can only be applied to certain
        !           746: types of elements, even only a single type.  The ``language'' attribute
        !           747: presented above is an example of a global attribute.  An example of a local
        !           748: attribute is the rank of an author (principal author of the document or
        !           749: secondary author): this attribute can only be applied sensibly to an element
        !           750: of the ``author'' type.</P>
        !           751: <P>
        !           752: Attributes can be assigned to the elements which make up the document in many
        !           753: different ways.  The author can freely and dynamically place them on any part
        !           754: of the document in order to attach supplementary information of his choice.
        !           755: However, attributes may only be assigned in accordance with the rules of the
        !           756: generic structure; in particular, local attributes can only be assigned to
        !           757: those element types for which they are defined.</P>
        !           758: <P>
        !           759: In the generic structure, certain local attributes can be made mandatory for
        !           760: certain element types.  In this case, the Thot editor automatically associates
        !           761: the attribute with the elements of this type and it requires the user to
        !           762: provide a value for this attribute.</P>
        !           763: <P>
        !           764: Attributes can also be automatically assigned, with a given value, by every
        !           765: application processing the document in order to systematically add a piece of
        !           766: information to certain predefined elements of the document.  By way of
        !           767: example, in a report containing a French abstract and an English abstract,
        !           768: each of the two abstracts is defined as a sequence of paragraphs.  The first
        !           769: abstract has a value of ``French'' for the ``language'' attribute while the
        !           770: second abstract's ``language'' attribute has a value of ``English''.</P>
        !           771: <P>
        !           772: In the case of mark pairs, attributes are logically associated with the pair
        !           773: as a whole, but are actually attached to the first mark.</P>
        !           774: </DIV>
        !           775: 
        !           776: <DIV class="subsection">
        !           777: <H3>Discussion of the model</H3>
        !           778: 
        !           779: <P>
        !           780: The notions of attribute, constructor, structured element, and associated
        !           781: element are used in the definition of generic logical structures of documents
        !           782: and objects.  The problem is to assemble them to form generic structures.  In
        !           783: fact, many types of elements and attributes can be found in a variety of
        !           784: generic structures.  Rather than redefine them for each structure in which
        !           785: they appear, it is best to share them between structures. The object classes
        !           786: already fill this sharing function.  If a mathematical class is defined, its
        !           787: formulas can be used in many different document classes, without redefining
        !           788: the structure of each class.  This problem arises not only for the objects
        !           789: considered here; it also arises for the commonplace textual elements found in
        !           790: many document classes.  This is the reason why the notion of object is so
        !           791: broad and why paragraphs and enumerations are also considered to be objects.
        !           792: These object classes not only permit the sharing of the structures of
        !           793: elements, but also of the attributes defined in the generic structures.</P>
        !           794: <P>
        !           795: Structure, such as that presented here, can appear very rigid, and it is
        !           796: possible to imagine that a document editing system based on this model could
        !           797: prove very constraining to the user.  This is, in fact, a common criticism of
        !           798: syntax-directed editors.  This defect can be avoided with Thot, primarily for
        !           799: three reasons:</P>
        !           800: <UL>
        !           801: <LI>the generic structures are not fixed in the model itself,
        !           802: <LI>the model takes the dynamics of documents into account,
        !           803: <LI>the constructors offer great flexibility.
        !           804: </UL>
        !           805: <P>
        !           806: When the generic structure of a document is not predefined, but rather is
        !           807: constructed specifically for each document class, it can be carefully adapted
        !           808: to the current needs.  In cases where the generic structure is inadequate for
        !           809: a particular document of the class, it is always possible either to create a
        !           810: new class with a generic structure well suited to the new case or to extend
        !           811: the generic structure of the existing class to take into account the specifics
        !           812: of the document which poses the problem.  These two solutions can also be
        !           813: applied to objects whose structures prove to be poorly designed.</P>
        !           814: <P>
        !           815: The model is sufficiently flexible to take into account all the phases of the
        !           816: life of the document.  When a generic structure specifies that a report must
        !           817: contain a title, an abstract, an introduction, at least two chapters, and a
        !           818: conclusion, this means only that a report, <EM>upon completion</EM>, will have
        !           819: to contain all of these elements.  When the author begins writing, none of
        !           820: these elements is present.  The Thot editor uses this model.  Therefore, it
        !           821: tolerates documents which do not conform strictly to the generic structure of
        !           822: their class;  it also considers the generic logical structure to be a way of
        !           823: helping the user in the construction of a complex document.</P>
        !           824: <P>
        !           825: In contrast, other applications may reject a document which does not conform
        !           826: strictly to its generic structure.  This is, for example, what is done by
        !           827: compilers which refuse to generate code for a program which is not
        !           828: syntactically correct.  This might also occur when using a document
        !           829: application for a report which does not have an abstract or title.</P>
        !           830: <P>
        !           831: The constructors of the document model bring a great flexibility to the
        !           832: generic structures.  A choice constructor (and even more, a unit or schema
        !           833: constructor)  can represent several, very different elements. The list
        !           834: constructor permits the addition of more elements of the same type.  Used
        !           835: together, these two constructors permit any series of elements of different
        !           836: types.  Of course, this flexibility can be reduced wherever necessary since a
        !           837: generic structure can limit the choices or the number of elements in a
        !           838: list.</P>
        !           839: <P>
        !           840: Another difficulty linked to the use of structure in the document model
        !           841: resides in the choice of the level of the structure.  The structure of a
        !           842: discussion could be extracted from the text itself via linguistic analysis.
        !           843: Some studies are exploring this approach, but the model of Thot excludes this
        !           844: type of structure.  It only takes into account the logical structure provided
        !           845: explicitly by the author.</P>
        !           846: <P>
        !           847: However, the level of structure of the model is not imposed.  Each generic
        !           848: structure defines its own level of structure, adapted to the document class or
        !           849: object and to the ways in which it will be processed.  If it will only be
        !           850: edited and printed, a  relatively simple structure suffices.  If more
        !           851: specialized processing will be applied to it, the structure must represent the
        !           852: element types on which this processing must act.  By way of example, a simple
        !           853: structure is sufficient for printing formulas, but a more complex structure is
        !           854: required to perform symbolic or numeric calculations on the mathematical
        !           855: expressions.  The document model of Thot allows both types of structure.</P>
        !           856: </DIV>
        !           857: </DIV>
        !           858: 
        !           859: <DIV class="section">
        !           860: <H2>The definition language for generic structures</H2>
        !           861: 
        !           862: <P>
        !           863: Generic structures, which form the basis of the document model of Thot, are
        !           864: specified using a special language.  This definition language, called S, is
        !           865: described in this section.</P>
        !           866: <P>
        !           867: Each generic structure, which defines a class of documents or objects, is
        !           868: specified by a kind of program, written in the S language, which is called a
        !           869: <EM>structure schema</EM>.  Structure schemas are compiled into tables, called
        !           870: structure tables, which are used by the Thot editor and which determine its
        !           871: behavior.</P>
        !           872: 
        !           873: <DIV class="subsection">
        !           874: <H3><A name="metalang">Writing Conventions</A></H3>
        !           875: 
        !           876: <P>
        !           877: The grammar of S, like those of the languages P and T presented later, is
        !           878: described using the meta-language M, derived from the Backus-Naur Form
        !           879: (BNF).</P>
        !           880: <P>
        !           881: In this meta-language each rule of the grammar is composed of a grammar symbol
        !           882: followed by an equals sign (`=') and the right part of the rule.  The equals
        !           883: sign plays the same role as the traditional `::=' of BNF: it indicates that
        !           884: the right part defines the symbol of the left part.  In the right part,</P>
        !           885: <DL>
        !           886: <DT>concatenation</DT>
        !           887: <DD>is shown by the juxtaposition of symbols;
        !           888: </DD>
        !           889: <DT>character strings</DT>
        !           890: <DD>between apostrophes ' represent terminalsymbols, that is, keywords in the
        !           891: language defined.  Keywords arewritten here in upper-case letters, but can be
        !           892: written in anycombination of upper and lower-case letters.  For example, the
        !           893: keyword<TT>DEFPRES</TT>of S can also be written as
        !           894: <TT>defpres</TT>or<TT>DefPres</TT>.
        !           895: </DD>
        !           896: <DT>material between brackets</DT>
        !           897: <DD>(`[' and `]') is optional;
        !           898: </DD>
        !           899: <DT>material between angle brackets</DT>
        !           900: <DD>(`&lt;' and `>') can be repeatedmany times or omitted;
        !           901: </DD>
        !           902: <DT>the slash</DT>
        !           903: <DD>(`/') indicates an alternative, a choice between theoptions separated by
        !           904: the slash character;
        !           905: </DD>
        !           906: <DT>the period</DT>
        !           907: <DD>marks the end of a rule;
        !           908: </DD>
        !           909: <DT>text between braces</DT>
        !           910: <DD>(`{' and `}') is simply a comment.
        !           911: </DD>
        !           912: </DL>
        !           913: <P>
        !           914: The M meta-language also uses the concepts of identifiers, strings, and
        !           915: integers:</P>
        !           916: <DL>
        !           917: <DT><TT>NAME</TT></DT>
        !           918: <DD>represents an identifier, a sequence of letters(upper or lower-case),
        !           919: digits, and underline characters (`_'),beginning with a letter.  Also
        !           920: considered a letter is the sequence ofcharacters `<TT>\nnn</TT>' where the
        !           921: letter <TT>n</TT>represents the ISOLatin 1 code of the letter in octal.  It is
        !           922: thus possible to useaccented letters in identifiers.  The maximum length of
        !           923: identifiersis fixed by the compiler.  It is normally 19 characters.
        !           924: <P>
        !           925: Unlike keywords, upper and lower-case letters are distinct in identifiers.
        !           926: Thus, <TT>Title</TT>, <TT>TITLE</TT>, and <TT>title</TT> are considered
        !           927: different identifiers.</P>
        !           928: </DD>
        !           929: <DT><TT>STRING</TT></DT>
        !           930: <DD>represents (amazingly enough) a string.  This is astring of characters
        !           931: delimited by apostrophes.  If an apostrophe mustappear in a string, it is
        !           932: doubled.  As with identifiers, strings cancontain characters represented by
        !           933: their octal code (after abackslash).  As with apostrophes, if a backslash must
        !           934: appear in astring, it is doubled.
        !           935: </DD>
        !           936: <DT><TT>NUMBER</TT></DT>
        !           937: <DD>represents a positive integer or zero (without asign), or said another
        !           938: way, a sequence of decimal digits.
        !           939: </DD>
        !           940: </DL>
        !           941: <P>
        !           942: The M language can be used to define itself as follows:</P>
        !           943: <PRE>
        !           944: { Any text between braces is a comment. }
        !           945: Grammar      = Rule &lt; Rule > 'END' .
        !           946:                { The &lt; and > signs indicate zero }
        !           947:                { or more repetitions. }
        !           948:                { END marks the end of the grammar. }
        !           949: Rule         = Ident '=' RightPart '.' .
        !           950:                { The period indicates the end of a rule }
        !           951: RightPart    = RtTerminal / RtIntermed .
        !           952:                { The slash indicates a choice }
        !           953: RtTerminal   ='NAME' / 'STRING' / 'NUMBER' .
        !           954:                { Right part of a terminal rule }
        !           955: RtIntermed   = Possibility &lt; '/' Possibility > .
        !           956:                { Right part of an intermediate rule }
        !           957: Possibility  = ElemOpt &lt; ElemOpt > .
        !           958: ElemOpt      = Element / '[' Element &lt; Element > ']' /
        !           959:               '&lt;' Element &lt; Element > '>'  .
        !           960:                { Brackets delimit optional parts }
        !           961: Element      = Ident / KeyWord .
        !           962: Ident        = NAME .
        !           963:                { Identifier, sequence of characters }
        !           964: KeyWord      = STRING .
        !           965:                { Character string delimited by apostrophes }
        !           966: END
        !           967: </PRE>
        !           968: </DIV>
        !           969: 
        !           970: <DIV class="subsection">
        !           971: <H3><A name="extsch">Extension schemas</A></H3>
        !           972: 
        !           973: <P>
        !           974: A structure schema defines the generic logical structure of a class of
        !           975: documents or objects, independent of the operations which can be performed on
        !           976: the documents.  However, certain applications may require particular
        !           977: information to be represented by the structure for the documents that they
        !           978: operate on.  Thus a document version manager will need to indicate in the
        !           979: document the parts which belong to one version or another.  An indexing system
        !           980: will add highly-structured index tables as well as the links between these
        !           981: tables and the rest of the document.</P>
        !           982: <P>
        !           983: Thus, each application needs to extend the generic structure of the documents
        !           984: on which it operates to introduce new attributes, associated elements or
        !           985: element types.  These additions are specific to each application and must be
        !           986: able to be applied to any generic structure: users will want to manage
        !           987: versions or construct indices for many types of documents.  Extension schemas
        !           988: fulfill this role: they define attributes, elements, associated elements,
        !           989: units, etc., but they can only be used jointly with a structure schema that
        !           990: they complete. Otherwise, structure schemas can always be used without these
        !           991: extensions when the corresponding applications are not available.</P>
        !           992: </DIV>
        !           993: 
        !           994: <DIV class="subsection">
        !           995: <H3>The general organization of structure schemas</H3>
        !           996: 
        !           997: <P>
        !           998: Every structure schema begins with the keyword <TT>STRUCTURE</TT> and ends
        !           999: with the keyword <TT>END</TT>.  The keyword <TT>STRUCTURE</TT> is followed by
        !          1000: the keyword <TT>EXTENSION</TT> in the case where the schema defines an
        !          1001: extension, then by the name of the generic structure which the schema defines
        !          1002: (the name of the document or object class).  The name of the structure is
        !          1003: followed by a semicolon.</P>
        !          1004: <P>
        !          1005: In the case of a complete schema (that is, a schema which is not an
        !          1006: extension), the definition of the name of the structure is followed by the
        !          1007: declarations of the default presentation schema, the global attributes, the
        !          1008: parameters, the structure rules, the associated elements, the units, the
        !          1009: skeleton elements and the exceptions.  Only the definition of the structure
        !          1010: rules is required.  Each series of declarations begins with a keyword:
        !          1011: <TT>DEFPRES</TT>, <TT>ATTR</TT>, <TT>PARAM</TT>, <TT>STRUCT</TT>,
        !          1012: <TT>ASSOC</TT>, <TT>UNITS</TT>, <TT>EXPORT</TT>, <TT>EXCEPT</TT>.</P>
        !          1013: <P>
        !          1014: In the case of an extension schema, there are neither parameters nor skeleton
        !          1015: elements and the <TT>STRUCT</TT> section is optional, while that section is
        !          1016: required in a schema that is not an extension.  On the other hand, extension
        !          1017: schemas can contain an <TT>EXTENS</TT> section, which must not appear in a
        !          1018: schema which is not an extension; this section defines the complements to
        !          1019: attach to the rules found in the schema to which the extension will be added.
        !          1020: The sections <TT>ATTR</TT>, <TT>STRUCT</TT>, <TT>ASSOC</TT>, and
        !          1021: <TT>UNITS</TT> define new attributes, new elements, new associated elements,
        !          1022: and new units which add their definitions to the principal schema.</P>
        !          1023: <PRE>
        !          1024:      StructSchema ='STRUCTURE' ElemID ';'
        !          1025:                    'DEFPRES' PresID ';'
        !          1026:                  [ 'ATTR' AttrSeq ]
        !          1027:                  [ 'PARAM' RulesSeq ]
        !          1028:                    'STRUCT' RulesSeq
        !          1029:                  [ 'ASSOC' RulesSeq ]
        !          1030:                  [ 'UNITS' RulesSeq ]
        !          1031:                  [ 'EXPORT' SkeletonSeq ]
        !          1032:                  [ 'EXCEPT' ExceptSeq ]
        !          1033:                    'END' .
        !          1034:      ElemID       = NAME .
        !          1035: </PRE>
        !          1036: <P>
        !          1037: or</P>
        !          1038: <PRE>
        !          1039:      ExtensSchema ='STRUCTURE' 'EXTENSION' ElemID ';'
        !          1040:                    'DEFPRES' PresID ';'
        !          1041:                  [ 'ATTR' AttrSeq ]
        !          1042:                  [ 'STRUCT' RulesSeq ]
        !          1043:                  [ 'EXTENS' ExtensRuleSeq ]
        !          1044:                  [ 'ASSOC' RulesSeq ]
        !          1045:                  [ 'UNITS' RulesSeq ]
        !          1046:                  [ 'EXCEPT' ExceptSeq ]
        !          1047:                    'END' .
        !          1048:      ElemID       = NAME .
        !          1049: </PRE>
        !          1050: </DIV>
        !          1051: 
        !          1052: <DIV class="subsection">
        !          1053: <H3>The default presentation</H3>
        !          1054: 
        !          1055: <P>
        !          1056: It was shown <A href="#mulpres">above</A> that many different presentations
        !          1057: are possible for documents and objects of the same class.  The structure
        !          1058: schema defines a preferred presentation for the class, called the <EM>default
        !          1059: presentation</EM>.  Like generic structures, presentations are described by
        !          1060: programs, called <EM>presentation schemas</EM>, which are written in a
        !          1061: specific language, P, presented <A href="#langp">later</A> in this document.
        !          1062: The name appearing after the keyword <TT>DEFPRES</TT> is the name of the
        !          1063: default presentation schema.  When a new document is created, the Thot editor
        !          1064: will suggest using this presentation schema, but the user remains free to
        !          1065: choose another if he wishes.</P>
        !          1066: <PRE>
        !          1067:      PresID = NAME .
        !          1068: </PRE>
        !          1069: </DIV>
        !          1070: 
        !          1071: <DIV class="subsection">
        !          1072: <H3><A name="globalattr">Global Attributes</A></H3>
        !          1073: 
        !          1074: <P>
        !          1075: If the generic structure includes global attributes of its own, they are
        !          1076: declared after the keyword <TT>ATTR</TT>.  Each global attribute is defined by
        !          1077: its name, followed by an equals sign and the definition of its type.  The
        !          1078: declaration of a global attribute is terminated by a semi-colon.</P>
        !          1079: <P>
        !          1080: For attributes of the numeric, textual, or reference types, the type is
        !          1081: indicated by a keyword, <TT>INTEGER</TT>, <TT>TEXT</TT>, or <TT>REFERENCE</TT>
        !          1082: respectively.</P>
        !          1083: <P>
        !          1084: In the case of a reference attribute, the keyword <TT>REFERENCE</TT> is
        !          1085: followed by the type of the referenced element in parentheses.  It can refer
        !          1086: to any type at all, specified by using the keyword <TT>ANY</TT>, or to a
        !          1087: specific type.  In the latter case, the element type designated by the
        !          1088: reference can be defined either in the <A href="#structelem"><TT>STRUCT</TT>
        !          1089: section</A> of the same structure schema or in the <TT>STRUCT</TT> section of
        !          1090: another structure schema.  When the type is defined in another schema, the
        !          1091: element type is followed by the name of the structure schema (within
        !          1092: parentheses) in which it is defined.  The name of the designated element type
        !          1093: can be preceded by the keyword <TT>First</TT> or <TT>Second</TT>, but only in
        !          1094: the case where the type is defined as <A href="#pairs">a pair</A>.  The
        !          1095: keywords indicate whether the attribute must designate the first mark of the
        !          1096: pair or the second.  If the reference refers to a pair and neither of these
        !          1097: two keywords is present, then the first mark is used.</P>
        !          1098: <P>
        !          1099: In the case of an enumeration attribute, the equals sign is followed by the
        !          1100: list of names representing the possible values of the attribute, the names
        !          1101: being separated from each other by commas.  An enumeration attribute has at
        !          1102: least one possible value; the maximum number of values is defined by the
        !          1103: compiler for the S language.</P>
        !          1104: <PRE>
        !          1105:      AttrSeq   = Attribute &lt; Attribute > .
        !          1106:      Attribute = AttrID '=' AttrType  ';' .
        !          1107:      AttrType  = 'INTEGER' / 'TEXT' /
        !          1108:                  'REFERENCE' '(' RefType ')' /
        !          1109:                  ValueSeq .
        !          1110:      RefType   = 'ANY' / [ FirstSec ] ElemID [ ExtStruct ] .
        !          1111:      FirstSec  = 'First' / 'Second' .
        !          1112:      ExtStruct = '(' ElemID ')' .
        !          1113:      ValueSeq  = AttrVal &lt; ',' AttrVal > .
        !          1114:      AttrID    = NAME .
        !          1115:      AttrVal   = NAME .
        !          1116: </PRE>
        !          1117: <P>
        !          1118: There is a predefined global text attribute, the <EM>language</EM>, which is
        !          1119: automatically added to every Thot structure schema.  This attribute allows the
        !          1120: editor to perform certain actions, such as hyphenation and spell-checking,
        !          1121: which cannot be performed without knowing the language in which each part of
        !          1122: the document is written.  This attribute can be used just like any explicitly
        !          1123: declared attribute: the system acts as if every structure schema contains</P>
        !          1124: <PRE>
        !          1125: ATTR
        !          1126:    Language = TEXT;
        !          1127: </PRE>
        !          1128: <BLOCKQUOTE class="example">
        !          1129: <P>
        !          1130: <STRONG>Example:</STRONG></P>
        !          1131: <P>
        !          1132: The following specification defines the global enumeration
        !          1133: attributeWordType.</P>
        !          1134: <PRE>
        !          1135: ATTR
        !          1136:    WordType    = Definition, IndexWord, DocumentTitle;
        !          1137: </PRE>
        !          1138: </BLOCKQUOTE>
        !          1139: </DIV>
        !          1140: 
        !          1141: <DIV class="subsection">
        !          1142: <H3><A name="param">Parameters</A></H3>
        !          1143: 
        !          1144: <P>
        !          1145: A parameter is a document element which can appear many times in the document,
        !          1146: but always has the same value.  This value can only be modified in a
        !          1147: controlled way by certain applications.  For example, in an advertising
        !          1148: circular, the name of the recipient may appear in the address part and in the
        !          1149: text of the circular.  If the recipient's name were a parameter, it might only
        !          1150: be able to be changed by a ``mail-merge'' application.</P>
        !          1151: <P>
        !          1152: Parameters are not needed for every document class, but if the schema includes
        !          1153: parameters they are declared after the keyword <TT>PARAM</TT>. Each parameter
        !          1154: declaration is made in the same way as a <A href="#structelem">structure
        !          1155: element declaration</A>.</P>
        !          1156: <P>
        !          1157: During editing, Thot permits the insertion of parameters wherever the
        !          1158: structure schema allows; it also permits the removal of parameters which are
        !          1159: already in the document but does not allow the modification of the parameter's
        !          1160: content in any way.  The content is generated automatically by the editor
        !          1161: during the creation of the parameter, based on the value of the parameter in
        !          1162: the document.</P>
        !          1163: </DIV>
        !          1164: 
        !          1165: <DIV class="subsection">
        !          1166: <H3><A name="structelem">Structured elements</A></H3>
        !          1167: 
        !          1168: <P>
        !          1169: The rules for defining structured elements are required, except in an
        !          1170: extension schema: they constitute the core of a structure schema, since they
        !          1171: define the structure of the different types of elements that occur in a
        !          1172: document or object of the class defined by the schema.</P>
        !          1173: <P>
        !          1174: The first structure rule after the keyword <TT>STRUCT</TT> must define the
        !          1175: structure of the class whose name appears in the first instruction
        !          1176: (<TT>STRUCTURE</TT>) of the schema.  This is the root rule of the schema,
        !          1177: defining the root of the document tree or object tree.</P>
        !          1178: <P>
        !          1179: The remaining rules may be placed in any order, since the language permits the
        !          1180: definition of element types before or after their use, or even in the same
        !          1181: instruction in which they are used.  This last case allows the definition of
        !          1182: recursive structures.</P>
        !          1183: <P>
        !          1184: Each rule is composed of a name (the name of the element type whose structure
        !          1185: is being defined) followed by an equals sign and a structure definition.</P>
        !          1186: <P>
        !          1187: If any local attributes are associated with the element type defined by the
        !          1188: rule, they appear between parentheses after the type name.  The parentheses
        !          1189: contain, first, the keyword <TT>ATTR</TT>, then the list of local attributes,
        !          1190: separated by commas.  Each local attribute is composed of the name of the
        !          1191: attribute followed by an equals sign and the definition of the attribute's
        !          1192: type, just as in the definition of <A href="#globalattr">global
        !          1193: attributes</A>.  The name of the attribute can be preceded by an exclamation
        !          1194: point to indicate that the attribute must always be present for this element
        !          1195: type.  The same attribute, identified by its name, can be defined  as a local
        !          1196: attribute for multiple element types.  In this case, the equals sign and
        !          1197: definition of the attribute type need only appear in the first occurrence of
        !          1198: the attribute.  It should be noted that global attributes cannot also be
        !          1199: defined as local attributes.</P>
        !          1200: <P>
        !          1201: If any <A href="#restrictionextensions">extensions</A> are defined for this
        !          1202: element type, a plus sign follows the structure definition and the names of
        !          1203: the extension element types appear between parentheses after the plus.  If
        !          1204: there are multiple extensions, they are separated by commas.  These types can
        !          1205: either be defined in the same schema, defined in other schemas, or they may be
        !          1206: base types identified by the keywords <TT>TEXT</TT>, <TT>GRAPHICS</TT>,
        !          1207: <TT>SYMBOL</TT>, or <TT>PICTURE</TT>.</P>
        !          1208: <P>
        !          1209: <A href="#restrictionextensions">Restrictions</A> are indicated in the same
        !          1210: manner as extensions, but they are introduced by a minus sign and they come
        !          1211: after the extensions, or if there are no extensions, after the structure
        !          1212: definition.</P>
        !          1213: <P>
        !          1214: If the values of attributes must be attached systematically to this element
        !          1215: type, they are introduced by the keyword <TT>WITH</TT> and declared in the
        !          1216: form of a list of fixed-value attributes.  When such definitions of fixed
        !          1217: attribute values appear, they are always the last part of the rule.</P>
        !          1218: <P>
        !          1219: The rule is terminated by a semicolon.</P>
        !          1220: <PRE>
        !          1221:   RuleSeq       = Rule &lt; Rule > .
        !          1222:   Rule          = ElemID [ LocAttrSeq ] '=' DefWithAttr ';'.
        !          1223:   LocAttrSeq    = '(' 'ATTR' LocAttr &lt; ';' LocAttr > ')' .
        !          1224:   LocAttr       = [ '!' ] AttrID [ '=' AttrType ] .
        !          1225:   DefWithAttr   = Definition
        !          1226:                   [ '+' '(' ExtensionSeq ')' ]
        !          1227:                   [ '-' '(' RestrictSeq ')' ]
        !          1228:                   [ 'WITH' FixedAttrSeq ] .
        !          1229:   ExtensionSeq  = ExtensionElem &lt; ',' ExtensionElem > .
        !          1230:   ExtensionElem = ElemID / 'TEXT' / 'GRAPHICS' /
        !          1231:                   'SYMBOL' / 'PICTURE' .
        !          1232:   RestrictSeq   = RestrictElem &lt; ',' RestrictElem > .
        !          1233:   RestrictElem  = ElemID / 'TEXT' / 'GRAPHICS' /
        !          1234:                   'SYMBOL' / 'PICTURE' .
        !          1235: </PRE>
        !          1236: <P>
        !          1237: The list of fixed-value attributes is composed of a sequence of
        !          1238: attribute-value pairs separated by commas.  Each pair contains the name of the
        !          1239: attribute and the fixed value for this element type, the two being separated
        !          1240: by an equals sign.  If the sign is preceded by a question mark the given value
        !          1241: is only an initial value that may be modified later rather than a value fixed
        !          1242: for all time.  Reference attributes are an exception to this norm.  They
        !          1243: cannot be assigned a fixed value, but when the name of such an attribute
        !          1244: appears this indicates that this element type must have a valid value for the
        !          1245: attribute.  For the other attribute types, the fixed value is indicated by an
        !          1246: signed integer (numeric attributes), a character string between apostrophes
        !          1247: (textual attributes) or the name of a value (enumeration attributes).</P>
        !          1248: <P>
        !          1249: Fixed-value attributes can either be <A href="#globalattr">global</A> or local
        !          1250: to the element type for which they are fixed, but they must be declared before
        !          1251: they are used.</P>
        !          1252: <PRE>
        !          1253:     FixedAttrSeq    = FixedAttr &lt; ',' FixedAttr > .
        !          1254:     FixedAttr       = AttrID [ FixedOrModifVal ] .
        !          1255:     FixedOrModifVal = [ '?' ] '=' FixedValue .
        !          1256:     FixedValue      = [ '-' ] NumValue / TextVal / AttrVal .
        !          1257:     NumValue        = NUMBER .
        !          1258:     TextVal         = STRING .
        !          1259: </PRE>
        !          1260: </DIV>
        !          1261: 
        !          1262: <DIV class="subsection">
        !          1263: <H3><A name="structdef">Structure definitions</A></H3>
        !          1264: 
        !          1265: <P>
        !          1266: The structure of an element type can be a simple base type or a constructed
        !          1267: type.</P>
        !          1268: <P>
        !          1269: For constructed types, it is frequently the case that similar structures
        !          1270: appear in many places in a document.  For example the contents of the
        !          1271: abstract, of the introduction, and of a section can have the same structure,
        !          1272: that of a sequence of paragraphs.  In this case, a single, common structure
        !          1273: can be defined (the paragraph sequence in this example), and the schema is
        !          1274: written to indicate that each element type possesses this structure, as
        !          1275: follows:</P>
        !          1276: <PRE>
        !          1277:      Abstract           = Paragraph_sequence;
        !          1278:      Introduction       = Paragraph_sequence;
        !          1279:      Section_contents   = Paragraph_sequence;
        !          1280: </PRE>
        !          1281: <P>
        !          1282: The equals sign means ``has the same structure as''.</P>
        !          1283: <P>
        !          1284: If the element type defined is a simple base type, this is indicated by one of
        !          1285: the keywords <TT>TEXT</TT>, <TT>GRAPHICS</TT>, <TT>SYMBOL</TT>, or
        !          1286: <TT>PICTURE</TT>.  If some local attributes must be associated with a base
        !          1287: type, the keyword of the base type is followed by the declaration of the local
        !          1288: attributes using the syntax <A href="#structelem">presented above.</A></P>
        !          1289: <P>
        !          1290: In the case of an open choice, the type is indicated by the keyword
        !          1291: <TT>UNIT</TT> for units or the keyword <TT>NATURE</TT> for objects having
        !          1292: arbitrary structure.</P>
        !          1293: <P>
        !          1294: A unit represents one of the two following categories:</P>
        !          1295: <UL>
        !          1296: <LI>a base type: text, graphical element, symbol, image,
        !          1297: <LI>an element whose type is chosen from among the types definedas units in
        !          1298: the <TT>UNITS</TT>section of the document's structure schema.It can also be
        !          1299: chosen from among the types defined as<A href="#schemasandunits">units</A>in
        !          1300: the <A href="#units"><TT>UNITS</TT> section</A>of the structure schemas that
        !          1301: defines the ancestors of theelement to which the rule is applied.
        !          1302: </UL>
        !          1303: <P>
        !          1304: Before the creation of an element defined as a unit, the Thot editor asks the
        !          1305: user to choose between the categories of elements.</P>
        !          1306: <P>
        !          1307: Thus, the contents of a paragraph can be specified as a sequence of units,
        !          1308: which will permit the inclusion in the paragraphs of character strings,
        !          1309: symbols, and various elements, such as cross-references, if these are defined
        !          1310: as units.</P>
        !          1311: <P>
        !          1312: A schema object (keyword <TT>NATURE</TT>) represents an object defined by a
        !          1313: structure schema freely chosen from among the available schemas; in the case
        !          1314: the element type is defined by the first rule (the root rule) of the chosen
        !          1315: schema.</P>
        !          1316: <P>
        !          1317: If the element type defined is a constructed type, the list, aggregate,
        !          1318: choice, and reference constructors are used.  In this case the definition
        !          1319: begins with a keyword identifying the constructor.  This keyword is followed
        !          1320: by a syntax specific to each constructor.</P>
        !          1321: <P>
        !          1322: The local attribute definitions appear after the name of the element type
        !          1323: being defined, if this element type has <A href="#structelem">local
        !          1324: attributes</A>.</P>
        !          1325: <PRE>
        !          1326:    Definition = BaseType [ LocAttrSeq ] / Constr / Element .
        !          1327:    BaseType   = 'TEXT' / 'GRAPHICS' / 'SYMBOL' / 'PICTURE' /
        !          1328:                 'UNIT' / 'NATURE' .
        !          1329:    Element    = ElemID [ ExtOrDef ] .
        !          1330:    ExtOrDef   = 'EXTERN' / 'INCLUDED' / 
        !          1331:                 [ LocAttrSeq ] '=' Definition .
        !          1332:    Constr     = 'LIST' [ '[' min '..' max ']' ] 'OF'
        !          1333:                        '(' DefWithAttr ')' /
        !          1334:                 'BEGIN' DefOptSeq 'END' /
        !          1335:                 'AGGREGATE' DefOptSeq 'END' /
        !          1336:                 'CASE' 'OF' DefSeq 'END' /
        !          1337:                 'REFERENCE' '(' RefType ')' /
        !          1338:                 'PAIR' .
        !          1339: </PRE>
        !          1340: 
        !          1341: <DIV class="subsubsection">
        !          1342: <H4>List</H4>
        !          1343: 
        !          1344: <P>
        !          1345: The list constructor permits the definition of an element type composed of a
        !          1346: list of elements, all of the same type.  A list definition begins with the
        !          1347: <TT>LIST</TT> keyword followed by an optional range, the keyword <TT>OF</TT>,
        !          1348: and the definition, between parentheses, of the element type which must
        !          1349: compose the list.  The optional range is composed of the minimum and maximum
        !          1350: number of elements for the list separated by two periods and enclosed by
        !          1351: brackets.  If the range is not present, the number of list elements is
        !          1352: unconstrained.  When only one of the two bounds of the range is unconstrained,
        !          1353: it is represented by a star ('*') character.  Even when both bounds are
        !          1354: unconstrained, they can be specified by <TT>[*..*]</TT>, but it is simpler not
        !          1355: to specify any bound.</P>
        !          1356: <PRE>
        !          1357:                'LIST' [ '[' min '..' max ']' ]
        !          1358:                'OF' '(' DefWithAttr ')'
        !          1359:      min     = Integer / '*' .
        !          1360:      max     = Integer / '*' .
        !          1361:      Integer = NUMBER .
        !          1362: </PRE>
        !          1363: <P>
        !          1364: Before the document is edited, the Thot editor creates the minimum number of
        !          1365: elements for the list.  If no minimum was given, it creates a single element.
        !          1366: If a maximum number of elements is given and that number is attained, the
        !          1367: editor refuses to create new elements for the list.</P>
        !          1368: <BLOCKQUOTE class="example">
        !          1369: <P>
        !          1370: <STRONG>Example:</STRONG></P>
        !          1371: <P>
        !          1372: The following two instructions define the body of a document as asequence of
        !          1373: at least two chapters and the contents of a section as asequence of
        !          1374: paragraphs.  A single paragraph can be the entire contentsof a section.</P>
        !          1375: <PRE>
        !          1376: Body             = LIST [2..*] OF (Chapter);
        !          1377: Section_contents = LIST OF (Paragraph);
        !          1378: </PRE>
        !          1379: </BLOCKQUOTE>
        !          1380: </DIV>
        !          1381: 
        !          1382: <DIV class="subsubsection">
        !          1383: <H4>Aggregate</H4>
        !          1384: 
        !          1385: <P>
        !          1386: The aggregate constructor is used to define an element type as a collection of
        !          1387: sub-elements, each having a fixed type.  The collection may be ordered or
        !          1388: unordered.  The elements composing the collection are called
        !          1389: <EM>components</EM>.  In the definition of an aggregate, a keyword indicates
        !          1390: whether or not the aggregate is ordered: <TT>BEGIN</TT> for an ordered
        !          1391: aggregate, <TT>AGGREGATE</TT> for an unordered aggregate. This keyword is
        !          1392: followed by the list of component type definitions which is terminated by the
        !          1393: <TT>END</TT> keyword.  The component type definitions are separated by
        !          1394: commas.</P>
        !          1395: <P>
        !          1396: Before creating an aggregate, the Thot editor creates all the aggregate's
        !          1397: components in the order they appear in the structure schema, even for
        !          1398: unordered aggregates.  However, unlike ordered aggregates, the components of
        !          1399: an unordered aggregate may be rearranged using operations of the Thot editor.
        !          1400: The exceptions to the rule are any components whose name was preceded by a
        !          1401: question mark character ('?').  These components, which are optional, can be
        !          1402: created by explicit request, possibly at the time the aggregate is created,
        !          1403: but they are not created automatically <EM>prior</EM> to the creation of the
        !          1404: aggregate.</P>
        !          1405: <PRE>
        !          1406:                  'BEGIN' DefOptSeq 'END'
        !          1407:      DefOptSeq = DefOpt ';' &lt; DefOpt ';' > .
        !          1408:      DefOpt    = [ '?' ] DefWithAttr .
        !          1409: </PRE>
        !          1410: <BLOCKQUOTE class="example">
        !          1411: <P>
        !          1412: <STRONG>Example:</STRONG></P>
        !          1413: <P>
        !          1414: In a bilingual document, each paragraph has an English version andFrench
        !          1415: version.  In certain cases, the translator wants to add amarginal note, but
        !          1416: this note is present in very few paragraphs.  Thus,it must not be created
        !          1417: systematically for every paragraph.  Abilingual paragraph of this type is
        !          1418: declared:</P>
        !          1419: <PRE>
        !          1420: Bilingual_paragraph = BEGIN
        !          1421:                       French_paragraph  = TEXT;
        !          1422:                       English_paragraph = TEXT;
        !          1423:                       ? Note            = TEXT;
        !          1424:                       END;
        !          1425: </PRE>
        !          1426: </BLOCKQUOTE>
        !          1427: </DIV>
        !          1428: 
        !          1429: <DIV class="subsubsection">
        !          1430: <H4>Choice</H4>
        !          1431: 
        !          1432: <P>
        !          1433: The choice constructor permits the definition of an element type which is
        !          1434: chosen from among a set of possible types.  The keywords <TT>CASE</TT> and
        !          1435: <TT>OF</TT> are followed by a list of definitions of possible types, which are
        !          1436: separated by semicolons and terminated by the <TT>END</TT> keyword.</P>
        !          1437: <PRE>
        !          1438:                'CASE' 'OF' DefSeq 'END'
        !          1439:      DefSeq = DefWithAttr ';' &lt; DefWithAttr ';' > .
        !          1440: </PRE>
        !          1441: <P>
        !          1442: Before the creation of an element defined as a choice, the Thot editor
        !          1443: presents the list of possible types for the element to the user.  The user has
        !          1444: only to select the element type that he wants to create from this list.</P>
        !          1445: <P>
        !          1446: The order of the type declarations is important.  It determines the order of
        !          1447: the list presented to the user before the creation of the element.  Also, when
        !          1448: a Choice element is being created automatically, the first type in the list is
        !          1449: used.  In fact, using the Thot editor, when an empty Choice element is
        !          1450: selected, it is possible to select this element and to enter its text from
        !          1451: keyboard. In this case, the editor uses the first element type which can
        !          1452: contain an atom of the character string type.</P>
        !          1453: <P>
        !          1454: The two special cases of the choice constructor, the <A
        !          1455: href="#structdef"><EM>schema</EM></A> and the <A
        !          1456: href="#units"><EM>unit</EM></A> are discussed elsewhere.</P>
        !          1457: <BLOCKQUOTE class="example">
        !          1458: <P>
        !          1459: <STRONG>Example:</STRONG></P>
        !          1460: <P>
        !          1461: It is common in documents to treat a variety of objects as if theywere
        !          1462: ordinary paragraphs.  Thus, a ``Paragraph'' might actually becomposed of a
        !          1463: block of text (an ordinary paragraph), or a mathematicalformula whose
        !          1464: structure is defined by another structure schema namedMath, or a table, also
        !          1465: defined by another structure schema.  Here is adefinition of such a
        !          1466: paragraph:</P>
        !          1467: <PRE>
        !          1468: Paragraph = CASE OF
        !          1469:               Simple_text = TEXT;
        !          1470:               Formula     = Math;
        !          1471:               Table_para  = Table;
        !          1472:               END;
        !          1473: </PRE>
        !          1474: </BLOCKQUOTE>
        !          1475: </DIV>
        !          1476: 
        !          1477: <DIV class="subsubsection">
        !          1478: <H4><A name="references">Reference</A></H4>
        !          1479: 
        !          1480: <P>
        !          1481: Like all elements in Thot, references are typed.  An element type defined as a
        !          1482: reference is a cross-reference to an element of some other given type. The
        !          1483: keyword <TT>REFERENCE</TT> is followed by the name of a type enclosed in
        !          1484: parentheses.  When the type which is being cross-referenced is defined in
        !          1485: another structure schema, the type name is itself followed by the name of the
        !          1486: external structure schema in which it is defined.</P>
        !          1487: <P>
        !          1488: When the designated element type is a <A href="#pairs">mark pair</A>, it can
        !          1489: be preceded by a <TT>FIRST</TT> or <TT>SECOND</TT> keyword.  These keywords
        !          1490: indicate whether the reference points to the first or second mark of the pair.
        !          1491: If the reference points to a pair and neither of these two keywords is
        !          1492: present, the reference is considered to point to the first mark of the
        !          1493: pair.</P>
        !          1494: <P>
        !          1495: There is an exception to the principle of typed references:  it is possible to
        !          1496: define a reference which designates an element of any type, which can either
        !          1497: be in the same document or another document. In this case, it suffices to put
        !          1498: the keyword <TT>ANY</TT> in the parentheses which indicate the referenced
        !          1499: element type.</P>
        !          1500: <PRE>
        !          1501:              'REFERENCE' '(' RefType ')'
        !          1502:    RefType = 'ANY' / [ FirstSec ] ElemID [ ExtStruct ] .
        !          1503: </PRE>
        !          1504: <P>
        !          1505: When defining an inclusion, the <TT>REFERENCE</TT> keyword is not used.
        !          1506: Inclusions with complete expansion are not declared as such in the structure
        !          1507: schemas, since any element defined in a structure schema can be replaced by an
        !          1508: element of the same type.  Instead, inclusions without expansion or with
        !          1509: partial expansion must be declared explicitly whenever they will include a
        !          1510: complete object ( and not a part of an object).  In this case, the object type
        !          1511: to be included (that is, the name of its structure schema) is followed by a
        !          1512: keyword: <TT>EXTERN</TT> for inclusion without expansion and <TT>INCLUDED</TT>
        !          1513: for partial expansion.</P>
        !          1514: <P>
        !          1515: Before creating a cross-reference or an inclusion, the Thot editor asks the
        !          1516: user to choose, from the document images displayed, the referenced or included
        !          1517: element.</P>
        !          1518: <BLOCKQUOTE class="example">
        !          1519: <P>
        !          1520: <STRONG>Example:</STRONG></P>
        !          1521: <P>
        !          1522: If the types Note and Section are defined in theArticle structure schema, it
        !          1523: is possible to define, in the samestructure schema, a reference to a note and
        !          1524: a reference to a sectionin this manner:</P>
        !          1525: <PRE>
        !          1526: Ref_note    = REFERENCE (Note);
        !          1527: Ref_section = REFERENCE (Section);
        !          1528: </PRE>
        !          1529: <P>
        !          1530: It is also possible to define the generic structure of a collection of
        !          1531: articles, which include (with partial expansion) objects of the Article class
        !          1532: and which possess an introduction which may include cross-references to
        !          1533: sections of the included articles.  In the Collection structure schema, the
        !          1534: definitions are:</P>
        !          1535: <PRE>
        !          1536: Collection = BEGIN
        !          1537:           Collection_title = TEXT;
        !          1538:           Introduction = LIST OF (Elem = CASE OF
        !          1539:                                            TEXT;
        !          1540:                                            Ref_sect;
        !          1541:                                            END);
        !          1542:           Body = LIST OF (Article INCLUDED);
        !          1543:           END;
        !          1544: Ref_sect = REFERENCE (Section (Article));
        !          1545: </PRE>
        !          1546: <P>
        !          1547: Here we define a Folder document class which has a title and includes
        !          1548: documents of different types, particularly Folders:</P>
        !          1549: <PRE>
        !          1550: Folder = BEGIN
        !          1551:           Folder_title    = TEXT;
        !          1552:           Folder_contents = LIST OF (Document);
        !          1553:           END;
        !          1554: 
        !          1555: Document = CASE OF
        !          1556:               Article EXTERN;
        !          1557:               Collection EXTERN;
        !          1558:               Folder EXTERN;
        !          1559:               END;
        !          1560: </PRE>
        !          1561: <P>
        !          1562: Under this definition, Folder represents either an aggregate which contains a
        !          1563: folder title and the list of included documents or an included folder.  To
        !          1564: resolve this ambiguity, in the P language, the placement of a star character
        !          1565: in front of the type name (here, Folder) indicates an included document.</P>
        !          1566: </BLOCKQUOTE>
        !          1567: </DIV>
        !          1568: 
        !          1569: <DIV class="subsubsection">
        !          1570: <H4><A name="pairs">Mark pairs</A></H4>
        !          1571: 
        !          1572: <P>
        !          1573: Like other elements, mark pairs are typed.  The two marks of the pair have the
        !          1574: same type, but there exist two predefined subtypes which apply to all mark
        !          1575: pairs: the first mark of the pair (called <TT>First</TT> in the P and T
        !          1576: languages) and the second mark (called <TT>Second</TT>).</P>
        !          1577: <P>
        !          1578: In the S language, a mark pair is noted simply by the <TT>PAIR</TT>
        !          1579: keyword.</P>
        !          1580: <P>
        !          1581: In the Thot editor, marks are always moved or destroyed together.  The two
        !          1582: marks of a pair have the same identifier, unique within the document, which
        !          1583: permits intertwining mark pairs without risk of ambiguity.</P>
        !          1584: </DIV>
        !          1585: </DIV>
        !          1586: 
        !          1587: <DIV class="subsection">
        !          1588: <H3>Imports</H3>
        !          1589: 
        !          1590: <P>
        !          1591: Because of schema constructors, it is possible, before editing a document, to
        !          1592: use classes defined by other structure schemas whenever they are needed. It is
        !          1593: also possible to assign specific document classes to certain element types. In
        !          1594: this case, these classes are simply designated by their name.  In fact, if a
        !          1595: type name is not defined in the structure schema, it is assumed that it
        !          1596: specifies a structure defined by another structure schema.</P>
        !          1597: <BLOCKQUOTE class="example">
        !          1598: <P>
        !          1599: <STRONG>Example:</STRONG></P>
        !          1600: <P>
        !          1601: If the types Math and Table don't appear in the left partof a structure rule
        !          1602: in the schema, the following two rules indicatethat a formula has the
        !          1603: structure of an object defined by the structureschema Math and that a table
        !          1604: element has the structure of anobject defined by the Table schema.</P>
        !          1605: <PRE>
        !          1606: Formula = Math;
        !          1607: Table_elem = Table;
        !          1608: </PRE>
        !          1609: </BLOCKQUOTE>
        !          1610: </DIV>
        !          1611: 
        !          1612: <DIV class="subsection">
        !          1613: <H3>Extension rules</H3>
        !          1614: 
        !          1615: <P>
        !          1616: The <TT>EXTENS</TT> section, which can only appear in an extension schema,
        !          1617: defines complements to the rules in the primary schema (i.e. the structure
        !          1618: schema to which the extension schema will be applied). More precisely, this
        !          1619: section permits the addition to an existing type of local attributes,
        !          1620: extensions, restrictions and fixed-value attributes.</P>
        !          1621: <P>
        !          1622: These additions can be applied to the root rule of the primary schema,
        !          1623: designated by the keyword <TT>Root</TT>, or to any other explicitly named
        !          1624: rule.</P>
        !          1625: <P>
        !          1626: Extension rules are separated from each other by a semicolon and each
        !          1627: extension rule has the same syntax as a <A href="#structelem">structure
        !          1628: rule</A>, but the part which defines the constructor is absent.</P>
        !          1629: <PRE>
        !          1630:      ExtenRuleSeq = ExtensRule ';' &lt; ExtensRule ';' > .
        !          1631:      ExtensRule =      RootOrElem [ LocAttrSeq ]
        !          1632:                         [ '+' '(' ExtensionSeq ')' ]
        !          1633:                         [ '-' '(' RestrictSeq ')' ]
        !          1634:                         [ 'WITH' FixedAttrSeq ] .
        !          1635:      RootOrElem =       'Root' / ElemID .
        !          1636: </PRE>
        !          1637: </DIV>
        !          1638: 
        !          1639: <DIV class="subsection">
        !          1640: <H3>Associated elements</H3>
        !          1641: 
        !          1642: <P>
        !          1643: If associated elements are necessary, they must be declared in a specific
        !          1644: section of the structure schema, introduced by the keyword <TT>ASSOC</TT>.
        !          1645: Each associated element type is specified like any other structured element.
        !          1646: However, these types must not appear in any other element types of the schema,
        !          1647: except in <TT>REFERENCE</TT> rules.</P>
        !          1648: </DIV>
        !          1649: 
        !          1650: <DIV class="subsection">
        !          1651: <H3><A name="units">Units</A></H3>
        !          1652: 
        !          1653: <P>
        !          1654: The <TT>UNITS</TT> section of the structure schema contains the declarations
        !          1655: of the element types which can be used in the external objects making up parts
        !          1656: of the document or in objects of the class defined by the schema.  As with
        !          1657: associated elements, these element types are defined just like other
        !          1658: structured element types. They can be used in the other element types of the
        !          1659: schema, but they can also be used in any other rule of the schema.</P>
        !          1660: <BLOCKQUOTE class="example">
        !          1661: <P>
        !          1662: <STRONG>Example:</STRONG></P>
        !          1663: <P>
        !          1664: If references to notes are declared as units:</P>
        !          1665: <PRE>
        !          1666: UNITS
        !          1667:    Ref_note = REFERENCE (Note);
        !          1668: </PRE>
        !          1669: <P>
        !          1670: then it is possible to use references to notes in a cell of a table,even when
        !          1671: <TT>Table</TT>is an external structure schema.  The<TT>Table<TT> schema must
        !          1672: declare a cell to be a sequence of units, which can then be base element types
        !          1673: (text, for example) or references to notes in the document. <PRE>
        !          1674: Cell = LIST OF (UNITS);
        !          1675: </PRE>
        !          1676: </TT></TT></P>
        !          1677: </BLOCKQUOTE>
        !          1678: </DIV>
        !          1679: 
        !          1680: <DIV class="subsection">
        !          1681: <H3><A name="skeleton">Skeleton elements</A></H3>
        !          1682: 
        !          1683: <P>
        !          1684: When editing a document which contains or must contain external references to
        !          1685: several other documents, it may be necessary to load a large number of
        !          1686: documents, simply to see the parts designated by the external references of
        !          1687: the document while editing, or to access the source of included elements.  In
        !          1688: this case, the external documents are not modified and it is only necessary to
        !          1689: see the elements of these documents which could be referenced.  Because of
        !          1690: this, the editor will suggest that the documents be loaded in ``skeleton''
        !          1691: form.  This form contains only the elements of the document explicitly
        !          1692: mentioned in the <TT>EXPORT</TT> section of their structure schema and, for
        !          1693: these elements, only the part of the contents specified in that section. This
        !          1694: form has the advantage of being very compact, thus requiring very few
        !          1695: resources from the editor.  This is also the skeleton form which constitutes
        !          1696: the expanded form of <A href="#inclusion">inclusions</A> with partial
        !          1697: expansion.</P>
        !          1698: <P>
        !          1699: Skeleton elements must be declared explicitly in the <TT>EXPORT</TT> section
        !          1700: of the structure schema that defines them.  This section begins with the
        !          1701: keyword <TT>EXPORT</TT> followed by a comma-separated list of the element
        !          1702: types which must appear in the skeleton form and ending with a semicolon.
        !          1703: These types must have been previously declared in the schema.</P>
        !          1704: <P>
        !          1705: For each skeleton element type, the part of the contents which is loaded by
        !          1706: the editor, and therefore displayable, can be specified by putting the keyword
        !          1707: <TT>WITH</TT> and the name of the contained element type to be loaded after
        !          1708: the name of the skeleton element type.  In this case only that named element,
        !          1709: among all the elements contained in the exportable element type, will be
        !          1710: loaded.  If the <TT>WITH</TT> is absent, the entire contents of the skeleton
        !          1711: element will be loaded by the editor.  If instead, it is better that the
        !          1712: skeleton form not load the contents of a particular element type, the keyword
        !          1713: <TT>WITH</TT> must be followed by the word <TT>Nothing</TT>.</P>
        !          1714: <PRE>
        !          1715:                 [ 'EXPORT' SkeletonSeq ]
        !          1716: 
        !          1717:      SkeletonSeq = SkelElem &lt; ',' SkelElem > ';' .
        !          1718:      SkelElem    = ElemID [ 'WITH' Contents ] .
        !          1719:      Contents    = 'Nothing' / ElemID [ ExtStruct ] .
        !          1720: </PRE>
        !          1721: <BLOCKQUOTE class="example">
        !          1722: <P>
        !          1723: <STRONG>Example:</STRONG></P>
        !          1724: <P>
        !          1725: Suppose that, in documents of the article class, the element
        !          1726: typesArticle_title, Figure, Section, Paragraph, and Biblio should appearin the
        !          1727: skeleton form in order to make it easier to create externalreferences to them
        !          1728: from other documents.  When loading an article inits skeleton form, all of
        !          1729: these element types will be loaded exceptfor paragraphs, but only the article
        !          1730: title will be loaded in itsentirety.  For figures, the legend will be loaded,
        !          1731: while for sections,the title will be loaded, and for bibliographic entries,
        !          1732: only thetitle that they contain will be loaded.  Note that
        !          1733: bibliographicelements are defined in another structure schema, RefBib.  To
        !          1734: producethis result, the following declarations should be placed in the
        !          1735: Articlestructure schema:</P>
        !          1736: <PRE>
        !          1737: EXPORT
        !          1738:    Article_title,
        !          1739:    Figure With Legend,
        !          1740:    Section With Section_title,
        !          1741:    Paragraph With Nothing,
        !          1742:    Biblio With Biblio_title(RefBib);
        !          1743: </PRE>
        !          1744: </BLOCKQUOTE>
        !          1745: </DIV>
        !          1746: 
        !          1747: <DIV class="subsection">
        !          1748: <H3>Exceptions</H3>
        !          1749: 
        !          1750: <P>
        !          1751: The behavior of the Thot editor and the actions that it performs are
        !          1752: determined by the structure schemas.  These actions are applied to all
        !          1753: document and object types in accordance with their generic structure.  For
        !          1754: certain object types, such as tables and graphics, these actions are not
        !          1755: sufficient or are poorly adapted and some special actions must be added to or
        !          1756: substituted for certain standard actions.  These special actions are called
        !          1757: <EM>exceptions</EM>.</P>
        !          1758: <P>
        !          1759: Exceptions only inhibit or modify certain standard actions, but they can be
        !          1760: used freely in every structure schema.</P>
        !          1761: <P>
        !          1762: Each structure schema can contain a section defining exceptions.  It begins
        !          1763: with the keyword <TT>EXCEPT</TT> and is composed of a sequence of exception
        !          1764: declarations, separated by semicolons.  Each declaration of an exception
        !          1765: begins with the name of an element type or attribute followed by a colon. This
        !          1766: indicates the element type or attribute to which the following exceptions
        !          1767: apply.  When the given element type name is a <A href="#pairs">mark pair</A>,
        !          1768: and only in this case, the type name can be preceded by the keyword
        !          1769: <TT>First</TT> or <TT>Second</TT>, to indicate if the exceptions which follow
        !          1770: are associated with the first mark of the pair or the second.  In the absence
        !          1771: of this keyword, the first mark is used.</P>
        !          1772: <P>
        !          1773: When placed in an <A href="#extsch">extension schema</A>, the keyword
        !          1774: <TT>EXTERN</TT> indicates that the type name which follows is found in the
        !          1775: principal schema (the schema being extended by the extension schema).  The
        !          1776: exceptions are indicated by a name.  They are separated by semicolons.</P>
        !          1777: <PRE>
        !          1778:                   [ 'EXCEPT' ExceptSeq ]
        !          1779: 
        !          1780:      ExceptSeq     = Except ';' &lt; Except ';' > .
        !          1781:      Except        = [ 'EXTERN' ] [ FirstSec ] ExcTypeOrAttr
        !          1782:                      ':' ExcValSeq .
        !          1783:      ExcTypeOrAttr = ElemID / AttrID .
        !          1784:      ExcValSeq     = ExcValue &lt; ',' ExcValue > .
        !          1785:      ExcValue      ='NoCut' / 'NoCreate' /
        !          1786:                     'NoHMove' / 'NoVMove' / 'NoMove' /
        !          1787:                     'NoHResize' / 'NoVResize' / 'NoResize' /
        !          1788:                     'NewWidth' / 'NewHeight' /
        !          1789:                     'NewHPos' / 'NewVPos' /
        !          1790:                     'Invisible' / 'NoSelect' /
        !          1791:                     'Hidden' / 'ActiveRef' /
        !          1792:                     'ImportLine' / 'ImportParagraph' /
        !          1793:                     'NoPaginate' / 'ParagraphBreak' /
        !          1794:                     'HighlightChildren' / 'ExtendedSelection' .
        !          1795: </PRE>
        !          1796: <P>
        !          1797: The following are the available exceptions:</P>
        !          1798: <DL>
        !          1799: <DT><TT>NoCut</TT></DT>
        !          1800: <DD>This exception can only be applied to elementtypes.  Elements of a type to
        !          1801: which this exception is applied cannotbe destroyed by the editor.
        !          1802: </DD>
        !          1803: <DT><TT>NoCreate</TT></DT>
        !          1804: <DD>This exception can only be applied to elementtypes.  Elements of a type to
        !          1805: which this exception is applied cannotbe created by ordinary commands for
        !          1806: creating new elements.  Theseelements are usually created by special actions
        !          1807: associated with otherexceptions.
        !          1808: </DD>
        !          1809: <DT><TT>NoHMove</TT></DT>
        !          1810: <DD>This exception can only be applied to elementtypes.  Elements of a type to
        !          1811: which this exception is applied cannotbe moved horizontally with the mouse.
        !          1812: </DD>
        !          1813: <DT><TT>NoVMove</TT></DT>
        !          1814: <DD>This exception can only be applied to elementtypes.  Elements of a type to
        !          1815: which this exception is applied cannotbe moved vertically with the mouse.
        !          1816: </DD>
        !          1817: <DT><TT>NoMove</TT></DT>
        !          1818: <DD>This exception can only be applied to elementtypes.  Elements of a type to
        !          1819: which this exception is applied cannotbe moved in any direction with the
        !          1820: mouse.
        !          1821: </DD>
        !          1822: <DT><TT>NoHResize</TT></DT>
        !          1823: <DD>This exception can only be applied to elementtypes.  Elements of a type to
        !          1824: which this exception is applied cannotbe resized horizontally with the mouse.
        !          1825: </DD>
        !          1826: <DT><TT>NoVResize</TT></DT>
        !          1827: <DD>This exception can only be applied to elementtypes.  Elements of a type to
        !          1828: which this exception is applied cannotbe resized vertically with the mouse.
        !          1829: </DD>
        !          1830: <DT><TT>NoResize</TT></DT>
        !          1831: <DD>This exception can only be applied to elementtypes.  Elements of a type to
        !          1832: which this exception is applied cannotbe resized in any direction with the
        !          1833: mouse.
        !          1834: </DD>
        !          1835: <DT><TT>NoSelect</TT></DT>
        !          1836: <DD>This exception can only be applied to elementtypes.  Elements of a type to
        !          1837: which this exception is applied cannotbe selected directly with the mouse, but
        !          1838: they can be selected by othermethods provided by the editor.
        !          1839: </DD>
        !          1840: <DT><TT>NewWidth</TT></DT>
        !          1841: <DD>This exception can only be applied to numericattributes.  If the width of
        !          1842: an element which has this attribute ismodified with the mouse, the value of
        !          1843: the new width will be assignedto the attribute.
        !          1844: </DD>
        !          1845: <DT><TT>NewHeight</TT></DT>
        !          1846: <DD>This exception can only be applied to numericattributes.  If the height of
        !          1847: an element which has this attribute ismodified with the mouse, the value of
        !          1848: the new height will be assignedto the attribute.
        !          1849: </DD>
        !          1850: <DT><TT>NewHPos</TT></DT>
        !          1851: <DD>This exception can only be applied to numericattributes.  If the
        !          1852: horizontal position of an element which has thisattribute is modified with the
        !          1853: mouse, the value of the new horizontalposition will be assigned to the
        !          1854: attribute.
        !          1855: </DD>
        !          1856: <DT><TT>NewVPos</TT></DT>
        !          1857: <DD>This exception can only be applied to numericattributes.  If the vertical
        !          1858: position of an element which has thisattribute is modified with the mouse, the
        !          1859: value of the new verticalposition will be assigned to the attribute.
        !          1860: </DD>
        !          1861: <DT><TT>Invisible</TT></DT>
        !          1862: <DD>This exception can only be applied toattributes, but can be applied to all
        !          1863: attribute types.  It indicatesthat the attribute must not be seen by the user
        !          1864: and that its valuemust not be changed directly.  This exception is usually
        !          1865: used whenanother exception manipulates the value of an attribute.
        !          1866: </DD>
        !          1867: <DT><TT>Hidden</TT></DT>
        !          1868: <DD>This exception can only be applied to elementtypes.  It indicates that
        !          1869: elements of this type, although present inthe document's structure, must not
        !          1870: be shown to the user of the editor.In particular, the creation menus must not
        !          1871: propose this type and theselection message must not pick it.
        !          1872: </DD>
        !          1873: <DT><TT>ActiveRef</TT></DT>
        !          1874: <DD>This exception can only be applied toattributes of the reference type.  It
        !          1875: indicates that when the user ofthe editor makes a double click on an element
        !          1876: which possesses areference attribute having this exception, the element
        !          1877: designated bythe reference attribute will be selected.
        !          1878: </DD>
        !          1879: <DT><TT>ImportLine</TT></DT>
        !          1880: <DD>This exception can only be applied to elementtypes.  It indicates that
        !          1881: elements of this type should receive thecontent of imported text files.  An
        !          1882: element is created for each lineof the imported file.  A structure schema
        !          1883: cannot contain severalexceptions <TT>ImportLine</TT>and, if it contains one,
        !          1884: it should notcontain any exception <TT>ImportParagraph</TT>.
        !          1885: </DD>
        !          1886: <DT><TT>ImportParagraph</TT></DT>
        !          1887: <DD>This exception can only be applied to elementtypes.  It indicates that
        !          1888: elements of this type should receive thecontent of imported text files.  An
        !          1889: element is created for each paragraphof the imported file.  A paragraph is a
        !          1890: sequence of lines without anyempty line.  A structure schema cannot contain
        !          1891: several exceptions<TT>ImportParagraph</TT>and, if it contains one, it should
        !          1892: not contain anyexception <TT>ImportLine</TT>.
        !          1893: </DD>
        !          1894: <DT><TT>NoPaginate</TT></DT>
        !          1895: <DD>This exception can only be applied to the rootelement, i.e. the name that
        !          1896: appear after the keyword <TT>STRUCTURE</TT>at thebeginning of the structure
        !          1897: schema.  It indicates that the editor should notallow the user to paginate
        !          1898: documents of that type.
        !          1899: </DD>
        !          1900: <DT><TT>ParagraphBreak</TT></DT>
        !          1901: <DD>This exception can only be applied to elementtypes.  When the caret is
        !          1902: within an element of a type to which this exceptionis applied, it is that
        !          1903: element that will be split when the user hits theReturn key.
        !          1904: </DD>
        !          1905: <DT><TT>HighlightChildren</TT></DT>
        !          1906: <DD>This exception can only be applied to elementtypes.  Elements of a type to
        !          1907: which this exception is applied are nothighlighted themselves when they are
        !          1908: selected, but all their children arehighlighted instead.
        !          1909: </DD>
        !          1910: <DT><TT>ExtendedSelection</TT></DT>
        !          1911: <DD>This exception can only be applied to elementtypes.  The selection
        !          1912: extension command (middle button of the mouse) only addthe clicked element (if
        !          1913: it has that exception) to the current selection,without selecting other
        !          1914: elements between the current selection and theclicked element.
        !          1915: </DD>
        !          1916: </DL>
        !          1917: <BLOCKQUOTE class="example">
        !          1918: <P>
        !          1919: <STRONG>Example:</STRONG></P>
        !          1920: <P>
        !          1921: Consider a structure schema for object-style graphics which definesthe
        !          1922: Graphic_object element type with the associated Height and Weight
        !          1923: numericattributes.  Suppose that we want documents of this class to have
        !          1924: thefollowing qualities:</P>
        !          1925: <UL>
        !          1926: <LI>Whenever the width or height of an object is changed using themouse, the
        !          1927: new values are stored in the object's Width andHeight attributes.
        !          1928: <LI>The user should not be able to change the values of theWidth and Height
        !          1929: attributes via the Attributes menu ofthe Thot editor.
        !          1930: </UL>
        !          1931: <P>
        !          1932: The following exceptions will produce this effect.</P>
        !          1933: <PRE>
        !          1934: STRUCT
        !          1935: ...
        !          1936:    Objet_graphique (ATTR Height = Integer; Width = Integer)
        !          1937:        = GRAPHICS with Height ?= 10, Width ?= 10;
        !          1938: ...
        !          1939: EXCEPT
        !          1940:    Height: NewHeight, Invisible;
        !          1941:    Width: NewWidth, Invisible;
        !          1942: </PRE>
        !          1943: </BLOCKQUOTE>
        !          1944: </DIV>
        !          1945: </DIV>
        !          1946: 
        !          1947: <DIV class="section">
        !          1948: <H2>Some examples</H2>
        !          1949: 
        !          1950: <P>
        !          1951: In order to illustrate the principles of the document model and the syntax of
        !          1952: the S language, this section presents two examples of structure schemas. One
        !          1953: defines a class of documents, the other defines a class of objects.</P>
        !          1954: 
        !          1955: <DIV class="subsection">
        !          1956: <H3>A class of documents: articles</H3>
        !          1957: 
        !          1958: <P>
        !          1959: This example shows a possible structure for articles published in a journal.
        !          1960: Text between braces is comments.</P>
        !          1961: <PRE>
        !          1962: STRUCTURE Article;  { This schema defines the Article class }
        !          1963: DEFPRES ArticleP;   { The default presentation schema is
        !          1964:                       ArticleP }
        !          1965: ATTR                { Global attribute definitions }
        !          1966:    WordType = Definition, IndexWord, DocumentTitle;
        !          1967:    { A single global attribute is defined, with three values }
        !          1968: STRUCT              { Definition of the generic structure }
        !          1969:    Article = BEGIN  { The Article class has an aggregate
        !          1970:                       structure }
        !          1971:              Title = BEGIN   { The title is an aggregate }
        !          1972:                      French_title = 
        !          1973:                          Text WITH Language='Fran\347ais';
        !          1974:                      English_title =
        !          1975:                          Text WITH Language='English';
        !          1976:                      END;
        !          1977:              Authors = 
        !          1978:                LIST OF (Author
        !          1979:                  (ATTR Author_type=principal,secondary)
        !          1980:                  { The Author type has a local attribute }
        !          1981:                  = BEGIN
        !          1982:                    Author_name = Text;
        !          1983:                    Info = Paragraphs ;
        !          1984:                    { Paragraphs is defined later }
        !          1985:                    Address    = Text;
        !          1986:                    END
        !          1987:                  );
        !          1988:              Keywords = Text;
        !          1989:              { The journal's editor introduces the article
        !          1990:                with a short introduction, in French and
        !          1991:                in English }
        !          1992:              Introduction = 
        !          1993:                  BEGIN
        !          1994:                  French_intr  = Paragraphs WITH
        !          1995:                                 Language='Fran\347ais';
        !          1996:                  English_intr = Paragraphs WITH
        !          1997:                                 Language='English';
        !          1998:                  END;
        !          1999:              Body = Sections; { Sections are defined later }
        !          2000:                    { Appendixes are only created on demand }
        !          2001:            ? Appendices = 
        !          2002:                  LIST OF (Appendix =
        !          2003:                           BEGIN
        !          2004:                           Appendix_Title    = Text;
        !          2005:                           Appendix_Contents = Paragraphs;
        !          2006:                           END
        !          2007:                          );
        !          2008:              END;      { End of the Article aggregate }
        !          2009: 
        !          2010:     Sections = LIST [2..*] OF (
        !          2011:                  Section = { At least 2 sections }
        !          2012:                  BEGIN
        !          2013:                  Section_title   = Text;
        !          2014:                  Section_contents =
        !          2015:                    BEGIN
        !          2016:                    Paragraphs;
        !          2017:                    Sections; { Sections at a lower level }
        !          2018:                    END;
        !          2019:                  END
        !          2020:                  );
        !          2021: 
        !          2022:     Paragraphs = LIST OF (Paragraph = CASE OF
        !          2023:                                Enumeration = 
        !          2024:                                    LIST [2..*] OF
        !          2025:                                        (Item = Paragraphs);
        !          2026:                                Isolated_formula = Formula;
        !          2027:                                LIST OF (UNIT);
        !          2028:                                END
        !          2029:                           );
        !          2030: 
        !          2031: ASSOC         { Associated elements definitions }
        !          2032: 
        !          2033:    Figure = BEGIN
        !          2034:             Figure_legend  = Text;
        !          2035:             Illustration   = NATURE;
        !          2036:             END;
        !          2037: 
        !          2038:    Biblio_citation = CASE OF
        !          2039:                         Ref_Article =
        !          2040:                            BEGIN
        !          2041:                            Authors_Bib   = Text;
        !          2042:                            Article_Title = Text;
        !          2043:                            Journal       = Text;
        !          2044:                            Page_Numbers  = Text;
        !          2045:                            Date          = Text;
        !          2046:                            END;
        !          2047:                         Ref_Livre =
        !          2048:                            BEGIN
        !          2049:                            Authors_Bib; { Defined above }
        !          2050:                            Book_Title   = Text;
        !          2051:                            Editor       = Text;
        !          2052:                            Date;        { Defined above }
        !          2053:                            END;
        !          2054:                        END;
        !          2055: 
        !          2056:    Note =  Paragraphs - (Ref_note);
        !          2057: 
        !          2058: UNITS      { Elements which can be used in objects }
        !          2059: 
        !          2060:    Ref_note    = REFERENCE (Note);
        !          2061:    Ref_biblio  = REFERENCE (Biblio_citation);
        !          2062:    Ref_figure  = REFERENCE (Figure);
        !          2063:    Ref_formula = REFERENCE (Isolated_formula);
        !          2064: 
        !          2065: EXPORT     { Skeleton elements }
        !          2066: 
        !          2067:    Title,
        !          2068:    Figure with Figure_legend,
        !          2069:    Section With Section_title;
        !          2070: 
        !          2071: END           { End of the structure schema }
        !          2072: </PRE>
        !          2073: <P>
        !          2074: This schema is very complete since it defines both paragraphs and
        !          2075: bibliographic citations.  These element types could just as well be defined in
        !          2076: other structure schemas, as is the case with the <TT>Formula</TT> class.  All
        !          2077: sorts of other elements can be inserted into an article, since a paragraph can
        !          2078: contain any type of unit.  Similarly, figures can be any class of document or
        !          2079: object that the user chooses.</P>
        !          2080: <P>
        !          2081: Generally, an article doesn't contain appendices, but it is possible to add
        !          2082: them on explicit request:  this is the effect of the question mark before the
        !          2083: word Appendices.</P>
        !          2084: <P>
        !          2085: The Figure, Biblio_citation and Note elements are associated elements. Thus,
        !          2086: they are only used in <TT>REFERENCE</TT> statements.</P>
        !          2087: <P>
        !          2088: Various types of cross-references can be put in paragraphs.  They can also be
        !          2089: placed the objects which are part of the article, since the cross-references
        !          2090: are defined as units (<TT>UNITS</TT>).</P>
        !          2091: <P>
        !          2092: There is a single restriction to prevent the creation of Ref_note elements
        !          2093: within notes.</P>
        !          2094: <P>
        !          2095: It is worth noting that the S language permits the definition of recursive
        !          2096: structures like sections: a section can contain other sections (which are thus
        !          2097: at the next lower level of the document tree).  Paragraphs are also recursive
        !          2098: elements, since a paragraph can contain an enumeration in which each element
        !          2099: (<TT>Item</TT>) is composed of paragraphs.</P>
        !          2100: </DIV>
        !          2101: 
        !          2102: <DIV class="subsection">
        !          2103: <H3>A class of objects: mathematical formulas</H3>
        !          2104: 
        !          2105: <P>
        !          2106: The example below defines the <TT>Formula</TT> class which is used in Article
        !          2107: documents.  This class represents mathematical formulas  with a rather simple
        !          2108: structure, but sufficient to produce a correct rendition on the screen or
        !          2109: printer.  To support more elaborate operations (formal or numeric
        !          2110: calculations), a finer structure should be defined. This class doesn't use any
        !          2111: other class and doesn't define any associated elements or units.</P>
        !          2112: <PRE>
        !          2113: STRUCTURE Formula;
        !          2114: DEFPRES FormulaP;
        !          2115: 
        !          2116: ATTR
        !          2117:    String_type = Function_name, Variable_name;
        !          2118: 
        !          2119: STRUCT
        !          2120:    Formula      = Expression;
        !          2121:    Expression   = LIST OF (Construction);
        !          2122:    Construction = CASE OF
        !          2123:                   TEXT;         { Simple character string }
        !          2124:                   Index    = Expression;
        !          2125:                   Exponent = Expression;
        !          2126:                   Fraction =
        !          2127:                         BEGIN
        !          2128:                         Numerator  = Expression;
        !          2129:                         Denominator = Expression;
        !          2130:                         END;
        !          2131:                   Root = 
        !          2132:                         BEGIN
        !          2133:                       ? Order = TEXT;
        !          2134:                         Root_Contents = Expression;
        !          2135:                         END;
        !          2136:                   Integral =
        !          2137:                         BEGIN
        !          2138:                         Integration_Symbol = SYMBOL;
        !          2139:                         Lower_Bound        = Expression;
        !          2140:                         Upper_Bound        = Expression;
        !          2141:                         END;
        !          2142:                   Triple =
        !          2143:                         BEGIN
        !          2144:                         Princ_Expression = Expression;
        !          2145:                         Lower_Expression = Expression;
        !          2146:                         Upper_Expression = Expression;
        !          2147:                         END;
        !          2148:                   Column = LIST [2..*] OF 
        !          2149:                               (Element = Expression);
        !          2150:                   Parentheses_Block =
        !          2151:                         BEGIN
        !          2152:                         Opening  = SYMBOL;
        !          2153:                         Contents = Expression;
        !          2154:                         Closing  = SYMBOL;
        !          2155:                         END;
        !          2156:                   END;       { End of Choice Constructor }
        !          2157: END                          { End of Structure Schema }
        !          2158: </PRE>
        !          2159: <P>
        !          2160: This schema defines a single global attribute which allows functions and
        !          2161: variables to be distinguished.  In the presentation schema, this attribute can
        !          2162: be used to choose between roman (for functions) and italic characters (for
        !          2163: variables).</P>
        !          2164: <P>
        !          2165: A formula's structure is that of a mathematical expression, which is itself a
        !          2166: sequence of mathematical constructions.  A mathematical construction can be
        !          2167: either a simple character string, an index, an exponent, a fraction, a root,
        !          2168: etc.  Each of these mathematical constructions has a sensible structure which
        !          2169: generally includes one or more expressions, thus making the formula class's
        !          2170: structure definition recursive.</P>
        !          2171: <P>
        !          2172: In most cases, the roots which appear in the formulas are square roots and
        !          2173: their order (2) is not specified.  This is why the Order component is marked
        !          2174: optional by a question mark.  When explicitly requested, it is possible to add
        !          2175: an order to a root, for example for cube roots (order = 3).</P>
        !          2176: <P>
        !          2177: An integral is formed by an integration symbol, chosen by the user (simple
        !          2178: integral, double, curvilinear, etc.), and two bounds.  A more fine-grained
        !          2179: schema would add components for the integrand and the integration variable.
        !          2180: Similarly, the Block_Parentheses construction leaves the choice of opening and
        !          2181: closing symbols to the user.  They can be brackets, braces, parentheses,
        !          2182: etc.</P>
        !          2183: </DIV>
        !          2184: </DIV>
        !          2185: <HR>
        !          2186: </DIV>
        !          2187: 
        !          2188: <DIV class="chapter">
        !          2189: <H1>The P Language</H1>
        !          2190: 
        !          2191: 
        !          2192: <DIV class="section">
        !          2193: <H2>Document presentation</H2>
        !          2194: 
        !          2195: <P>
        !          2196: Because of the model adopted for Thot, the presentation of documents is
        !          2197: clearly separated from their structure and content.  After having presented
        !          2198: the logical structure of documents, we now detail the principles implemented
        !          2199: for their presentation.  The concept of <EM>presentation</EM> encompasses what
        !          2200: typographers call the page layout, the composition, and the model of the
        !          2201: document.  It is the set of operations which display the document on the
        !          2202: screen or print it on paper.  Like logical structure, document presentation is
        !          2203: defined generically with the help of a language, called P.</P>
        !          2204: 
        !          2205: <DIV class="subsection">
        !          2206: <H3>Two levels of presentation</H3>
        !          2207: 
        !          2208: <P>
        !          2209: The link between structure and presentation is clear: the logical organization
        !          2210: of a document is used to carry out its presentation, since the purpose of the
        !          2211: presentation is to make evident the organization of the document.  But the
        !          2212: presentation is equally dependent on the device used to render the document.
        !          2213: Certain presentation effects, notably changes of font or character set, cannot
        !          2214: be performed on all printers or on all screens.  This is why Thot uses a
        !          2215: two-level approach, where the presentation is first described in abstract
        !          2216: terms, without taking into account each particular device, and then the
        !          2217: presentation is realized within the constraints of a given device.</P>
        !          2218: <P>
        !          2219: Thus, presentation is only described as a function of the structure of the
        !          2220: documents and the image that would be produced on an idealized device.  For
        !          2221: this reason, presentation descriptions do not refer to any device
        !          2222: characteristics: they describe <EM>abstract presentations</EM> which can be
        !          2223: concretized on different devices.</P>
        !          2224: <P>
        !          2225: A presentation description also defines a <EM>generic presentation</EM>, since
        !          2226: it describes the appearance of a class of documents or objects. This generic
        !          2227: presentation must also be applied to document and object instances, each
        !          2228: conforming to its generic logical structure, but with all the allowances that
        !          2229: were called to mind above: missing elements, constructed elements with other
        !          2230: logical structures, etc.</P>
        !          2231: <P>
        !          2232: In order to preserve the homogeneity between documents and objects,
        !          2233: presentation is described with a single set of tools which support the layout
        !          2234: of a large document as well as the composition of objects like a graphical
        !          2235: figure or mathematical formula.  This unity of presentation description tools
        !          2236: contrasts with the traditional approach, which focuses more on documents than
        !          2237: objects and thus is based on the usual typographic conventions, such as the
        !          2238: placement of margins, indentations, vertical spaces, line lengths,
        !          2239: justification, font changes, etc.</P>
        !          2240: </DIV>
        !          2241: 
        !          2242: <DIV class="subsection">
        !          2243: <H3>Boxes</H3>
        !          2244: 
        !          2245: <P>
        !          2246: To assure the homogeneity of tools, all presentation in Thot, for documents as
        !          2247: well as for the objects which they contain, is based on the notion of the
        !          2248: <EM>box</EM>, such as was implemented in T<SUB><BIG>E</BIG></SUB>X.</P>
        !          2249: <P>
        !          2250: Corresponding to each element of the document is a box,  which is the
        !          2251: rectangle enclosing the element on the display device (screen or sheet of
        !          2252: paper);  the outline of this rectangle is normally not visible. The sides of
        !          2253: the box are parallel to the sides of the screen or the sheet of paper.  By way
        !          2254: of example, a box is associated with a character string, a line of text, a
        !          2255: page, a paragraph, a title, a mathematical formula, or a table cell.</P>
        !          2256: <P>
        !          2257: Whatever element it corresponds to, each box possesses four sides and four
        !          2258: axes, which we designate as follows (<A href="#boxes">see figure</A>):</P>
        !          2259: <DL>
        !          2260: <DT><TT> Top</TT></DT>
        !          2261: <DD>the upper side,
        !          2262: </DD>
        !          2263: <DT><TT> Bottom</TT></DT>
        !          2264: <DD>the lower side,
        !          2265: </DD>
        !          2266: <DT><TT> Left</TT></DT>
        !          2267: <DD>the left side,
        !          2268: </DD>
        !          2269: <DT><TT> Right</TT></DT>
        !          2270: <DD>the right side,
        !          2271: </DD>
        !          2272: <DT><TT> VMiddle</TT></DT>
        !          2273: <DD>the vertical axis passing through the centerof the box,
        !          2274: </DD>
        !          2275: <DT><TT> HMiddle</TT></DT>
        !          2276: <DD>the horizontal axis passing through the centerof the box,
        !          2277: </DD>
        !          2278: <DT><TT> VRef</TT></DT>
        !          2279: <DD>the vertical reference axis,
        !          2280: </DD>
        !          2281: <DT><TT> HRef</TT></DT>
        !          2282: <DD>the horizontal reference axis.
        !          2283: </DD>
        !          2284: </DL>
        !          2285: 
        !          2286: <DIV class="figure">
        !          2287: <HR>
        !          2288: <PRE>
        !          2289:         Left   VRef  VMiddle        Right
        !          2290:                  :      :
        !          2291:     Top   -----------------------------
        !          2292:           |      :      :             |
        !          2293:           |      :      :             |
        !          2294:           |      :      :             |
        !          2295:           |      :      :             |
        !          2296:           |      :      :             |
        !          2297: HMiddle ..|...........................|..
        !          2298:           |      :      :             |
        !          2299:           |      :      :             |
        !          2300:    HRef ..|...........................|..
        !          2301:           |      :      :             |
        !          2302:           |      :      :             |
        !          2303:   Bottom  -----------------------------
        !          2304:                  :      :
        !          2305: </PRE>
        !          2306: <P align=center>
        !          2307: <EM><A name="boxes">The sides and axes of boxes</A><EM></EM></EM></P>
        !          2308: <HR>
        !          2309: </DIV>
        !          2310: <P>
        !          2311: The principal role of boxes is to set the extent and position of the images of
        !          2312: the different elements of a document with respect to each other on the
        !          2313: reproduction device.  This is done by defining relations between the boxes of
        !          2314: different elements which give relative extents and positions to these
        !          2315: boxes.</P>
        !          2316: <P>
        !          2317: There are three types of boxes:</P>
        !          2318: <UL>
        !          2319: <LI>boxes corresponding to structural elements of the document,
        !          2320: <LI>presentation boxes,
        !          2321: <LI>page layout boxes.
        !          2322: </UL>
        !          2323: <P>
        !          2324: <STRONG>Boxes corresponding to structural elements of the document</STRONG>
        !          2325: are those which linked to each of the elements (base or structured) of the
        !          2326: logical structure of the document.  Such a box contains all the contents of
        !          2327: the element to which it corresponds (there is an exception: see rules
        !          2328: <TT>VertOverflow</TT> and <TT>HorizOverflow</TT>).  These boxes form a
        !          2329: tree-like structure, identical to that of the structural elements to which
        !          2330: they correspond.  This tree expresses the inclusion relationships between the
        !          2331: boxes: a box includes all the boxes of its subtree.  On the other hand, there
        !          2332: are no predefined rules for the relative positions of the included boxes.  If
        !          2333: they are at the same level, they can overlap, be contiguous, or be disjoint.
        !          2334: The rules expressed in the generic presentation specify their relative
        !          2335: positions.</P>
        !          2336: <P>
        !          2337: <STRONG>Presentation boxes</STRONG> represent elements which are not found in
        !          2338: the logical structure of the document but which are added to meet the needs of
        !          2339: presentation.  These boxes are linked to the elements of the logical structure
        !          2340: that are best suited to bringing them out. For example, they are used to add
        !          2341: the character string ``Summary:'' before the summary in the presentation of a
        !          2342: report or to represent the fraction bar in a formula, or also to make the
        !          2343: title of a field in a form appear.  These elements have no role in the logical
        !          2344: structure of the document: the presence of a Summary element in the document
        !          2345: does not require the creation of another structural object to hold the word
        !          2346: ``Summary''. Similarly, if a Fraction element contains both a Numerator
        !          2347: element and a Denominator element, the fraction bar has no purpose
        !          2348: structurally.  On the other hand, these elements of the presentation are
        !          2349: important for the reader of the reproduced document or for the user of an
        !          2350: editor.  This is why they must appear in the document's image.  It is the
        !          2351: generic presentation which specifies the presentation boxes to add by
        !          2352: indicating their content (a base element for which the value is specified) and
        !          2353: the position that they must take in the tree of boxes.  During editing, these
        !          2354: boxes cannot be modified by the user.</P>
        !          2355: <P>
        !          2356: <STRONG>Page layout boxes</STRONG> are boxes created implicitly by the page
        !          2357: layout rules.  These rules indicate how the contents of a structured element
        !          2358: must be broken into lines and pages.  In contrast to presentation boxes, these
        !          2359: line and page boxes do not depend on the logical structure of the document,
        !          2360: but rather on the physical constraints of the reproduction services: character
        !          2361: size, height and width of the window on the screen or of the sheet of
        !          2362: paper.</P>
        !          2363: </DIV>
        !          2364: 
        !          2365: <DIV class="subsection">
        !          2366: <H3>Views and visibility</H3>
        !          2367: 
        !          2368: <P>
        !          2369: One of the operations that one might wish to perform on a document is to view
        !          2370: it is different ways.  For this reason, it is possible to define several
        !          2371: <EM>views</EM> for the same document, or better yet, for all documents of the
        !          2372: same class.  A view is not a different presentation of the document, but
        !          2373: rather a filter which only allows the display of certain parts of the
        !          2374: document.  For example, it might be desirable to see only the titles of
        !          2375: chapters and sections in order to be able to move rapidly through the
        !          2376: document.  Such a view could be called a ``table of contents''.  It might also
        !          2377: be desirable to see only the mathematical formulas of a document in order to
        !          2378: avoid being distracted by the non-mathematical aspects of the document.  A
        !          2379: ``mathematics'' view could provide this service.</P>
        !          2380: <P>
        !          2381: Views, like presentation, are based on the generic logical structure. Each
        !          2382: document class, and each generic presentation, can be provided with views
        !          2383: which are particularly useful for that class or presentation.  For each view,
        !          2384: the <EM>visibility</EM> of elements is defined, indicated whether or not the
        !          2385: elements must be presented to the user.  The visibility is calculated  as a
        !          2386: function of the type of the elements or their hierarchical position in the
        !          2387: structure of the document.  Thus, for a table of contents, all the ``Chapter
        !          2388: Title'' and ``Section Title'' elements are made visible.  However, the
        !          2389: hierarchical level could be used to make the section titles invisible below a
        !          2390: certain threshold level.  By varying this threshold, the granularity of the
        !          2391: view can be varied.  In the ``mathematics'' view, only Formula elements would
        !          2392: be made visible, no matter what their hierarchical level.</P>
        !          2393: <P>
        !          2394: Because views are especially useful for producing a synthetic image of the
        !          2395: document, it is necessary to adapt the presentation of the elements to the
        !          2396: view in which they appear.  For example, it is inappropriate to have a page
        !          2397: break before every chapter title in the table of contents.  Thus, generic
        !          2398: presentations take into account the possible views and permit each element
        !          2399: type's presentation to vary according the view in which its image appears.</P>
        !          2400: <P>
        !          2401: <A name="views">Views</A> are also used, when editing documents, to display
        !          2402: the associated elements.  So, in addition to the primary view of the document,
        !          2403: there can be a ``notes'' view and a ``figures'' view which contain,
        !          2404: respectively, the associated elements of the Note and Figure types. In this
        !          2405: way, it is possible to see simultaneously the text which refers to these
        !          2406: elements and the elements themselves, even if they will be separated when
        !          2407: printed.</P>
        !          2408: </DIV>
        !          2409: 
        !          2410: <DIV class="subsection">
        !          2411: <H3>Pages</H3>
        !          2412: 
        !          2413: <P>
        !          2414: Presentation schemas can be defined which display the document as a long
        !          2415: scroll, without page breaks.  This type of schema is particularly well-suited
        !          2416: to the initial phase of work on a document, where jumps from page to page
        !          2417: would hinder composing and reading the document on a screen.  In this case,
        !          2418: the associated elements (such as notes), which are normally displayed in the
        !          2419: page footer, are presented in a separate window.  But, once the document is
        !          2420: written, it may be desirable to display the document on the screen in the same
        !          2421: manner in which it will be printed.  So, the presentation schema must define
        !          2422: pages.</P>
        !          2423: <P>
        !          2424: The P language permits the specification of the dimensions of pages as well as
        !          2425: their composition.  It is possible to generate running titles, page numbers,
        !          2426: zones at the bottom of the page for notes, etc.  The editor follows this model
        !          2427: and inserts page break marks in the document which are used during printing,
        !          2428: insuring that the pages on paper are the same as on the screen.</P>
        !          2429: <P>
        !          2430: Once a document has been edited with a presentation schema defining pages, it
        !          2431: contains page marks.  But it is always possible to edit the document using a
        !          2432: schema without pages.  In this case, the page marks are simply ignored by the
        !          2433: editor.  They are considered again as soon as a schema with pages is used.
        !          2434: Thus, the user is free to choose between schemas with and without pages.</P>
        !          2435: <P>
        !          2436: Thot treats the page break, rather than the page itself, as a box. This page
        !          2437: break box contains all the elements of one page's footer, a rule marking the
        !          2438: edge of this page, and all the elements of the next page's header.  The
        !          2439: elements of the header and footer can be running titles, page number,
        !          2440: associated elements (notes, for example), etc. All these elements, as well as
        !          2441: their content and graphical appearance, are defined by the generic
        !          2442: presentation.</P>
        !          2443: </DIV>
        !          2444: 
        !          2445: <DIV class="subsection">
        !          2446: <H3>Numbering</H3>
        !          2447: 
        !          2448: <P>
        !          2449: Many elements are numbered in documents: pages, chapters, sections, formulas,
        !          2450: theorems, notes, figures, bibliographic references, exercises, examples,
        !          2451: lemmas, etc.  Because Thot has a notion of logical structure, all of these
        !          2452: numbers (with the exception of pages) are redundant with information implicit
        !          2453: in the logical structure of the document.  Such numbers are simply a way to
        !          2454: make the structure of the document more visible.  So, they are part of the
        !          2455: document's presentation and are calculated by the editor from the logical
        !          2456: structure.  The structure does not contain numbers as such; it only defines
        !          2457: relative structural positions between elements, which serve as ordering
        !          2458: relations on these elements.</P>
        !          2459: <P>
        !          2460: If the structure schema defines the body of a document as a sequence of at
        !          2461: least two chapters:</P>
        !          2462: <PRE>
        !          2463: Body = LIST [2..*] OF Chapter ;
        !          2464: </PRE>
        !          2465: <P>
        !          2466: the sequence defined by the list constructor is ordered and eachchapter can be
        !          2467: assigned a number based on its rank in the Body list.Therefore, all elements
        !          2468: contained in lists a the structure of adocument can be numbered, but they are
        !          2469: not the only ones.  The treestructure induced by the aggregate, list, and
        !          2470: choice constructors(excluding references) defines a total order on the
        !          2471: elements of thedocument's primary structure.  So, it is possible to define
        !          2472: anumbering which uses this order, filtering elements according to theirtype so
        !          2473: that only certain element types are taken into account in thenumbering.  In
        !          2474: this way, it possible to number all the theorems andlemmas of a chapter in the
        !          2475: same sequence of numbers, even when theyare not part of the same list
        !          2476: constructor and appear at differentlevels of the document's tree.  By changing
        !          2477: the filter, they can benumbered separately: one sequence of numbers for
        !          2478: theorems, another forthe lemmas.</P>
        !          2479: <P>
        !          2480: Associated elements pose a special problem, since they are not part of the
        !          2481: document's primary structure, but are attached only by references, which
        !          2482: violate the total order of the document.  Then, these associated elements are
        !          2483: frequently numbered, precisely because the number is an effective way to
        !          2484: visualize the reference.  In order to resolve this problem, Thot implicitly
        !          2485: defines a list constructor for each type of associated element, gathering
        !          2486: together (and ordering) these elements.  Thus, the associated elements can be
        !          2487: numbered by type.</P>
        !          2488: <P>
        !          2489: Since they are calculated from the document's logical structure and only for
        !          2490: the needs of the presentation, numbers are presentation elements, described by
        !          2491: presentation boxes, just like the fraction bar or the word ``Summary''.
        !          2492: Nevertheless, numbers differ from these other boxes because their content
        !          2493: varies from instance to instance, even though they are of the same type,
        !          2494: whereas all fraction bars are horizontal lines and the same word ``Summary''
        !          2495: appears at the head of every document's summary.</P>
        !          2496: </DIV>
        !          2497: 
        !          2498: <DIV class="subsection">
        !          2499: <H3>Presentation parameters</H3>
        !          2500: 
        !          2501: <P>
        !          2502: The principal parameters which determine document presentation are the
        !          2503: <EM>positions</EM> and <EM>dimensions</EM> of boxes, the <EM>font</EM>, the
        !          2504: <EM>style</EM>, the <EM>size</EM>, the <EM>underlining</EM> and the
        !          2505: <EM>color</EM> of their content.  From these parameters, and some others of
        !          2506: less importance, it is possible to represent the usual typographic parameters
        !          2507: for the textual parts of the document.  These same parameters can be used to
        !          2508: describe the geometry of the non-textual elements, even though they are
        !          2509: two-dimensional elements unlike the text, which is linear.</P>
        !          2510: <P>
        !          2511: As we have already  seen, the positions of the boxes always respect the rule
        !          2512: of enclosure: a box in the tree encloses all the boxes of the next lower level
        !          2513: which are attached to it.  The positional parameters permit the specification
        !          2514: of the position of each box in relation to the enclosing box or to its sibling
        !          2515: boxes (boxes directly attached to the same enclosing box in the tree of
        !          2516: boxes).</P>
        !          2517: <P>
        !          2518: The presentation parameters also provide control over the dimensions of the
        !          2519: boxes.  The dimensions of a box can depend either on its content or on its
        !          2520: context (its sibling boxes and the enclosing box). Each dimension (height or
        !          2521: width) can be defined independently of the other.</P>
        !          2522: <P>
        !          2523: Because of the position and dimension parameters, it is possible to do the
        !          2524: same things that are normally done in typography by changing margins, line
        !          2525: lengths, and vertical or horizontal skips.  This approach can also align or
        !          2526: center elements and groups of elements.</P>
        !          2527: <P>
        !          2528: In contrast to the position and dimension parameters, the font, style, size,
        !          2529: underlining, and color do not concern the box itself (the rectangle delimiting
        !          2530: the element), but its content.  These parameters indicate the typographic
        !          2531: attributes which must be applied to the text contained in the box, and by
        !          2532: extension, to all base elements.</P>
        !          2533: <P>
        !          2534: For text, the font parameter is used to change the family of characters
        !          2535: (Times, Helvetica, Courier, etc.); the style is used to obtain italic or
        !          2536: roman, bold or light characters;  the size determines the point size of the
        !          2537: characters; underlining defines the type and thickness of the lines drawn
        !          2538: above, below, or through the characters.</P>
        !          2539: <P>
        !          2540: For graphics, the line style parameter can be either solid, dotted, or dashed;
        !          2541: the line thickness parameter controls the width of the lines; the fill pattern
        !          2542: parameter determines how closed geometric figures must be filled.</P>
        !          2543: <P>
        !          2544: While some of the parameters which determine the appearance of a box's
        !          2545: contents make sense only for one content type (text or graphic), other
        !          2546: parameters apply to all content types: these are the color parameters. These
        !          2547: indicate the color of lines and the background color.</P>
        !          2548: </DIV>
        !          2549: </DIV>
        !          2550: 
        !          2551: <DIV class="section">
        !          2552: <H2><A name="langp">Presentation description language</A></H2>
        !          2553: 
        !          2554: <P>
        !          2555: A generic presentation defines the values of presentation parameters (or the
        !          2556: way to calculate those values) for a generic structure, or more precisely, for
        !          2557: all the element types and all the global and local attributes defined in that
        !          2558: generic structure.  This definition of the presentation parameters is made
        !          2559: with the P language.  A program written in this language, that is a generic
        !          2560: presentation expressed in P, is call a <EM>presentation schema</EM>. This
        !          2561: section describes the syntax and semantics of the language, using the same <A
        !          2562: href="#metalang">meta-language</A> as was used for the definition of the S
        !          2563: language.</P>
        !          2564: <P>
        !          2565: Recall that it is possible to write many different presentation schemas for
        !          2566: the same class of documents or objects.  This allows users to choose for a
        !          2567: document the graphical appearance  which best suits their type of work or
        !          2568: their personal taste.</P>
        !          2569: 
        !          2570: <DIV class="subsection">
        !          2571: <H3>The organization of a presentation schema</H3>
        !          2572: 
        !          2573: <P>
        !          2574: A presentation schema begins with the word <TT>PRESENTATION</TT> and ends with
        !          2575: the word <TT>END</TT>.  The word <TT>PRESENTATION</TT> is followed by the name
        !          2576: of the generic structure to which the presentation will be applied.  This name
        !          2577: must be the same as that which follows the keyword <TT>STRUCTURE</TT> in the
        !          2578: structure schema associated with the presentation schema.</P>
        !          2579: <P>
        !          2580: After this declaration of the name of the structure, the following sections
        !          2581: appear (in order):</P>
        !          2582: <UL>
        !          2583: <LI>Declarations of
        !          2584: <UL>
        !          2585: <LI>all views,
        !          2586: <LI>printed views,
        !          2587: <LI>counters,
        !          2588: <LI>presentation constants,
        !          2589: <LI>variables,
        !          2590: </UL>
        !          2591: <LI>default presentation rules,
        !          2592: <LI>presentation box and page layout box definitions,
        !          2593: <LI>presentation rules for structured elements,
        !          2594: <LI>presentation rules for attributes,
        !          2595: <LI>rules for transmitting values to attributes of included documents.
        !          2596: </UL>
        !          2597: <P>
        !          2598: Each of these sections is introduced by a keyword which is followed by a
        !          2599: sequence of declarations.  Every section is optional.</P>
        !          2600: <PRE>
        !          2601:      SchemaPres ='PRESENTATION' ElemID ';'
        !          2602:                [ 'VIEWS' ViewSeq ]
        !          2603:                [ 'PRINT' PrintViewSeq ]
        !          2604:                [ 'COUNTERS' CounterSeq ]
        !          2605:                [ 'CONST' ConstSeq ]
        !          2606:                [ 'VAR' VarSeq ]
        !          2607:                [ 'DEFAULT' ViewRuleSeq ]
        !          2608:                [ 'BOXES' BoxSeq ]
        !          2609:                [ 'RULES' PresentSeq ]
        !          2610:                [ 'ATTRIBUTES' PresAttrSeq ]
        !          2611:                [ 'TRANSMIT' TransmitSeq ]
        !          2612:                  'END' .
        !          2613:      ElemID  = NAME .
        !          2614: </PRE>
        !          2615: </DIV>
        !          2616: 
        !          2617: <DIV class="subsection">
        !          2618: <H3>Views</H3>
        !          2619: 
        !          2620: <P>
        !          2621: Each of the possible views must be declared in the presentation schema.  As
        !          2622: has <A href="#views">already been described</A>, the presentation rules for an
        !          2623: element type can vary according to the view in which the element appears.  The
        !          2624: name of the view is used to designate the view to which the presentation rules
        !          2625: apply (see the <A href="#inkeyword"><TT>IN</TT> instruction</A>).  The
        !          2626: definition of the view's contents are dispersed throughout the presentation
        !          2627: rules attached to the different element types and attributes.  The
        !          2628: <TT>VIEWS</TT> section is simply a sequence of view names separated by commas
        !          2629: and terminated by a semi-colon.</P>
        !          2630: <P>
        !          2631: One of the view names (and only one) can be followed by the keyword
        !          2632: <TT>EXPORT</TT>.  This keyword identifies the view which presents the members
        !          2633: of the document class in <A href="#skeleton">skeleton form</A>.  The graphical
        !          2634: appearance  and the content of this view is defined just as with other views,
        !          2635: but it is useless to specify presentation rules concerning this view for the
        !          2636: elements which are not loaded in the skeleton form.</P>
        !          2637: <P>
        !          2638: It is not necessary to declare any views; in this case there is a single
        !          2639: unnamed view.  If many views are declared, the first view listed is considered
        !          2640: the principal view.  The principal view is the one to which all rules that are
        !          2641: not preceded by an indication of a view will apply (see the <A
        !          2642: href="#inkeyword">instruction <TT>IN</TT></A>).</P>
        !          2643: <P>
        !          2644: The principal view is the the one which the editor presents on the screen when
        !          2645: the user asks to create or edit a document.  Thus, it makes sense to put the
        !          2646: most frequently used view at the head of the list.  But if the structure
        !          2647: schema contains <A href="#skeleton">skeleton elements</A> and is loaded in its
        !          2648: skeleton form, the view whose name is followed by the keyword <TT>EXPORT</TT>
        !          2649: will be opened and no other views can be opened.</P>
        !          2650: <PRE>
        !          2651:                      'VIEWS' ViewSeq
        !          2652:      ViewSeq         = ViewDeclaration
        !          2653:                       &lt; ',' ViewDeclaration > ';' .
        !          2654:      ViewDeclaration = ViewID [ 'EXPORT' ] .
        !          2655:      ViewID          = NAME .
        !          2656: </PRE>
        !          2657: <BLOCKQUOTE class="example">
        !          2658: <P>
        !          2659: <STRONG>Example:</STRONG></P>
        !          2660: <P>
        !          2661: When editing a report, it might be useful have views of the table ofcontents
        !          2662: and of the mathematical formulas, in addition to theprincipal view which shows
        !          2663: the document in its entirety.  To achievethis, a presentation schema for the
        !          2664: Report class would have thefollowing <TT>VIEWS</TT>section:</P>
        !          2665: <PRE>
        !          2666: VIEWS
        !          2667:      Full_text, Table_of_contents, Formulas;
        !          2668: </PRE>
        !          2669: <P>
        !          2670: The contents of these views are specified in the presentation rules of the
        !          2671: schema.</P>
        !          2672: </BLOCKQUOTE>
        !          2673: </DIV>
        !          2674: 
        !          2675: <DIV class="subsection">
        !          2676: <H3>Print Views</H3>
        !          2677: 
        !          2678: <P>
        !          2679: When editing a document, each view is presented in a different window.  In
        !          2680: addition to the views specified by the <TT>VIEWS</TT> instruction, the user
        !          2681: can display the associated elements with one window for each type of
        !          2682: associated element.</P>
        !          2683: <P>
        !          2684: When printing a document, it is possible to print any number of views, chosen
        !          2685: from among all the views which the editor can display (views in the strict
        !          2686: sense or associated elements).  Print views, as well as the order in which
        !          2687: they must be printed, are indicated by the <TT>PRINT</TT> instruction. It
        !          2688: appears after the <TT>VIEWS</TT> instruction and is formed of the keyword
        !          2689: <TT>PRINT</TT> followed by the ordered list of print view names.  The print
        !          2690: view names are separated by commas and followed by a semi-colon.  A print view
        !          2691: name is either a view name declared in the <TT>VIEWS</TT> instruction or the
        !          2692: name of an associated element type (with an ``s'' added to the end).  The
        !          2693: associated element must have been declared in the <TT>ASSOC</TT> section of
        !          2694: the structure schema.</P>
        !          2695: <PRE>
        !          2696:                     'PRINT' PrintViewSeq
        !          2697:      PrintViewSeq = PrintView &lt; ',' PrintView > ';' .
        !          2698:      PrintView    = ViewID / ElemID .
        !          2699: </PRE>
        !          2700: <P>
        !          2701: If the <TT>PRINT</TT> instruction is absent, the printing program will print
        !          2702: only the principal view (the first view specified by the <TT>VIEWS</TT>
        !          2703: instruction or the single, unnamed view when there is no <TT>VIEWS</TT>
        !          2704: instruction).</P>
        !          2705: <BLOCKQUOTE class="example">
        !          2706: <P>
        !          2707: <STRONG>Example:</STRONG></P>
        !          2708: <P>
        !          2709: Consider a Report presentation using the view declarations from thepreceding
        !          2710: example.  Suppose we want to print the full text and tableof contents views,
        !          2711: but not the Formulas view, which is only usefulwhen editing.  In addition,
        !          2712: suppose that we also want to print thebibliographic citations, which are
        !          2713: associated elements (of type<TT>Citation</TT>).  A sensible printing order
        !          2714: would be to print the full textthen the bibliography and finally the table of
        !          2715: contents.  To obtainthis result when printing, the presentation schema would
        !          2716: say:</P>
        !          2717: <PRE>
        !          2718: PRINT
        !          2719:      Full_text, Citations, Table_of_contents;
        !          2720: </PRE>
        !          2721: </BLOCKQUOTE>
        !          2722: </DIV>
        !          2723: 
        !          2724: <DIV class="subsection">
        !          2725: <H3>Counters</H3>
        !          2726: 
        !          2727: <P>
        !          2728: A presentation has a <EM>counter</EM> for each type of number in the
        !          2729: presentation.  All counters, and therefore all types of numbers, used in the
        !          2730: schema must be declared after the <TT>COUNTERS</TT> keyword.</P>
        !          2731: <P>
        !          2732: Each counter declaration is composed of a name identifying the counter
        !          2733: followed by a colon and the counting function to be applied to the counter.
        !          2734: The counter declaration ends with a semi-colon.</P>
        !          2735: <P>
        !          2736: The counting function indicates how the counter values will be calculated.
        !          2737: Three types of counting functions are available.  The first type is used to
        !          2738: count the elements of a list or aggregate: it assigns to the counter the rank
        !          2739: of the element in the list or aggregate.  More precisely, the function</P>
        !          2740: <PRE>
        !          2741: RANK OF ElemID [ LevelAsc ] [ INIT AttrID ]
        !          2742:         [ 'REINIT' AttrID ]
        !          2743: </PRE>
        !          2744: <P>
        !          2745: indicates that when an element creates, by a creation rule (see the<A
        !          2746: href="#creation"><TT>Create</TT> instructions</A>), a presentationbox
        !          2747: containing  the counter value, this value is the rank of thecreating element,
        !          2748: if it is of type <TT>ElemID</TT>, otherwise the rank ofthe first element of
        !          2749: type <TT>ElemID</TT>which encloses the creatingelement in the logical
        !          2750: structure of the document.</P>
        !          2751: <P>
        !          2752: The type name can be preceded by a star in the special case where the
        !          2753: structure schema defines an element of whose <TT>ElemID</TT> is the same as
        !          2754: that of an <A href="#references">inclusion</A> without expansion or with
        !          2755: partial expansion.  To resolve this ambiguity, the <TT>ElemID</TT> alone
        !          2756: refers to the type defined in the structure schema while the <TT>ElemID</TT>
        !          2757: preceded by a star refers to the included type.</P>
        !          2758: <P>
        !          2759: The type name <TT>ElemID</TT> can be followed by an integer.  That number
        !          2760: represents the relative level, among the ancestors of the creating element, of
        !          2761: the element whose rank is asked.  If that relative level <I>n</I> is unsigned,
        !          2762: the <I>n</I><SUP>th</SUP> element of type <TT>ElemID</TT> encountered when
        !          2763: travelling the logical structure from the root to the creating element is
        !          2764: taken into account.  If the relative level is negative, the logical structure
        !          2765: is travelled in the other direction, from the creating element to the
        !          2766: root.</P>
        !          2767: <P>
        !          2768: The function can end with the keyword <TT>INIT</TT> followed by the name of a
        !          2769: numeric attribute (and only a numeric attribute).  Then, the rank of the first
        !          2770: element of the list or aggregate is considered to be the value of this
        !          2771: attribute, rather than the default value of 1, and the rank of the other
        !          2772: elements is shifted accordingly.  The attribute which determines the initial
        !          2773: value is searched on the element itself and on its ancestors.</P>
        !          2774: <P>
        !          2775: The function can end with the keyword <TT>REINIT</TT> followed by the name of
        !          2776: a numeric attribute (and only a numeric attribute).  Then, if an element to be
        !          2777: counted has this attribute, the counter value for this element is the
        !          2778: attribute value and the following elements are numbered starting from this
        !          2779: value.</P>
        !          2780: <P>
        !          2781: When the <TT>RANK</TT> function is written</P>
        !          2782: <PRE>
        !          2783: RANK OF Page [ ViewID ] [ INIT AttrID ]
        !          2784: </PRE>
        !          2785: <P>
        !          2786: (<TT>Page</TT>is a keyword of the P language), the counter takes as itsvalue
        !          2787: the number of the page on which the element which creates thepresentation box
        !          2788: containing the number appears.  This is done as ifthe pages of the document
        !          2789: form a list for each view.  The counter onlytakes into account the pages of
        !          2790: the relevant view, that is the viewdisplaying the presentation box whose
        !          2791: contents take the value of thenumber.  However, if the keyword <TT>Page</TT>is
        !          2792: followed by the name of aview (between parentheses), it is the pages of that
        !          2793: view that aretaken into account.  As in the preceding form, the
        !          2794: <TT>RANK</TT>functionapplied to pages can end with the <TT>INIT</TT>keyword
        !          2795: followed the nameof a numeric attribute which sets the value of the first
        !          2796: page'snumber.  This attribute must be a local attribute of the documentitself,
        !          2797: and not of one of its components.</P>
        !          2798: <P>
        !          2799: The second counting function is used to count the occurrences of a certain
        !          2800: element type in a specified context.  The instruction</P>
        !          2801: <PRE>
        !          2802: SET n ON Type1 ADD m ON Type2 [ INIT AttrID ]
        !          2803: </PRE>
        !          2804: <P>
        !          2805: says that when the document is traversed from beginning to end (in theorder
        !          2806: induced by the logical structure), the counter is assigned thevalue
        !          2807: <TT>n</TT>each time an element of type <TT>Type1</TT>is encountered, nomatter
        !          2808: what the current value of the counter, and the value <TT>m</TT>isadded to the
        !          2809: current value of the counter each time an element of type<TT>Type2</TT>is
        !          2810: encountered.</P>
        !          2811: <P>
        !          2812: As with the <TT>RANK</TT> function, the type names can be preceded by a star
        !          2813: to resolve the ambiguity of included elements.</P>
        !          2814: <P>
        !          2815: If the function ends with the keyword <TT>INIT</TT> followed by the name of an
        !          2816: attribute and if the document possesses this attribute, the value of this
        !          2817: attribute is used in place of <TT>n</TT>.  The attribute must be numeric.  It
        !          2818: is searched on the element itself and on its ancestors.</P>
        !          2819: <P>
        !          2820: This function can also be used with the <TT>Page</TT> keyword in the place of
        !          2821: <TT>Type1</TT> or <TT>Type2</TT>.  In the first case, the counter is
        !          2822: reinitialized on each page with the value <TT>n</TT>, while in the second
        !          2823: case, it is incremented by <TT>m</TT> on each page.  As with the preceding
        !          2824: counting function, the word <TT>Page</TT> can be followed by a name between
        !          2825: parentheses.  In this case, the name specifies a view whose pages are taken
        !          2826: into account.</P>
        !          2827: <P>
        !          2828: The definition of a counter can contain several <TT>SET</TT> functions and
        !          2829: several <TT>ADD</TT> functions, each with a different value.  The total number
        !          2830: of counting functions must not be greater than 6.</P>
        !          2831: <P>
        !          2832: The third counting function is used to count the elements of a certain type
        !          2833: encountered when travelling from the creating element to the root of the
        !          2834: logical structure.  The creating element is included if it is of that type.
        !          2835: That function is written</P>
        !          2836: <PRE>
        !          2837: RLEVEL OF Type
        !          2838: </PRE>
        !          2839: <P>
        !          2840: where <TT>Type</TT>represents the type of the elements to be counted.</P>
        !          2841: <P>
        !          2842: The formal definition of counter declarations is:</P>
        !          2843: <PRE>
        !          2844:                     'COUNTERS' CounterSeq
        !          2845:      CounterSeq   = Counter &lt; Counter > .
        !          2846:      Counter      = CounterID ':' CounterFunc ';' .
        !          2847:      CounterID    = NAME .
        !          2848:      CounterFunc  = 'RANK' 'OF' TypeOrPage [ SLevelAsc ]
        !          2849:                     [ 'INIT' AttrID ] [ 'REINIT' AttrID ] /
        !          2850:                     SetFunction &lt; SetFunction >
        !          2851:                     AddFunction &lt; AddFunction >
        !          2852:                     [ 'INIT' AttrID ] /
        !          2853:                     'RLEVEL' 'OF' ElemID .
        !          2854:      SLevelAsc    = [ '-' ] LevelAsc .
        !          2855:      LevelAsc     =  NUMBER .
        !          2856:      SetFunction  = 'SET' CounterValue 'ON' TypeOrPage .
        !          2857:      AddFunction  = 'ADD' CounterValue 'ON' TypeOrPage .
        !          2858:      TypeOrPage   = 'Page' [ '(' ViewID ')' ] / 
        !          2859:                     [ '*' ] ElemID .
        !          2860:      CounterValue = NUMBER .
        !          2861: </PRE>
        !          2862: <BLOCKQUOTE class="example">
        !          2863: <P>
        !          2864: <STRONG>Example:</STRONG></P>
        !          2865: <P>
        !          2866: If the body of a chapter is defined as a sequence of sections in thestructure
        !          2867: schema:</P>
        !          2868: <PRE>
        !          2869: Chapter_body = LIST OF (Section = 
        !          2870:                             BEGIN
        !          2871:                             Section_Title = Text;
        !          2872:                             Section_Body  = Paragraphs;
        !          2873:                             END
        !          2874:                          );
        !          2875: </PRE>
        !          2876: <P>
        !          2877: the section counter is declared:</P>
        !          2878: <PRE>
        !          2879: SectionCtr : RANK OF Section;
        !          2880: </PRE>
        !          2881: <P>
        !          2882: and the display of the section number before the section title isobtained by a
        !          2883: <A href="#creation"><TT>CreateBefore</TT> rule</A>attached the
        !          2884: <TT>Section_Title</TT>type, which creates a presentationbox whose content is
        !          2885: the value of the <TT>SectionCtr</TT>counter (seethe <A
        !          2886: href="#content"><TT>Content</TT> instruction</A>).</P>
        !          2887: <P>
        !          2888: In order to number the formulas separately within each chapter, the formula
        !          2889: counter is declared:</P>
        !          2890: <PRE>
        !          2891: FormulaCtr : SET 0 ON Chapter ADD 1 ON Formula;
        !          2892: </PRE>
        !          2893: <P>
        !          2894: and the display of the formula number in the right margin, alongsideeach
        !          2895: formula, is obtained by a <TT>CreateAfter</TT>instruction attachedto the
        !          2896: <TT>Formula</TT>type, which creates a presentation box whosecontent is the
        !          2897: value of the <TT>FormulaCtr</TT>counter.</P>
        !          2898: <P>
        !          2899: To number the page chapter by chapter, with the first page of each chapter
        !          2900: having the number 1, the counter definition would be</P>
        !          2901: <PRE>
        !          2902: ChapterPageCtr : SET 0 ON Chapter ADD 1 ON Page;
        !          2903: </PRE>
        !          2904: <P>
        !          2905: If there is also a chapter counter</P>
        !          2906: <PRE>
        !          2907: ChapterCtr : RANK OF Chapter;
        !          2908: </PRE>
        !          2909: <P>
        !          2910: the <A href="#content">content</A>of a presentation box createdat the top of
        !          2911: each page could be defined as:</P>
        !          2912: <PRE>
        !          2913: Content : (VALUE(ChapterCtr, URoman) TEXT '-'
        !          2914:            VALUE(ChapterPageCtr, Arabic));
        !          2915: </PRE>
        !          2916: <P>
        !          2917: Thus, the presentation box contains the number of the chapter inupper-case
        !          2918: romannumerals followed by a hyphen and the number of the page within
        !          2919: thechapter in arabic numerals.</P>
        !          2920: </BLOCKQUOTE>
        !          2921: <BLOCKQUOTE class="example">
        !          2922: <P>
        !          2923: <STRONG>Example:</STRONG></P>
        !          2924: <P>
        !          2925: To count tables and figures together in a document of the chaptertype, a
        !          2926: counter could be defined using:</P>
        !          2927: <PRE>
        !          2928: CommonCtr : SET 0 ON Chapter ADD 1 ON Table
        !          2929:             ADD 1 ON Figure;
        !          2930: </PRE>
        !          2931: </BLOCKQUOTE>
        !          2932: </DIV>
        !          2933: 
        !          2934: <DIV class="subsection">
        !          2935: <H3><A name="presconst">Presentation constants</A></H3>
        !          2936: 
        !          2937: <P>
        !          2938: Presentation constants are used in the definition of the content of
        !          2939: presentation boxes.  This content is used in <A href="#variables">variable
        !          2940: definitions</A> and in the <A href="#content"><TT>Content</TT> rule</A>.  The
        !          2941: only presentation constants which can be used are character strings,
        !          2942: mathematical symbols, graphical elements, and images, that is to say, base
        !          2943: elements.</P>
        !          2944: <P>
        !          2945: Constants can be defined directly in the variables or presentation boxes
        !          2946: (<TT>Content</TT> rule) which use them.  But it is only necessary them to
        !          2947: declare once, in the constant declaration section, even though they are used
        !          2948: in many variables or boxes.  Thus, each declared constant has a name, which
        !          2949: allows it to be designated whenever it is used, a type (one of the four base
        !          2950: types) and a value (a character string or a single character for mathematical
        !          2951: symbols and graphical elements).</P>
        !          2952: <P>
        !          2953: The constant declarations appear after the keyword <TT>CONST</TT>.  Each
        !          2954: declaration is composed of the name of the constant, an equals sign, a keyword
        !          2955: representing its type (<TT>Text</TT>, <TT>Symbol</TT>, <TT>Graphics</TT> or
        !          2956: <TT>Picture</TT>) and the string representing its value. A semi-colon
        !          2957: terminates each declaration.</P>
        !          2958: <P>
        !          2959: In the case of a character string, the keyword <TT>Text</TT> can be followed
        !          2960: by the name of an alphabet (for example, <TT>Greek</TT> or <TT>Latin</TT>) in
        !          2961: which the constant's text should be expressed.  If the alphabet name is
        !          2962: absent, the Latin alphabet is used.  When the alphabet name is present, only
        !          2963: the first letter of the alphabet name is interpreted.  Thus, the words
        !          2964: <TT>Greek</TT> and <TT>Grec</TT> designate the same alphabet.  In current
        !          2965: versions of Thot, only the Greek and Latin alphabets are available.</P>
        !          2966: <PRE>
        !          2967:                  'CONST' ConstSeq
        !          2968:      ConstSeq   = Const &lt; Const > .
        !          2969:      Const      = ConstID '=' ConstType ConstValue ';' .
        !          2970:      ConstID    = NAME .
        !          2971:      ConstType  ='Text' [ Alphabet ] / 'Symbol' /
        !          2972:                  'Graphics' / 'Picture' .
        !          2973:      ConstValue = STRING .
        !          2974:      Alphabet   = NAME .
        !          2975: </PRE>
        !          2976: <P>
        !          2977: For character strings in the Latin alphabet (ISO-Latin 1 character set),
        !          2978: characters having codes higher than 127 (decimal) are represented by their
        !          2979: code in octal.</P>
        !          2980: <P>
        !          2981: In the case of a symbol or graphical element, the value only contains a single
        !          2982: character, between apostrophes, which indicates the form of the element which
        !          2983: must be drawn in the box whose content is the constant.  The symbol or
        !          2984: graphical element takes the dimensions of the box, which are determined by the
        !          2985: <TT>Height</TT> and <TT>Width</TT> rules. See <A href="#symbolcoding">table of
        !          2986: codes</A> for the symbols and graphical elements.</P>
        !          2987: <BLOCKQUOTE class="example">
        !          2988: <P>
        !          2989: <STRONG>Example:</STRONG></P>
        !          2990: <P>
        !          2991: The constants ``Summary:'' and fraction bar, which were describedearlier, are
        !          2992: declared:</P>
        !          2993: <PRE>
        !          2994: CONST
        !          2995:      SummaryConst = Text 'Summary:';
        !          2996:      Bar          = Graphics 'h';
        !          2997: </PRE>
        !          2998: </BLOCKQUOTE>
        !          2999: </DIV>
        !          3000: 
        !          3001: <DIV class="subsection">
        !          3002: <H3><A name="variables">Variables</A></H3>
        !          3003: 
        !          3004: <P>
        !          3005: Variables permit the definition of computed content for presentation boxes. A
        !          3006: variable is associated with a presentation box by a <TT>Content</TT> rule; but
        !          3007: before being used in a <TT>Content</TT> rule, a variable can be defined in the
        !          3008: <TT>VAR</TT> section.  It is also possible to define a variable at the time of
        !          3009: its use in a <TT>Content</TT> rule, as can be done with a constant.</P>
        !          3010: <P>
        !          3011: A variable has a name and a value which is a character string resulting from
        !          3012: the concatenation of the values of a sequence of functions.  Each variable
        !          3013: declaration is composed of the variable name followed by a colon and the
        !          3014: sequence of functions which produces its value, separated by spaces.  Each
        !          3015: declaration is terminated by a semi-colon.</P>
        !          3016: <PRE>
        !          3017:                   'VAR' VarSeq
        !          3018:      VarSeq      = Variable &lt; Variable > .
        !          3019:      Variable    = VarID ':' FunctionSeq ';' .
        !          3020:      VarID       = NAME .
        !          3021:      FunctionSeq = Function &lt; Function > .
        !          3022: </PRE>
        !          3023: <P>
        !          3024: Several functions are available.  The first two return, in the form of a
        !          3025: character string, the current date.  <TT>DATE</TT> returns the date in
        !          3026: English, while <TT>FDATE</TT> returns the date in french.</P>
        !          3027: <P>
        !          3028: Two other functions, <TT>DocName</TT> and <TT>DirName</TT>, return the
        !          3029: document name and the directory where the document is stored.</P>
        !          3030: <P>
        !          3031: Function <TT>ElemName</TT> returns the type of the element which created the
        !          3032: presentation box whose contents are the variable.</P>
        !          3033: <P>
        !          3034: Another function simply returns the value of a presentation constant. For any
        !          3035: constant declared in the <TT>CONST</TT> section, it is sufficient to give the
        !          3036: name of the constant.  Otherwise, the type and value of the constant must be
        !          3037: given, using the same form as in a <A href="#presconst">constant
        !          3038: declaration</A>. If the constant is not of type text, (types <TT>Symbol</TT>,
        !          3039: <TT>Graphics</TT> or <TT>Picture</TT>), it must be alone in the variable
        !          3040: definition; only constants of type <TT>Text</TT> can be mixed with other
        !          3041: functions.</P>
        !          3042: <P>
        !          3043: It is also possible to obtain the value of an attribute, simply by mentioning
        !          3044: the attribute's name.  The value of this function is the value of the
        !          3045: attribute for the element which created the presentation box whose contents
        !          3046: are the variable.  If the creating element does not have the indicated
        !          3047: attribute, the value is an empty string.  In the case of a numeric attribute,
        !          3048: the attribute is translated into a decimal number in arabic numerals.  If
        !          3049: another form is desired, the <TT>VALUE</TT> function must be used.</P>
        !          3050: <P>
        !          3051: The last available function returns, as a character string, the value of a
        !          3052: counter, an attribute or a page number. This value can be presented in
        !          3053: different styles.  The keyword <TT>VALUE</TT> is followed (between
        !          3054: parentheses) by the name of the counter, the name of the attribute, or the
        !          3055: keyword <TT>PageNumber</TT> and the desired style, the two parameters being
        !          3056: separated by a comma.  The style is a keyword which indicates whether the
        !          3057: value should be presented in arabic numerals (<TT>Arabic</TT>), lower-case
        !          3058: roman numerals (<TT>LRoman</TT>), or upper-case roman numerals
        !          3059: (<TT>URoman</TT>), or by an upper-case letter (<TT>Uppercase</TT>) or
        !          3060: lower-case letter (<TT>Lowercase</TT>).</P>
        !          3061: <P>
        !          3062: For a page counter, the keyword <TT>PageNumber</TT> can be followed, between
        !          3063: parentheses, by the name of the view from which to obtain the page number.  By
        !          3064: default, the first view declared in the <TT>VIEWS</TT> section is used.  The
        !          3065: value obtained is the number of the page on which is found the element that is
        !          3066: using the variable in a <TT>Content</TT> rule.</P>
        !          3067: <P>
        !          3068: For an ordinary counter, the name of the counter can be preceded by the
        !          3069: keyword <TT>MaxRangeVal</TT> or <TT>MinRangeVal</TT>.  These keywords mean
        !          3070: that the value returned by the function is the maximum (minimum resp.) value
        !          3071: taken by the counter in the whole document, not the value for the element
        !          3072: concerned by the function.</P>
        !          3073: <PRE>
        !          3074:      Function =     'DATE' / 'FDATE' /
        !          3075:                     'DocName' / 'DirName' /
        !          3076:                     'ElemName' / 'AttributeName' /
        !          3077:                      ConstID / ConstType ConstValue /
        !          3078:                      AttrID /
        !          3079:                     'VALUE' '(' PageAttrCtr ','
        !          3080:                                 CounterStyle ')' .
        !          3081:      PageAttrCtr =  'PageNumber' [ '(' ViewID ')' ] /
        !          3082:                      [ MinMax ] CounterID / AttrID .
        !          3083:      CounterStyle = 'Arabic' / 'LRoman' / 'URoman' /
        !          3084:                     'Uppercase' / 'Lowercase' .
        !          3085:      MinMax =       'MaxRangeVal' / 'MinRangeVal' .
        !          3086: </PRE>
        !          3087: <BLOCKQUOTE class="example">
        !          3088: <P>
        !          3089: <STRONG>Example:</STRONG></P>
        !          3090: <P>
        !          3091: To make today's date appear at the top of the first page of a report,a <A
        !          3092: href="#creation"><TT>CREATE</TT> rule</A>associated with theReport_Title
        !          3093: element type generates a presentation box whose content(specified by the
        !          3094: <TT>Content</TT>rule of that presentation box) isthe variable:</P>
        !          3095: <PRE>
        !          3096: VAR
        !          3097:      Todays_date : TEXT 'Version of ' DATE;
        !          3098: </PRE>
        !          3099: <P>
        !          3100: To produce, before each section title, the chapter number (in upper-case roman
        !          3101: numerals) followed by the section number (in arabic numerals), two counters
        !          3102: must be defined:</P>
        !          3103: <PRE>
        !          3104: COUNTERS
        !          3105:      ChapterCtr : RANK OF Chapter;
        !          3106:      SectionCtr : RANK OF Section;
        !          3107: </PRE>
        !          3108: <P>
        !          3109: and the Section_Title element must create a presentation box whosecontent is
        !          3110: the variable</P>
        !          3111: <PRE>
        !          3112: VAR
        !          3113:      SectionNum : VALUE (ChapterCtr, URoman) TEXT '-'
        !          3114:                   VALUE (SectionCtr, Arabic);
        !          3115: </PRE>
        !          3116: <P>
        !          3117: In order to make the page number on which each section begins appear in the
        !          3118: table of contents view next to the section title, each Section_Title element
        !          3119: must create a presentation box, visible only in the table of contents view,
        !          3120: whose content is the variable:</P>
        !          3121: <PRE>
        !          3122: VAR
        !          3123:      TitlePageNume :
        !          3124:            VALUE (PageNumber(Full_text), Arabic);
        !          3125: </PRE>
        !          3126: </BLOCKQUOTE>
        !          3127: </DIV>
        !          3128: 
        !          3129: <DIV class="subsection">
        !          3130: <H3><A name="defaultpresrules">Default presentation rules</A></H3>
        !          3131: 
        !          3132: <P>
        !          3133: In order to avoid having to specify, for each element type defined in the
        !          3134: structure schema, values for every one of the numerous presentation
        !          3135: parameters, the presentation schema allows the definition of a set of default
        !          3136: presentation rules.  These rules apply to all the boxes of the elements
        !          3137: defined in the structure schema and to the presentation boxes and page layout
        !          3138: boxes defined in the presentation schema.  Only rules which differ from these
        !          3139: default need to be specified in other sections of the presentation schema.</P>
        !          3140: <P>
        !          3141: For the primary view, the default rules can define every presentation
        !          3142: parameter, but not the <A href="#presfunct">presentation functions</A> or the
        !          3143: <A href="#breakcond">linebreaking conditions</A> (the <TT>NoBreak1</TT>,
        !          3144: <TT>NoBreak2</TT>, and <TT>Gather</TT> rules).</P>
        !          3145: <P>
        !          3146: In a presentation schema, the default presentation rules section is optional;
        !          3147: in this case, the <TT>DEFAULT</TT> keyword is also absent and the following
        !          3148: rules are considered to be the default rules:</P>
        !          3149: <PRE>
        !          3150:    Visibility: Enclosing =;
        !          3151:    VertRef: * . Left;
        !          3152:    HorizRef: Enclosed . HRef;
        !          3153:    Height: Enclosed . Height;
        !          3154:    Width: Enclosed . Width;
        !          3155:    VertPos: Top = Previous . Bottom;
        !          3156:    HorizPos: Left = Enclosing . Left;
        !          3157:    VertOverflow: No;
        !          3158:    HorizOverflow: No;
        !          3159:    Size: Enclosing =;
        !          3160:    Style: Enclosing =;
        !          3161:    Font: Enclosing =;
        !          3162:    Underline: Enclosing =;
        !          3163:    Thickness: Enclosing =;
        !          3164:    Indent: Enclosing =;
        !          3165:    LineSpacing: Enclosing =;
        !          3166:    Adjust: Enclosing =;
        !          3167:    Justify: Enclosing =;
        !          3168:    Hyphenate: Enclosing =;
        !          3169:    PageBreak: Yes;
        !          3170:    LineBreak: Yes;
        !          3171:    InLine: Yes;
        !          3172:    Depth: 0;
        !          3173:    LineStyle: Enclosing =;
        !          3174:    LineWeight: Enclosing =;
        !          3175:    FillPattern: Enclosing =;
        !          3176:    Background: Enclosing =;
        !          3177:    Foreground: Enclosing =;
        !          3178: </PRE>
        !          3179: <P>
        !          3180: If other values are desired for the default rules, they must be defined
        !          3181: explicitly in the default rules section.  In fact, it is only necessary to
        !          3182: define those default rules which differ from the ones above, since the rules
        !          3183: above will be used whenever a rule is not explicitly named.</P>
        !          3184: <P>
        !          3185: Default rules for views other than the primary  view can also be specified.
        !          3186: Otherwise, the default rules for the primary views are applied to the other
        !          3187: views.</P>
        !          3188: <P>
        !          3189: Default rules are expressed in the same way as <A href="#presrule">explicit
        !          3190: rules for document elements</A>.</P>
        !          3191: </DIV>
        !          3192: 
        !          3193: <DIV class="subsection">
        !          3194: <H3>Presentation and page layout boxes</H3>
        !          3195: 
        !          3196: <P>
        !          3197: The presentation process uses elements which are not part of the logical
        !          3198: structure of the document, such as pages (which are the page layout boxes) or
        !          3199: alternatively, rules, numbers, or words introducing certain parts of the
        !          3200: document, such as ``Summary'', ``Appendices'', ``Bibliography'', etc. (which
        !          3201: are presentation boxes).</P>
        !          3202: <P>
        !          3203: After the word <TT>BOXES</TT>, each presentation or page layout box is defined
        !          3204: by its name and a sequence of presentation rules which indicate how they must
        !          3205: be displayed.  These rules are the same as those which define the boxes
        !          3206: associated with element of the logical structure of the document, with a
        !          3207: single exception, the <A href="#content"><TT>Content</TT> rule</A> which is
        !          3208: used only to specify the content of presentation boxes.  The content of boxes
        !          3209: associated with elements of the document structure is defined in each document
        !          3210: or object and thus is not specified in the presentation schema, which applies
        !          3211: to all documents or objects of a class.</P>
        !          3212: <P>
        !          3213: Among the rules which define a presentation box, certain ones can refer to
        !          3214: another presentation box (for example, in their positional rules).  If the
        !          3215: designated box is defined after the box which designates it, a
        !          3216: <TT>FORWARD</TT> instruction followed by the name of the designated box must
        !          3217: appear before the designation.</P>
        !          3218: <PRE>
        !          3219:               'BOXES' BoxSeq
        !          3220:      BoxSeq = Box &lt; Box > .
        !          3221:      Box    ='FORWARD' BoxID ';' /
        !          3222:               BoxID ':' ViewRuleSeq .
        !          3223:      BoxID  = NAME .
        !          3224: </PRE>
        !          3225: </DIV>
        !          3226: 
        !          3227: <DIV class="subsection">
        !          3228: <H3>Presentation of structured elements</H3>
        !          3229: 
        !          3230: <P>
        !          3231: After the words <TT>RULES</TT>, the presentation schema gives the presentation
        !          3232: rules that apply to the elements whose types are defined in the structure
        !          3233: schema.  Only those rules which differ from the <A
        !          3234: href="#defaultpresrules">default</A> must be specified in the <TT>RULES</TT>
        !          3235: section.</P>
        !          3236: <P>
        !          3237: The rule definitions for each element type are composed of the name of the
        !          3238: element type (as specified in the structure schema) followed by a colon and
        !          3239: the set of rules specific to that type.</P>
        !          3240: <P>
        !          3241: The type name can be preceded by a star in the special case where the
        !          3242: structure schema defines an <A href="#references">inclusion</A> without
        !          3243: expansion (or with partial expansion) of a type with the same name as an
        !          3244: element of defined in the structure schema.</P>
        !          3245: <P>
        !          3246: In the case where the element is a <A href="#pairs">mark pair</A>, but only in
        !          3247: this case, the type name can be preceded by the keywords <TT>First</TT> or
        !          3248: <TT>Second</TT>.  These keywords indicate whether the rules that follow apply
        !          3249: to the first or second mark of the pair.</P>
        !          3250: <PRE>
        !          3251:                    'RULES' PresentSeq
        !          3252:      PresentSeq = Present &lt; Present > .
        !          3253:      Present      = [ '*' ] [ FirstSec ] ElemID ':'
        !          3254:                     ViewRuleSeq .
        !          3255:      FirstSec     = 'First' / 'Second' .
        !          3256: </PRE>
        !          3257: <P>
        !          3258: A presentation schema can define presentation rules for base elements, which
        !          3259: are defined implicitly in the structure schemas.  In the English version of
        !          3260: the presentation schema compiler, the base type names are the same as in the S
        !          3261: language, but they are terminated by the <TT>_UNIT</TT> suffix:
        !          3262: <TT>TEXT_UNIT</TT>, <TT>PICTURE_UNIT</TT>, <TT>SYMBOL_UNIT</TT>,
        !          3263: <TT>GRAPHICS_UNIT</TT>.  In the French version of the compiler, the base types
        !          3264: are: <TT>TEXTE</TT>, <TT>IMAGE</TT>, <TT>SYMBOLE</TT>, <TT>GRAPHIQUE</TT>.
        !          3265: Whatever version of the compiler is used, the base type names are written in
        !          3266: upper-case letters.</P>
        !          3267: </DIV>
        !          3268: 
        !          3269: <DIV class="subsection">
        !          3270: <H3><A name="presattributes">Logical attribute presentation</A></H3>
        !          3271: 
        !          3272: <P>
        !          3273: After the keyword <TT>ATTRIBUTES</TT>, all attributes which are to have some
        !          3274: effect on the presentation of the element to which they are attached must be
        !          3275: mentioned, along with the corresponding presentation rules.  This is true for
        !          3276: both global attributes (which can be attached to all element types) and local
        !          3277: attributes (which can only be attached to certain element types).</P>
        !          3278: <P>
        !          3279: Also mentioned in this section are attributes which imply an effect on
        !          3280: elements in the subtree of the element to which they are attached. The
        !          3281: presentation of these descendants  can be modified as a function of the value
        !          3282: of the attribute which they inherit, just as if it was attached to them
        !          3283: directly.</P>
        !          3284: <P>
        !          3285: The specification for each attribute includes the attribute's name, followed
        !          3286: by an optional value specification and, after a colon, a set of rules.  The
        !          3287: set of rules must contain at least one rule.</P>
        !          3288: <P>
        !          3289: When there is no value specification, the rules are applied to all elements
        !          3290: which carry the attribute, no matter what their value.  When the rules must
        !          3291: only apply when the attribute has certain values, these values must be
        !          3292: specified.  Thus, the same attribute can appear in the <TT>ATTRIBUTES</TT>
        !          3293: section several times, with each appearance having a different value
        !          3294: specification.  However, reference attributes never have a value specification
        !          3295: and, as a result, can only appear once in the <TT>ATTRIBUTES</TT> section.</P>
        !          3296: <P>
        !          3297: To specify that the presentation rules apply to some of the descendants of the
        !          3298: element having the attribute, the name of the affected element type is given,
        !          3299: between parentheses, after the attribute name.  This way, the presentation
        !          3300: rules for the attribute will be applied to the element having the attribute,
        !          3301: if it is of the given type, and to all of its descendants of the given type.
        !          3302: In the case where this type is a <A href="#pairs">mark pair</A>, but only in
        !          3303: this case, the type name can be preceded by the keywords <TT>First</TT> or
        !          3304: <TT>Second</TT>.  These keywords indicate whether the rules that follow apply
        !          3305: to the first or second mark of the pair. If the rule must apply to several
        !          3306: different element types, the specification must be repeated for each element
        !          3307: type.</P>
        !          3308: <P>
        !          3309: The specification of values for which the presentation rules will be applied
        !          3310: varies according to the type of the attribute:</P>
        !          3311: <DL>
        !          3312: <DT>numeric attribute</DT>
        !          3313: <DD>If the rules are to apply for one value ofthe attribute, then the
        !          3314: attribute name is followed by an equals signand this value.  If the rules are
        !          3315: to apply for all values less than(or greater than) a threshold value,
        !          3316: non-inclusive, the attribute namefollowed by a '&lt;' sign (or a '>' sign,
        !          3317: respectively) andthe threshold value.  If the rules must apply to a range of
        !          3318: values,the attribute name is followed by the word '<TT>IN</TT>' and the
        !          3319: twobounds of the range, enclosed in brackets and separated by two
        !          3320: periods('<TT>..</TT>').  In the case of ranges, the values of the bounds
        !          3321: areincluded in the range.
        !          3322: <P>
        !          3323: The threshold value in the comparisons can be the value of an attribute
        !          3324: attached to an ancestor element.  In this case, the attribute name is given
        !          3325: instead of a constant value.</P>
        !          3326: <P>
        !          3327: It is also possible to write rules which apply only when a comparison between
        !          3328: two different attributes of the element's ancestors is true. In this case, the
        !          3329: first attribute name is followed by a comparison keyword and the name of the
        !          3330: second attribute.  The comparison keywords are <TT>EQUAL</TT> (simple
        !          3331: equality), <TT>LESS</TT> (non-inclusive less than), and <TT>GREATER</TT>
        !          3332: (non-inclusive greater than).</P>
        !          3333: </DD>
        !          3334: <DT>text attribute</DT>
        !          3335: <DD>If the rules are to apply for one value ofthe attribute, then the
        !          3336: attribute name is followed by an equals signand this value.
        !          3337: </DD>
        !          3338: <DT>reference attribute</DT>
        !          3339: <DD>There is never a value specification; therules apply no matter what
        !          3340: element is designated by the attribute.
        !          3341: </DD>
        !          3342: <DT>enumerated attribute</DT>
        !          3343: <DD>If the rules are to apply for one value ofthe attribute, then the
        !          3344: attribute name is followed by an equals signand this value.
        !          3345: </DD>
        !          3346: </DL>
        !          3347: <P>
        !          3348: The order in which the rules associated with a numeric attribute are defined
        !          3349: is important.  When multiple sets of rules can be applied, the first set
        !          3350: declared is the one used.</P>
        !          3351: <P>
        !          3352: Rules for attributes have priority over both default rules and rules
        !          3353: associated with element types.  The attribute rules apply to the element to
        !          3354: which the attribute is attached.  It is the rules which apply to the
        !          3355: surrounding elements (and especially to the descendants) which determine the
        !          3356: effect of the attribute rules on the environment ( and especially on the
        !          3357: terminal elements of the structure).</P>
        !          3358: <PRE>
        !          3359:                     'ATTRIBUTES' PresAttrSeq
        !          3360:      PresAttrSeq  = PresAttr &lt; PresAttr > .
        !          3361:      PresAttr     = AttrID [ '(' [ FirstSec ] ElemID ')' ]
        !          3362:                     [ AttrRelation ] ':' ViewRuleSeq .
        !          3363:      AttrID       = NAME .
        !          3364:      AttrRelation ='=' AttrVal /
        !          3365:                     '>' [ '-' ] MinValue /
        !          3366:                     '&lt;' [ '-' ] MaxValue /
        !          3367:                     'IN' '[' [ '-' ] LowerBound '..'
        !          3368:                     [ '-' ] UpperBound ']' /
        !          3369:                     'GREATER' AttrID /
        !          3370:                     'EQUAL' AttrID /
        !          3371:                     'LESS' AttrID .
        !          3372:      AttrVal      = [ '-' ] EqualNum / EqualText /
        !          3373:                     AttrValue .
        !          3374:      MinValue     = NUMBER .
        !          3375:      MaxValue     = NUMBER .
        !          3376:      LowerBound   = NUMBER .
        !          3377:      UpperBound   = NUMBER.
        !          3378:      EqualNum     = NUMBER .
        !          3379:      EqualText    = STRING .
        !          3380:      AttrValue    = NAME .
        !          3381: </PRE>
        !          3382: <P>
        !          3383: In presentation rules associated with a numeric attribute (and only in such
        !          3384: rules), the attribute name can be used in place of a numeric value.  In this
        !          3385: case, the value of the attribute is used in the application of the rule. Thus,
        !          3386: the attribute can represent a relation between the size of two boxes, the
        !          3387: height and width of a box, the height of an area where page breaks are
        !          3388: prohibited, the distance between two boxes, the position of the reference axis
        !          3389: of a box, the interline spacing,  the indentation of the first line, the
        !          3390: visibility, the depth (z-order), or the character set.</P>
        !          3391: <P>
        !          3392: The presentation rules associated with reference attributes, it is possible to
        !          3393: use the element designated by the attribute as a reference box in a positional
        !          3394: or extent rule.  This element is represented in the <A
        !          3395: href="#position">position</A> or <A href="#dimension">extent</A> rule by the
        !          3396: keyword <TT>Referred</TT>.</P>
        !          3397: <BLOCKQUOTE class="example">
        !          3398: <P>
        !          3399: <STRONG>Example:</STRONG></P>
        !          3400: <P>
        !          3401: In all structure schemas, there is a global Language attributedefined as
        !          3402: follows:</P>
        !          3403: <PRE>
        !          3404: ATTR
        !          3405:      Language = TEXT;
        !          3406: </PRE>
        !          3407: <P>
        !          3408: The following rules would make French text be displayed in romancharacters and
        !          3409: English text be displayed in italics:</P>
        !          3410: <PRE>
        !          3411: ATTRIBUTES
        !          3412:      Language = 'French' :
        !          3413:               Style : Roman;
        !          3414:      Language = 'English' :
        !          3415:               Style : Italics;
        !          3416: </PRE>
        !          3417: <P>
        !          3418: Using these rules, when the user puts the Language attribute with thevalue
        !          3419: 'English' on the summary of a document, every character string(terminal
        !          3420: elements) contained in the summary are displayed in italics.See the <A
        !          3421: href="#style"><TT>Style</TT> rule</A>.</P>
        !          3422: </BLOCKQUOTE>
        !          3423: <BLOCKQUOTE class="example">
        !          3424: <P>
        !          3425: <STRONG>Example:</STRONG></P>
        !          3426: <P>
        !          3427: A numeric attribute representing the importance of the part of thedocument to
        !          3428: which it is attached can be defined:</P>
        !          3429: <PRE>
        !          3430: ATTR
        !          3431:      Importance = INTEGER;
        !          3432: </PRE>
        !          3433: <P>
        !          3434: In the presentation schema, the importance of an element is reflectedin the
        !          3435: choice of character size, using the following rules.</P>
        !          3436: <PRE>
        !          3437: ATTRIBUTES
        !          3438:      Importance &lt; 2 :
        !          3439:               Size : 1;
        !          3440:      Importance IN [2..4] :
        !          3441:               Size : Importance;
        !          3442:      Importance = 10 :
        !          3443:               Size : 5;
        !          3444:      Importance > 4 :
        !          3445:               Size : 4;
        !          3446: </PRE>
        !          3447: <P>
        !          3448: Thus, the character size corresponds to the value of the Importanceattribute;
        !          3449: its value is</P>
        !          3450: <UL>
        !          3451: <LI>the value of the Importance attribute when the value isbetween 2 and 4
        !          3452: (inclusive),
        !          3453: <LI>1, when the value of the Importance attribute is less than 2,
        !          3454: <LI>4, when the value of the Importance attribute is greater than4,
        !          3455: <LI>5, when the value of the Importance attribute is 10.
        !          3456: </UL>
        !          3457: <P>
        !          3458: The last case (value 5) must be defined before the case which handlesall
        !          3459: Importance values greater than 4, because the two rules are notdisjoint and
        !          3460: the first one defined will have priority.  Otherwise,when the Importance
        !          3461: attribute has value 10, the font size will be 4.</P>
        !          3462: </BLOCKQUOTE>
        !          3463: <BLOCKQUOTE class="example">
        !          3464: <P>
        !          3465: <STRONG>Example:</STRONG></P>
        !          3466: <P>
        !          3467: Suppose the structure defines a list element which can have anattribute
        !          3468: defining the type of list (numbered or not):</P>
        !          3469: <PRE>
        !          3470: STRUCT
        !          3471:     list (ATTR list_type = enumeration, dash)
        !          3472:          = LIST OF (list_item = TEXT);
        !          3473: </PRE>
        !          3474: <P>
        !          3475: Then, the presentation schema could use the attribute placed on thelist
        !          3476: element to put either a dash or a number before the each elementof the
        !          3477: list:</P>
        !          3478: <PRE>
        !          3479: ATTRIBUTES
        !          3480:    list_type (list_item) = enumeration :
        !          3481:         CreateBefore (NumberBox);
        !          3482:    list_type (list_item) = dash :
        !          3483:         CreateBefore (DashBox);
        !          3484: </PRE>
        !          3485: </BLOCKQUOTE>
        !          3486: <BLOCKQUOTE class="example">
        !          3487: <P>
        !          3488: <STRONG>Example:</STRONG></P>
        !          3489: <P>
        !          3490: Suppose that two attributes are defined in the structure schema.  Thefirst is
        !          3491: a numeric global attribute called ``version''.  The other isa local attribute
        !          3492: defined on the root of the document called``Document_version'':</P>
        !          3493: <PRE>
        !          3494: STRUCTURE Document
        !          3495: ATTR
        !          3496:     version = INTEGER;
        !          3497: STRUCT
        !          3498:     Document (ATTR Document_version = INTEGER) =
        !          3499:         BEGIN
        !          3500:         SomeElement ;
        !          3501:         ...
        !          3502:         SomeOtherElement ;
        !          3503:         END ;
        !          3504: ...
        !          3505: </PRE>
        !          3506: <P>
        !          3507: These attributes can be used in the presentation schema to placechange bars in
        !          3508: the margin next to elements whose version attributehas a value equal to the
        !          3509: Document_version attribute of the root andto place a star in margin of
        !          3510: elements whose version attribute is lessthan the value of the root's
        !          3511: Document_version attribute:</P>
        !          3512: <PRE>
        !          3513: ATTRIBUTES
        !          3514:     version EQUAL Document_version :
        !          3515:         CreateBefore (ChangeBarBox) ;
        !          3516:     version LESS Document_version :
        !          3517:         CreateBefore (StarBox) ;
        !          3518: </PRE>
        !          3519: </BLOCKQUOTE>
        !          3520: </DIV>
        !          3521: 
        !          3522: <DIV class="subsection">
        !          3523: <H3>Value transmission rules</H3>
        !          3524: 
        !          3525: <P>
        !          3526: The last section of a presentation schema, which is optional, serves to
        !          3527: defines the way in which a document transmits certain values to its
        !          3528: sub-documents.  A sub-document is an document <A
        !          3529: href="#inclusion">included</A> without expansion or with partial expansion.
        !          3530: The primary document can transmit to its sub-documents the values of certain
        !          3531: counters or the textual content of certain of its elements, as a function of
        !          3532: their type.</P>
        !          3533: <P>
        !          3534: The sub-documents receive these values in attributes which must be defined in
        !          3535: their structure schema as local attributes of the root element.  The types of
        !          3536: these attributes must correspond to the type of the value which they receive:
        !          3537: numeric attributes for receiving the value of a counter, textual attributes
        !          3538: for receiving the content of an element.</P>
        !          3539: <P>
        !          3540: In the structure schema of the primary document, there appears at the end,
        !          3541: after the <TT>TRANSMIT</TT> keyword, a sequence of transmission rules.  Each
        !          3542: rule begins with the name of the counter to transmit or of the element type
        !          3543: whose textual content will be transmitted.  This name is followed by the
        !          3544: keyword <TT>To</TT> and the name of the attribute of the sub-document to which
        !          3545: the value is transmitted.  The sub-document class is indicated between
        !          3546: parentheses after the name of the attribute.  The transmission rule ends with
        !          3547: a semicolon.</P>
        !          3548: <PRE>
        !          3549:      TransmitSeq   =  Transmit &lt; Transmit > .
        !          3550:      Transmit      =  TypeOrCounter 'To' ExternAttr
        !          3551:                       '(' ElemID ')' ';' .
        !          3552:      TypeOrCounter =  CounterID / ElemID .
        !          3553:      ExternAttr    =  NAME .
        !          3554: </PRE>
        !          3555: <BLOCKQUOTE class="example">
        !          3556: <P>
        !          3557: <STRONG>Example:</STRONG></P>
        !          3558: <P>
        !          3559: Consider a Book document class which includes instances of the Chapterdocument
        !          3560: class.  These classes might have the following schemas:</P>
        !          3561: <PRE>
        !          3562: STRUCTURE Book
        !          3563: STRUCT
        !          3564:    Book = BEGIN
        !          3565:           Title = Text;
        !          3566:           Body  = LIST OF (Chapter INCLUDED);
        !          3567:           END;
        !          3568:    ...
        !          3569: 
        !          3570: STRUCTURE Chapter
        !          3571: STRUCT
        !          3572:    Chapter (ATTR FirstPageNum = Integer;
        !          3573:                  ChapterNum = Integer;
        !          3574:                  CurrentTitle   = Text) =
        !          3575:            BEGIN
        !          3576:            ChapterTitle = Text;
        !          3577:            ...
        !          3578:            END;
        !          3579:    ...
        !          3580: </PRE>
        !          3581: <P>
        !          3582: Then the presentation schema for books could define chapter and page counters.
        !          3583: The following transmission rules in the book presentation schema would
        !          3584: transmit values for the three attributes defined at the root of each chapter
        !          3585: sub-document.</P>
        !          3586: <PRE>
        !          3587: PRESENTATION Book;
        !          3588: VIEWS
        !          3589:    Full_text;
        !          3590: COUNTERS
        !          3591:    ChapterCtr: Rank of Chapter;
        !          3592:    PageCtr: Rank of Page(Full_text);
        !          3593: ...
        !          3594: TRANSMIT
        !          3595:    PageCtr TO FirstPageNum(Chapter);
        !          3596:    ChapterCtr TO ChapterNum(Chapter);
        !          3597:    Title TO CurrentTitle(Chapter);
        !          3598: END
        !          3599: </PRE>
        !          3600: <P>
        !          3601: Thus, each chapter included in a book can number its pages as a function of
        !          3602: the number of pages preceding it in the book, can make the chapter's number
        !          3603: appear before the number of each of its sections, or can place the title of
        !          3604: the book at the top of each page.</P>
        !          3605: </BLOCKQUOTE>
        !          3606: </DIV>
        !          3607: 
        !          3608: <DIV class="subsection">
        !          3609: <H3>Presentation rules</H3>
        !          3610: 
        !          3611: <P>
        !          3612: Whether defining the appearance of a presentation or page layout box, an
        !          3613: element type, or an attribute value, the set of presentation rules that apply
        !          3614: is always defined in the same way.</P>
        !          3615: <P>
        !          3616: Normally, a set of presentation rules is placed between the keywords
        !          3617: <TT>BEGIN</TT> and <TT>END</TT>, the keyword <TT>END</TT> being followed by a
        !          3618: semicolon.  The first section of this block defines the rules that apply to
        !          3619: the primary view, if the <A href="#defaultpresrules">default rules</A> are not
        !          3620: completely suitable.  Next comes the rules which apply to specific other
        !          3621: views, with a rule sequence for each view for which the default rules are not
        !          3622: satisfactory.  If the default rules are suitable for the non-primary views,
        !          3623: there will not be any specific rules for these views.  If there is only one
        !          3624: rule which applies to all views then the keywords <TT>BEGIN</TT> and
        !          3625: <TT>END</TT> need not appear.</P>
        !          3626: <P>
        !          3627: For each view, it is only necessary to specify those rules which differ from
        !          3628: the default rules for the view, so that for certain views (or even all views),
        !          3629: there may be no specific rules.</P>
        !          3630: <P>
        !          3631: The specific rules for a non-primary view are introduced by the <A
        !          3632: name="inkeyword"><TT>IN</TT> keyword</A>, followed by the view name.  The
        !          3633: rules for that view follow, delimited by the keywords <TT>BEGIN</TT> and
        !          3634: <TT>END</TT>, or without these two keywords when there is only one rule.</P>
        !          3635: <P>
        !          3636: <STRONG>Note:</STRONG> the view name which follows the <TT>IN</TT> keyword
        !          3637: must not be the name of the primary view, since the rules for that view are
        !          3638: found before the rules for the other views.</P>
        !          3639: <P>
        !          3640: Within each block concerning a view, other blocks can appear, delimited by the
        !          3641: same keywords <TT>BEGIN</TT> and <TT>END</TT>.  Each of these blocks gathers
        !          3642: the presentation rules that apply, for a given view, only when a given
        !          3643: condition is satisfied.  Each block is preceded by a condition introduced by
        !          3644: the <TT>IF</TT> keyword.  If such a conditional block contains only one rule,
        !          3645: the keywords <TT>BEGIN</TT> and <TT>END</TT> can be omitted.</P>
        !          3646: <P>
        !          3647: Although the syntax allows any presentation rule to appear in a conditional
        !          3648: block, only <A href="#creation">creation rules</A> are allowed after any
        !          3649: condition; other rules are allowed only after conditions <TT>Within</TT> and
        !          3650: ElemID.  In addition, the following rules cannot be conditional:
        !          3651: <TT>PageBreak, LineBreak, Inline, Gather</TT>.</P>
        !          3652: <P>
        !          3653: For a given view, the rules that apply without any condition must appear
        !          3654: before the first conditional block.  If some rules apply only when none of the
        !          3655: specified condition holds, they are grouped in a block preceded by the keyword
        !          3656: <TT>Otherwise</TT>, and that block must appear after the last conditionnal
        !          3657: block concerning the same view.</P>
        !          3658: <PRE>
        !          3659:      ViewRuleSeq  = 'BEGIN' &lt; RulesAndCond > &lt; ViewRules >
        !          3660:                     'END' ';' /
        !          3661:                     ViewRules / CondRules / Rule .
        !          3662:      RulesAndCond = CondRules / Rule .
        !          3663:      ViewRules    = 'IN' ViewID CondRuleSeq .
        !          3664:      CondRuleSeq  = 'BEGIN' &lt; RulesAndCond > 'END' ';' /
        !          3665:                     CondRules / Rule .
        !          3666:      CondRules    = CondRule &lt; CondRule >
        !          3667:                     [ 'Otherwise' RuleSeq ] .
        !          3668:      CondRule     = 'IF' ConditionSeq RuleSeq .
        !          3669:      RulesSeq     = 'BEGIN' Rule &lt; Rule > 'END' ';' /
        !          3670:                     Rule .
        !          3671: </PRE>
        !          3672: <BLOCKQUOTE class="example">
        !          3673: <P>
        !          3674: <STRONG>Example:</STRONG></P>
        !          3675: <P>
        !          3676: The following rules for a report's title make the title visible in theprimary
        !          3677: view and invisible in the table of contents and in the formulaviews (see the
        !          3678: <A href="#visib"><TT>Visibility</TT> rule</A>).</P>
        !          3679: <PRE>
        !          3680: Title : BEGIN
        !          3681:         Visibility : 1;
        !          3682:         ...    {Other rules for the primary view}
        !          3683:         IN Table_of_contents
        !          3684:            Visibility : 0;
        !          3685:         IN Formulas
        !          3686:            Visibility : 0;
        !          3687:         END;
        !          3688: </PRE>
        !          3689: </BLOCKQUOTE>
        !          3690: </DIV>
        !          3691: 
        !          3692: <DIV class="subsection">
        !          3693: <H3>Conditions applying to presentation rules</H3>
        !          3694: 
        !          3695: <P>
        !          3696: Many conditions can be applied to presentation rules.  Conditions allow
        !          3697: certain presentation rules to apply only in certain cases.  These conditions
        !          3698: can be based on the structural position of the element.  They can be based on
        !          3699: whether the element has references, and what type of references, whether the
        !          3700: element has attributes, whether the element is empty or not.  They can also be
        !          3701: based on the value of a counter.</P>
        !          3702: <P>
        !          3703: It is possible to specify several conditions which must all be true for the
        !          3704: rules to apply.</P>
        !          3705: <P>
        !          3706: A set of conditions is specified by the <TT>IF</TT> keyword.  This keyword is
        !          3707: followed by the sequence of conditions, separated by the <TT>AND</TT> keyword.
        !          3708: Each condition is specified by a keyword which defines the condition type. In
        !          3709: some cases, the keyword is followed by other data, which specify the condition
        !          3710: more precisely.</P>
        !          3711: <P>
        !          3712: An elementary condition can be negative; it is then preceded by the
        !          3713: <TT>NOT</TT> keyword.</P>
        !          3714: <P>
        !          3715: When the presentation rule(s) controlled by the condition apply to a reference
        !          3716: element or a reference attribute, an elementary condition can also apply to
        !          3717: element referred by this reference.  The <TT>Target</TT> keyword is used for
        !          3718: that purpose.  It must appear before the keyword defining the condition
        !          3719: type.</P>
        !          3720: <PRE>
        !          3721:      CondRule     = 'IF' ConditionSeq RuleSeq .
        !          3722:      ConditionSeq  = Condition &lt; 'AND' Condition > .
        !          3723:      Condition     = [ 'NOT' ] [ 'Target' ] ConditionElem .
        !          3724:      ConditionElem ='First' / 'Last' /
        !          3725:                      [ 'Immediately' ] 'Within' [ NumParent ]
        !          3726:                                        ElemID [ ExtStruct ] /
        !          3727:                      ElemID /
        !          3728:                     'Referred' / 'FirstRef' / 'LastRef' /
        !          3729:                     'ExternalRef' / 'InternalRef' / 'CopyRef' /
        !          3730:                     'AnyAttributes' / 'FirstAttr' / 'LastAttr' /
        !          3731:                     'UserPage' / 'StartPage' / 'ComputedPage' /
        !          3732:                     'Empty' /
        !          3733:                     '(' [ MinMax ] CounterName CounterCond ')' /
        !          3734:                      CondPage '(' CounterID ')' .
        !          3735:      NumParent     = [ GreaterLess ] NParent .
        !          3736:      GreaterLess   = '>' / '&lt;' .
        !          3737:      NParent       = NUMBER.
        !          3738:      ExtStruct     = '(' ElemID ')' .
        !          3739:      CounterCond   ='&lt;' MaxCtrVal / '>' MinCtrVal /
        !          3740:                     '=' EqCtrVal / 
        !          3741:                     'IN' '[' ['-'] MinCtrBound '.' '.'
        !          3742:                      ['-'] MaxCtrBound ']' .
        !          3743:      PageCond      ='Even' / 'Odd' / 'One' .
        !          3744:      MaxCtrVal     = NUMBER .
        !          3745:      MinCtrVal     = NUMBER .
        !          3746:      EqCtrVal      = NUMBER .
        !          3747:      MaxCtrBound   = NUMBER .
        !          3748:      MinCtrBound   = NUMBER .
        !          3749: </PRE>
        !          3750: 
        !          3751: <DIV class="subsubsection">
        !          3752: <H4>Conditions based on the logical position of the element</H4>
        !          3753: 
        !          3754: <P>
        !          3755: The condition can be on the position of the element in the document's logical
        !          3756: structure tree.  It is possible to test whether the element is the first
        !          3757: (<TT>First</TT>) or last (<TT>Last</TT>) among its siblings or if it is not
        !          3758: the first (<TT>NOT First</TT>) or not the last (<TT>NOT Last</TT>). These
        !          3759: conditions can be associated only with <A href="#creation">creation
        !          3760: rules</A>.</P>
        !          3761: <P>
        !          3762: It is also possible to test if the element is contained in an element of a
        !          3763: given type (<TT>Within</TT>) or if it is not (<TT>NOT Within</TT>). The type
        !          3764: is indicated after the keyword <TT>Within</TT>. If that element type is
        !          3765: defined in a structure schema which is not the one which corresponds to the
        !          3766: presentation schema, the type name of this element must be followed, between
        !          3767: parentheses, by the name of the structure schema which defines it.</P>
        !          3768: <P>
        !          3769: If the keyword <TT>Within</TT> is preceded by <TT>Immediately</TT>, the
        !          3770: condition is satisfied only if the <EM>parent</EM> element has the type
        !          3771: indicated. If the word <TT>Immediately</TT> is missing, the condition is
        !          3772: satisfied if any <EM>ancestor</EM> has the type indicated.</P>
        !          3773: <P>
        !          3774: An integer <I>n</I> can appear between the keyword <TT>Within</TT> and the
        !          3775: type.  It specifies the number of ancestors of the indicated type that must be
        !          3776: present for the condition to be satisfied.  If the keyword
        !          3777: <TT>Immediately</TT> is also present, the <I>n</I> immediate ancestors of the
        !          3778: element must have the indicated type.  The integer <I>n</I> must be positive
        !          3779: or zero.  It can be preceded by <TT>&lt;</TT> or <TT>></TT> to indicate a
        !          3780: maximum or minimum number of ancestors.  If these symbols are missing, the
        !          3781: condition is satisfied only if it exists exactly <I>n</I> ancestors.  When
        !          3782: this number is missing, it is equivalent to > 0.</P>
        !          3783: <P>
        !          3784: If the condition applies to presentation rules associated with an attribute,
        !          3785: in the <TT>ATTRIBUTES</TT> section of the presentation schema, the condition
        !          3786: can be simply an element name. Presentation rules are then executed only if
        !          3787: the attribute is attached to an element of that type. The keyword <TT>NOT</TT>
        !          3788: before the element name indicates that the presentation rules must be executed
        !          3789: only if the element is not of the type indicated.</P>
        !          3790: </DIV>
        !          3791: 
        !          3792: <DIV class="subsubsection">
        !          3793: <H4>Conditions on references</H4>
        !          3794: 
        !          3795: <P>
        !          3796: References may be taken into account in conditions, which can be based on the
        !          3797: fact that the element, or one of its ancestors, is designated by a at least
        !          3798: one reference (<TT>Referred</TT>) or by none (<TT>NOT Referred</TT>).</P>
        !          3799: <P>
        !          3800: If the element or attribute to which the condition is attached is a reference,
        !          3801: the condition can be based on the fact that it acts as the first reference to
        !          3802: the designated element (<TT>FirstRef</TT>), or as the last (<TT>LastRef</TT>),
        !          3803: or as a reference to an element located in another document
        !          3804: (<TT>ExternalRef</TT>) or in the same document (<TT>InternalRef</TT>).</P>
        !          3805: <P>
        !          3806: The condition can also be based on the fact that the element is an <A
        !          3807: href="#inclusion">inclusion</A>.  This is noted (<TT>CopyRef</TT>).</P>
        !          3808: <P>
        !          3809: Like all conditions, conditions on references can be inverted by the
        !          3810: <TT>NOT</TT> keyword. These conditions can be associated only with <A
        !          3811: href="#creation">creation rules</A>.</P>
        !          3812: </DIV>
        !          3813: 
        !          3814: <DIV class="subsubsection">
        !          3815: <H4>Conditions on logical attributes</H4>
        !          3816: 
        !          3817: <P>
        !          3818: The condition can be based on the presence or absence of attributes associated
        !          3819: with the element, no matter what the attributes or their values. The
        !          3820: <TT>AnyAttributes</TT> keyword expresses this condition.</P>
        !          3821: <P>
        !          3822: If the condition appears in the presentation rules of an attribute, the
        !          3823: <TT>FirstAttr</TT> and <TT>LastAttr</TT> keywords can be used to indicate that
        !          3824: the rules must only be applied if this attribute is the first attribute for
        !          3825: the element or if it is the last (respectively).  These conditions can also be
        !          3826: inverted by the <TT>NOT</TT> keyword. These conditions can be associated only
        !          3827: with <A href="#creation">creation rules</A>.</P>
        !          3828: <P>
        !          3829: It is also possible to apply certain presentation rules only when the element
        !          3830: being processed or one of its ancestors has a certain attribute, perhaps with
        !          3831: a certain value.  This can be done in the <A
        !          3832: href="#presattributes"><TT>ATTRIBUTES</TT> section</A>.</P>
        !          3833: </DIV>
        !          3834: 
        !          3835: <DIV class="subsubsection">
        !          3836: <H4>Conditions on page breaks</H4>
        !          3837: 
        !          3838: <P>
        !          3839: The page break base type (and only this type) can use the following
        !          3840: conditions: <TT>ComputedPage</TT>, <TT>StartPage</TT>, and <TT>UserPage</TT>.
        !          3841: The <TT>ComputedPage</TT> condition indicates that the presentation rule(s)
        !          3842: should apply if the page break was created automatically by Thot;  the
        !          3843: <TT>StartPage</TT> condition is true if the page break is generated before the
        !          3844: element by the <TT>Page</TT> rule; and the <TT>UserPage</TT> condition applies
        !          3845: if the page break was inserted by the user.</P>
        !          3846: <P>
        !          3847: These conditions can be associated only with <A href="#creation">creation
        !          3848: rules</A>.</P>
        !          3849: </DIV>
        !          3850: 
        !          3851: <DIV class="subsubsection">
        !          3852: <H4>Conditions on the element's content</H4>
        !          3853: 
        !          3854: <P>
        !          3855: The condition can be based on whether or not the element is empty.  An element
        !          3856: which has no children or whose leaves are all empty is considered to be empty
        !          3857: itself.  This condition is expressed by the <TT>Empty</TT> keyword, optionally
        !          3858: preceded by the <TT>NOT</TT> keyword. This condition can be associated only
        !          3859: with <A href="#creation">creation rules</A>.</P>
        !          3860: </DIV>
        !          3861: 
        !          3862: <DIV class="subsubsection">
        !          3863: <H4>Conditions on counters</H4>
        !          3864: 
        !          3865: <P>
        !          3866: Presentation rules can apply when the counter's value is one, is even or odd,
        !          3867: is equal, greater than or less than a given value or falls in a range of
        !          3868: values.  This is particularly useful for creating header and footer boxes.
        !          3869: These conditions can be associated only with <A href="#creation">creation
        !          3870: rules</A>.</P>
        !          3871: <P>
        !          3872: To compare the value of a counter to a given value, a comparison is given
        !          3873: between parentheses. The comparison is composed of the counter name followed
        !          3874: by an equals, greater than, or less than sign and the value to which the
        !          3875: counter will be compared.  A test for whether or not a counter's value falls
        !          3876: in a range also appears within parentheses.  In this case, the counter name is
        !          3877: followed by the <TT>IN</TT> keyword and the range definition within brackets.
        !          3878: The <TT>Even</TT>, <TT>Odd</TT> and <TT>One</TT> are used to test a counter's
        !          3879: value and are followed by the counter name between parentheses.</P>
        !          3880: <P>
        !          3881: The list of possible conditions on counters is:</P>
        !          3882: <DL>
        !          3883: <DT><TT>Even (Counter)</TT></DT>
        !          3884: <DD>the box is created only if the counterhas an even value.
        !          3885: </DD>
        !          3886: <DT><TT>Odd (Counter)</TT></DT>
        !          3887: <DD>the box is created only if the counterhas an odd value.
        !          3888: </DD>
        !          3889: <DT><TT>One (Counter)</TT></DT>
        !          3890: <DD>the box is created only the counter'svalue is 1.
        !          3891: </DD>
        !          3892: <DT><TT>NOT One (Counter)</TT></DT>
        !          3893: <DD>the box is created, unless thecounter's value is 1.
        !          3894: </DD>
        !          3895: <DT><TT>(Counter &lt; Value)</TT></DT>
        !          3896: <DD>the box is created only if thecounter's value is less than Value.
        !          3897: </DD>
        !          3898: <DT><TT>(Counter > Value)</TT></DT>
        !          3899: <DD>the box is created only if thecounter's value is greater than Value.
        !          3900: </DD>
        !          3901: <DT><TT>(Counter = Value)</TT></DT>
        !          3902: <DD>the box is created only if thecounter's value is equal to Value.
        !          3903: </DD>
        !          3904: <DT><TT>NOT (Counter = Value)</TT></DT>
        !          3905: <DD>the is created only if thecounter's value is different than Value.
        !          3906: </DD>
        !          3907: <DT><TT>(Counter IN [MinValue..MaxValue])</TT></DT>
        !          3908: <DD>the box is createdonly if the counter's value falls in the range bounded
        !          3909: by MinValue andMaxValue (inclusive).
        !          3910: </DD>
        !          3911: <DT><TT>NOT (Counter IN [MinValue..MaxValue])</TT></DT>
        !          3912: <DD>the box iscreated only if the value of the counter does not fall in the
        !          3913: range boundedby MinValue and MaxValue (inclusive).
        !          3914: </DD>
        !          3915: </DL>
        !          3916: <P>
        !          3917: <STRONG>Note:</STRONG> the <TT>NOT Even</TT> and <TT>NOT Odd</TT> conditions
        !          3918: are syntactically correct but can be expressed more simply by <TT>Odd</TT> and
        !          3919: <TT>Even</TT>, respectively.</P>
        !          3920: </DIV>
        !          3921: </DIV>
        !          3922: 
        !          3923: <DIV class="subsection">
        !          3924: <H3><A name="presrule">A presentation rule</A></H3>
        !          3925: 
        !          3926: <P>
        !          3927: A presentation rule defines either a presentation parameter or presentation
        !          3928: function.  The parameters are:</P>
        !          3929: <UL>
        !          3930: <LI>the position of the vertical and horizontal reference axes ofthe box,
        !          3931: <LI>the position of the box in relation to other boxes,
        !          3932: <LI>the height or width of the box, with overflow exceptions,
        !          3933: <LI>the characteristics of the lines contained in the box: interlinespacing,
        !          3934: indentation of the first line, justification, hyphenation,
        !          3935: <LI>the conditions for breaking the box across pages,
        !          3936: <LI>the characteristics of the characters contained in the box:size, font,
        !          3937: style, underlining,
        !          3938: <LI>the depth of the box among overlapping boxes (often calledstacking order),
        !          3939: <LI>the characteristics of graphic elements contained in the box:style and
        !          3940: thickness of lines, fill pattern for closed objects,
        !          3941: <LI>the colors in text, graphics, images, and symbols contained inthe box are
        !          3942: displayed or printed,
        !          3943: <LI>for presentation boxes only, the contents of the box.
        !          3944: </UL>
        !          3945: <P>
        !          3946: The <A name="presfunct">presentation functions</A>are:</P>
        !          3947: <UL>
        !          3948: <LI>the creation of a presentation box
        !          3949: <LI>the line-breaking or page-breaking style,
        !          3950: <LI>the copying of another box.
        !          3951: </UL>
        !          3952: <P>
        !          3953: For each box and each view, every presentation parameter is defined once and
        !          3954: only once, either explicitly or by the <A href="#defaultpresrules">default
        !          3955: rules</A>.  In contrast, presentation functions are not obligatory and can
        !          3956: appear many times for the same element.  for example an element can create
        !          3957: many presentation boxes.  Another element may not use any presentation
        !          3958: functions.</P>
        !          3959: <P>
        !          3960: Each rule defining a presentation parameter begins with a keyword followed by
        !          3961: a colon. the keyword indicates the parameter which is the subject of the rule.
        !          3962: After the keyword and the colon, the remainder of the rule varies.  All rules
        !          3963: are terminated by a semicolon.</P>
        !          3964: <PRE>
        !          3965:      Rule     = PresParam ';' / PresFunc ';' .
        !          3966:      PresParam ='VertRef' ':' PositionHoriz /
        !          3967:                 'HorizRef' ':' PositionVert /
        !          3968:                 'VertPos' ':' VPos /
        !          3969:                 'HorizPos' ':' HPos /
        !          3970:                 'Height' ':' Dimension /
        !          3971:                 'Width' ':' Dimension /
        !          3972:                 'VertOverflow' ':' Boolean /
        !          3973:                 'HorizOverflow' ':' Boolean /
        !          3974:                 'LineSpacing' ':' DistanceInherit /
        !          3975:                 'Indent' ':' DistanceInherit /
        !          3976:                 'Adjust' ':' AdjustInherit /
        !          3977:                 'Justify' ':' BoolInherit /
        !          3978:                 'Hyphenate' ':' BoolInherit /
        !          3979:                 'PageBreak' ':' Boolean /
        !          3980:                 'LineBreak' ':' Boolean /
        !          3981:                 'InLine' ':' Boolean /
        !          3982:                 'NoBreak1' ':' AbsDist /
        !          3983:                 'NoBreak2' ':' AbsDist /
        !          3984:                 'Gather' ':' Boolean /
        !          3985:                 'Visibility' ':' NumberInherit /
        !          3986:                 'Size'  ':' SizeInherit /
        !          3987:                 'Font' ':' NameInherit /
        !          3988:                 'Style' ':' StyleInherit /
        !          3989:                 'Underline' ':' UnderLineInherit /
        !          3990:                 'Thickness' ':' ThicknessInherit /
        !          3991:                 'Depth' ':' NumberInherit /
        !          3992:                 'LineStyle' ':' LineStyleInherit /
        !          3993:                 'LineWeight' ':' DistanceInherit /
        !          3994:                 'FillPattern' ':' NameInherit /
        !          3995:                 'Background' ':' NameInherit /
        !          3996:                 'Foreground' ':' NameInherit .
        !          3997:                 'Content' ':' VarConst .
        !          3998:      PresFunc = Creation '(' BoxID ')' /
        !          3999:                 'Line' /
        !          4000:                 'NoLine' /
        !          4001:                 'Page' '(' BoxID ')' /
        !          4002:                 'Copy' '(' BoxTypeToCopy ')' .
        !          4003: </PRE>
        !          4004: </DIV>
        !          4005: 
        !          4006: <DIV class="subsection">
        !          4007: <H3>Box axes</H3>
        !          4008: 
        !          4009: <P>
        !          4010: The position of the middle axes <TT>VMiddle</TT> and <TT>HMiddle</TT> in
        !          4011: relation to their box is always calculated automatically as a function of the
        !          4012: height and width of the box and is not specified by the presentation rules. In
        !          4013: the presentation schema, these middle axes are used only to position their box
        !          4014: with respect to another by specifying the distance between the middle axis and
        !          4015: an axis or a side of another box (see the <A href="#position">relative
        !          4016: position</A>).</P>
        !          4017: <P>
        !          4018: The reference axes of a box are also used to position their box in relation to
        !          4019: another, but in contrast to the middle axes, the presentation schema must make
        !          4020: their position explicit, either in relation to a side or the middle axis of
        !          4021: the box itself, or in relation to an axis of an enclosed box.</P>
        !          4022: <P>
        !          4023: Only boxes of base elements have predefined reference axes.  For character
        !          4024: string boxes, the horizontal reference axis is the baseline of the characters
        !          4025: (the line which passes immediately under the upper-case letters, ignoring the
        !          4026: letter Q) and the vertical reference axis is at the left edge of the first
        !          4027: character of the string.</P>
        !          4028: <P>
        !          4029: The positions of a box's reference axes are defined by the <TT>VertRef</TT>
        !          4030: and <TT>HorizRef</TT> rules which specify the <A href="#distance">distance</A>
        !          4031: between the reference axis and an axis or parallel side of the same box or of
        !          4032: an enclosed box.</P>
        !          4033: <PRE>
        !          4034:                'VertRef' ':' PositionHoriz
        !          4035:                'HorizRef' ':' PositionVert
        !          4036: </PRE>
        !          4037: <BLOCKQUOTE class="example">
        !          4038: <P>
        !          4039: <STRONG>Example:</STRONG></P>
        !          4040: <P>
        !          4041: If, in the structure schema for mathematical formulas, the fractionelement is
        !          4042: defined by</P>
        !          4043: <PRE>
        !          4044: Fraction = BEGIN
        !          4045:            Numerator   = Expression;
        !          4046:            Denominator = Expression;
        !          4047:            END;
        !          4048: </PRE>
        !          4049: <P>
        !          4050: then the horizontal reference axis of the fraction can be positionedon top of
        !          4051: the denominator by the rule:</P>
        !          4052: <PRE>
        !          4053: Fraction :
        !          4054:      BEGIN
        !          4055:      HorizRef : Enclosed Denominator . Top;
        !          4056:      ...
        !          4057:      END;
        !          4058: </PRE>
        !          4059: <P>
        !          4060: To put the horizontal reference axis of a column at its middle:</P>
        !          4061: <PRE>
        !          4062: Column :
        !          4063:      BEGIN
        !          4064:      HorizRef : * . HMiddle;
        !          4065:      ...
        !          4066:      END;
        !          4067: </PRE>
        !          4068: </BLOCKQUOTE>
        !          4069: </DIV>
        !          4070: 
        !          4071: <DIV class="subsection">
        !          4072: <H3><A name="distunits">Distance units</A></H3>
        !          4073: 
        !          4074: <P>
        !          4075: Some distances and dimensions appear in many rules of a presentation schema,
        !          4076: especially in position rules (<TT>VertPos, HorizPos</TT>), in extent rules for
        !          4077: boxes (<TT>Height, Width</TT>), in rules defining lines (<TT>LineSpacing,
        !          4078: Indent</TT>), in rules controlling pagination (<TT>NoBreak1, NoBreak2</TT>)
        !          4079: and in rules specifying the thickness of strokes (<TT>LineWeight</TT>).</P>
        !          4080: <P>
        !          4081: In all these rules, the distance or extent can be expressed</P>
        !          4082: <UL>
        !          4083: <LI>either in relative units, which depend on the size of thecharacters in the
        !          4084: current font: height of the element's font orheight of the letter 'x',
        !          4085: <LI>or in absolute units: centimeter, millimeter, inch, typographer'spoint,
        !          4086: pica or pixel.
        !          4087: </UL>
        !          4088: <P>
        !          4089: Units can be chosen freely.  Thus, it is possible to use relative units inone
        !          4090: rule, centimeters in the next rule, and typographer's points inanother.</P>
        !          4091: <P>
        !          4092: Absolute units are used to set rigid rules for the appearance of documents. In
        !          4093: contrast, relative units allow changes of scale.  The editor lets the value of
        !          4094: relative units be changed dynamically.  Such changes affect every box using
        !          4095: relative units simultaneously and in the same proportion. Changing the value
        !          4096: of the relative units affects the size of the characters and graphical
        !          4097: elements, and the size of the boxes and the distances between them.</P>
        !          4098: <P>
        !          4099: A <A name="distance">distance</A> or extent is specified by a number, which
        !          4100: may be followed by one or more spaces and a units keyword.  When there is no
        !          4101: units keyword, the number specifies the number of relative units, where a
        !          4102: relative unit is the height of a character in the current font (an em).  When
        !          4103: the number is followed by a units keyword, the keyword indicates the type of
        !          4104: absolute units:</P>
        !          4105: <UL>
        !          4106: <LI><TT>em</TT>: height of the element's font,
        !          4107: <LI><TT>ex</TT>: height of the letter 'x',
        !          4108: <LI><TT>cm</TT>: centimeter,
        !          4109: <LI><TT>mm</TT>: millimeter,
        !          4110: <LI><TT>in</TT>: inch (1 in = 2.54 cm),
        !          4111: <LI><TT>pt</TT>: point (1 pt = 1/72 in),
        !          4112: <LI><TT>pc</TT>: pica (1 pc = 12 pt),
        !          4113: <LI><TT>px</TT>: pixel.
        !          4114: </UL>
        !          4115: <P>
        !          4116: Whatever the chosen unit, relative or absolute, the number is not necessarily
        !          4117: an integer and may be expressed in fixed point notation (using the American
        !          4118: convention of a period to express the decimal point).</P>
        !          4119: <P>
        !          4120: If the distance appears in a presentation rule for a numeric attribute, the
        !          4121: number can be replaced by the name of an attribute.  In this case, the value
        !          4122: of the attribute is used.  Obviously, the attribute name cannot be followed by
        !          4123: a decimal point and a fractional part, but it can be followed a units keyword.
        !          4124: However, the choice of units is limited to em, ex, pt and px.</P>
        !          4125: <PRE>
        !          4126:      Distance      = [ Sign ] AbsDist .
        !          4127:      Sign          ='+' / '-' .
        !          4128:      AbsDist       = IntegerOrAttr [ '.' DecimalPart ]
        !          4129:                      [ Unit ].
        !          4130:      IntegerOrAttr = IntegerPart / AttrID .
        !          4131:      IntegerPart   = NUMBER .
        !          4132:      DecimalPart   = NUMBER .
        !          4133:      Unit          ='em' / 'ex' / 'cm' / 'mm' / 'in' / 'pt' /
        !          4134:                     'pc' / 'px' / '%' .
        !          4135: </PRE>
        !          4136: <BLOCKQUOTE class="example">
        !          4137: <P>
        !          4138: <STRONG>Example:</STRONG></P>
        !          4139: <P>
        !          4140: The following rules specify that a box has a height of 10.5centimeters and a
        !          4141: width of 5.3 ems:</P>
        !          4142: <PRE>
        !          4143: Height : 10.5 cm;
        !          4144: Width : 5.3;
        !          4145: </PRE>
        !          4146: </BLOCKQUOTE>
        !          4147: </DIV>
        !          4148: 
        !          4149: <DIV class="subsection">
        !          4150: <H3><A name="position">Relative positions</A></H3>
        !          4151: 
        !          4152: <P>
        !          4153: The positioning of boxes uses the eight axes and sides, the sides generally
        !          4154: being used to define the juxtapositioning (vertical or horizontal) of boxes,
        !          4155: the middle axes being used to define centering, and the reference axes being
        !          4156: used for alignment.</P>
        !          4157: <P>
        !          4158: Two rules allow a box to placed relative to other boxes.  The <TT>VertPos</TT>
        !          4159: rule positions the box vertically.  The <TT>HorizPos</TT> rule positions the
        !          4160: box horizontally.  It is possible that a box's position could be entirely
        !          4161: determined by other boxes positioned relative to it. In this case, the
        !          4162: position is implicit and the word <TT>nil</TT> can be used to specify that no
        !          4163: position rule is needed.  Otherwise, an explicit rule must be given by
        !          4164: indicating the axis or side which defines the position of the box, followed by
        !          4165: an equals sign and the distance between between this axis or side and a
        !          4166: parallel axis or side of another box, called the reference box.  The box for
        !          4167: which the rule is written will be positioned relative to the reference
        !          4168: box.</P>
        !          4169: <PRE>
        !          4170:                 'VertPos' ':' VPos
        !          4171:                 'HorizPos' ':' HPos
        !          4172:      HPos     = 'nil' / VertAxis '=' HorizPosition
        !          4173:                 [ 'UserSpecified' ].
        !          4174:      VPos     = 'nil' / HorizAxis '=' VertPosition
        !          4175:                 [ 'UserSpecified' ].
        !          4176:      VertAxis  = 'Left' / 'VMiddle' / 'VRef' / 'Right' .
        !          4177:      HorizAxis = 'Top' / 'HMiddle' / 'HRef' / 'Bottom' .
        !          4178: </PRE>
        !          4179: <P>
        !          4180: The reference box is an adjacent box: enclosing, enclosed or adjacent. When a
        !          4181: rule is associated with a reference type attribute (and only in this case), it
        !          4182: can be a box of the element designated by the attribute.  The reference box
        !          4183: can be either a presentation box previously defined in the <TT>BOXES</TT>
        !          4184: section of the schema and created by a creation function, or the box
        !          4185: associated with a structured element.</P>
        !          4186: <P>
        !          4187: The structural position of the reference box (relative to the box for which
        !          4188: the rule is being written) is indicated by a keyword: <TT>Enclosing</TT>,
        !          4189: <TT>Enclosed</TT>, or, for sibling boxes, <TT>Previous</TT> or <TT>Next</TT>.
        !          4190: The reference attributes, or presentation boxes created by a reference
        !          4191: attribute, the <TT>Referred</TT> keyword may be used to designate the element
        !          4192: which the reference points to.  The keyword <TT>Creator</TT> can be used in
        !          4193: rules for presentation boxes to designate the box of the element which created
        !          4194: the presentation box.  Finally, the <TT>Root</TT> keyword can be used to
        !          4195: designate the root of the document.</P>
        !          4196: <P>
        !          4197: When the keyword is ambiguous, it is followed by a name of a type or
        !          4198: presentation box which resolves the ambiguity (the <TT>Creator</TT> and
        !          4199: <TT>Root</TT> keywords are never ambiguous).  If this name is not given, then
        !          4200: the first box encountered is used as the reference box. It is also possible to
        !          4201: use just the name of a type or presentation box without an initial keyword. In
        !          4202: this case, a sibling having that name will be used.  If the name is preceded
        !          4203: by the keyword <TT>NOT</TT>, then the reference box will be the first box
        !          4204: whose type is not the named one.  In place of the box or type name, the
        !          4205: keywords <TT>AnyElem</TT> and <TT>AnyBox</TT> can be used, representing
        !          4206: respectively, any structured element box and any presentation box.  A type
        !          4207: name may be preceded by a star in order to resolve the ambiguity in the
        !          4208: special case where the structure schema defines an <A
        !          4209: href="#references">inclusion</A> without expansion (or with partial expansion)
        !          4210: of the same type as an element of the scheme.  For mark pairs (and only for <A
        !          4211: href="#pairs">mark pairs</A>) the type name <EM>must</EM> be preceded by the
        !          4212: <TT>First</TT> or <TT>Second</TT> keyword, which indicates which of the two
        !          4213: marks of the pair  should be used as the reference box.</P>
        !          4214: <P>
        !          4215: The star character ('<TT>*</TT>') used alone designates the box to which the
        !          4216: rule applies (in this case, it is obviously useless to specify the type of the
        !          4217: reference box).</P>
        !          4218: <P>
        !          4219: The keywords <TT>Enclosing</TT> and <TT>Enclosed</TT> can be used no matter
        !          4220: what constructor defines the type to which the rule applies.  When applied to
        !          4221: the element which represents the entire document, <TT>Enclosing</TT>
        !          4222: designates the window or page in which the document's image is displayed for
        !          4223: the view to which the rule applies.  A box or type name without a keyword is
        !          4224: used for aggregate elements and designates another element of the same
        !          4225: aggregate.  It can also be used to designate a presentation or page layout
        !          4226: box.  The keywords <TT>Previous</TT> and <TT>Next</TT> are primarily used to
        !          4227: denote list elements, but can also be used to denote elements of an
        !          4228: aggregate.</P>
        !          4229: <P>
        !          4230: In the position rule, the structural position relative to the reference box is
        !          4231: followed, after a period, by the name of an axis or side.  The rule specifies
        !          4232: its node's position as being some distance from this axis or side of the
        !          4233: reference box.  If this distance is zero, then the distance does not appear in
        !          4234: the rule.  Otherwise, it does appear as a positive or negative number (the
        !          4235: sign is required for negative numbers). The sign takes into account the
        !          4236: orientation of the coordinate axes: for top to bottom for the vertical axis
        !          4237: and from left to right for the horizontal axis.  Thus, a negative distance in
        !          4238: a vertical position indicates that the side or axis specified in the rule is
        !          4239: above the side or axis of the reference box.</P>
        !          4240: <P>
        !          4241: The distance can be followed by the <TT>UserSpecified</TT> keyword (even if
        !          4242: the distance is nil and does not appear, the <TT>UserSpecified</TT> keyword
        !          4243: can be used).  It indicates that when the element to which the rule applies is
        !          4244: being created, the editor will ask the user to specify the distance himself,
        !          4245: using the mouse.  In this case, the distance specified in the rule is a
        !          4246: default distance which is suggested to the user but can be modified.  The
        !          4247: <TT>UserSpecified</TT> keyword can be used either in the vertical position
        !          4248: rule, the horizontal position rule, or both.</P>
        !          4249: <PRE>
        !          4250:      VertPosition  = Reference '.' HorizAxis [ Distance ] .
        !          4251:      HorizPosition = Reference '.' VertAxis [ Distance ] .
        !          4252:      Reference     ='Enclosing' [ BoxTypeNot ] /
        !          4253:                     'Enclosed' [ BoxTypeNot ] /
        !          4254:                     'Previous' [ BoxTypeNot ] /
        !          4255:                     'Next' [ BoxTypeNot ] /
        !          4256:                     'Referred' [ BoxTypeNot ] /
        !          4257:                     'Creator' /
        !          4258:                     'Root' /
        !          4259:                     '*' /
        !          4260:                      BoxOrType .
        !          4261:      BoxOrType     = BoxID /
        !          4262:                      [ '*' ] [ FirstSec ] ElemID /
        !          4263:                     'AnyElem' / 'AnyBox' .
        !          4264:      BoxTypeNot    = [ 'NOT' ] BoxOrType .
        !          4265: </PRE>
        !          4266: <BLOCKQUOTE class="example">
        !          4267: <P>
        !          4268: <STRONG>Example:</STRONG></P>
        !          4269: <P>
        !          4270: If a <A name="expos1">report</A>is defined by by the following
        !          4271: structureschema:</P>
        !          4272: <PRE>
        !          4273: Report = BEGIN
        !          4274:           Title  = Text;
        !          4275:           Summary = Text;
        !          4276:           Keywords = Text;
        !          4277:           ...
        !          4278:           END;
        !          4279: </PRE>
        !          4280: <P>
        !          4281: then the presentation schema could contain the rules:</P>
        !          4282: <PRE>
        !          4283: Report : BEGIN
        !          4284:           VertPos  : Top = Enclosing . Top;
        !          4285:           HorizPos : Left = Enclosing . Left;
        !          4286:           ...
        !          4287:           END;
        !          4288: </PRE>
        !          4289: <P>
        !          4290: These rules place the <A name="reportexample">report</A>in the upperleft
        !          4291: corner of the enclosing box, which is the window in which thedocument is being
        !          4292: edited.</P>
        !          4293: <PRE>
        !          4294: Title :   BEGIN
        !          4295:           VertPos  : Top = Enclosing . Top + 1;
        !          4296:           HorizPos : VMiddle = Enclosing . VMiddle;
        !          4297:           ...
        !          4298:           END;
        !          4299: </PRE>
        !          4300: <P>
        !          4301: The top of the title is one line (a line has the height of thecharacters of
        !          4302: the title) from the top of the report, which is also thetop of the editing
        !          4303: window.  The title is centered horizontally in thewindow (see <A
        !          4304: href="#posdim">figure</A>).</P>
        !          4305: <PRE>
        !          4306: Summary :  BEGIN
        !          4307:           VertPos  : Top = Title . Bottom + 1.5;
        !          4308:           HorizPos : Left = Enclosing . Left + 2 cm;
        !          4309:           ...
        !          4310:           END;
        !          4311: </PRE>
        !          4312: <P>
        !          4313: The top of the summary is place a line and a half below the bottom ofthe title
        !          4314: and is shifted two centimeters from the side of the window.</P>
        !          4315: </BLOCKQUOTE>
        !          4316: <BLOCKQUOTE class="example">
        !          4317: <P>
        !          4318: <STRONG>Example:</STRONG></P>
        !          4319: <P>
        !          4320: Suppose there is a <A name="expos2">Design</A>logical structure which contains
        !          4321: graphical elements:</P>
        !          4322: <PRE>
        !          4323: Design = LIST OF (ElemGraph = GRAPHICS);
        !          4324: </PRE>
        !          4325: <P>
        !          4326: The following rules allow the user to freely choose the position ofeach
        !          4327: element when it is created:</P>
        !          4328: <PRE>
        !          4329: ElemGraph =
        !          4330:    BEGIN
        !          4331:    VertPos : Top = Enclosing . Top + 1 cm UserSpecified;
        !          4332:    HorizPos: Left = Enclosing . Left UserSpecified;
        !          4333:    ...
        !          4334:    END;
        !          4335: </PRE>
        !          4336: <P>
        !          4337: Thus, when a graphical element is created, its default placement is atthe left
        !          4338: of the window and 1 cm from the top, but the user can move itimmediately,
        !          4339: simply by moving the mouse.</P>
        !          4340: </BLOCKQUOTE>
        !          4341: </DIV>
        !          4342: 
        !          4343: <DIV class="subsection">
        !          4344: <H3><A name="dimension">Box extents</A></H3>
        !          4345: 
        !          4346: <P>
        !          4347: The extents (height and width) of each box are defined by the two rules
        !          4348: <TT>Height</TT> and <TT>Width</TT>.  There are three types of extents: fixed,
        !          4349: relative, and elastic.</P>
        !          4350: 
        !          4351: <DIV class="subsubsection">
        !          4352: <H4>Fixed extents</H4>
        !          4353: 
        !          4354: <P>
        !          4355: A fixed dimension sets the height or width of the box independently of all
        !          4356: other boxes.  It is expressed in <A href="#distunits">distance units</A>.  The
        !          4357: extent can be followed by the <TT>UserSpecified</TT> keyword which indicates
        !          4358: that when the element to which the rule applies is being created, the editor
        !          4359: will ask the user to specify the extent himself, using the mouse.  In this
        !          4360: case, the extent specified in the rule is a default extent which is suggested
        !          4361: to the user but can be modified.  The <TT>UserSpecified</TT> keyword can be
        !          4362: used either in the <TT>Height</TT> rule, the <TT>Width</TT> rule, or both.</P>
        !          4363: <P>
        !          4364: A fixed extent rule can be ended by the <TT>Min</TT> keyword, which signifies
        !          4365: that the indicated value is a minimum, and that, if the contents of the box
        !          4366: require it, a larger extent is possible.</P>
        !          4367: <PRE>
        !          4368:                 'Height' ':' Dimension
        !          4369:                 'Width' ':' Dimension
        !          4370:      Dimension = AbsDist [ 'UserSpecified' ]  [ 'Min' ] /
        !          4371:                  ...
        !          4372: </PRE>
        !          4373: <BLOCKQUOTE class="example">
        !          4374: <P>
        !          4375: <STRONG>Example:</STRONG></P>
        !          4376: <P>
        !          4377: Continuing with the <A href="#expos2">previous example</A>, it is possibleto
        !          4378: allow the user to choose the size of each graphical element as itis
        !          4379: created:</P>
        !          4380: <PRE>
        !          4381: ElemGraph : BEGIN
        !          4382:             Width : 2 cm UserSpecified;
        !          4383:             Height : 1 cm UserSpecified;
        !          4384:             ...
        !          4385:             END;
        !          4386: </PRE>
        !          4387: <P>
        !          4388: Thus, when a graphical element is create, it is drawn by default with a width
        !          4389: of 2 cm and a height of 1 cm, but the user is free to resize it immediately
        !          4390: with the mouse.</P>
        !          4391: <PRE>
        !          4392: Summary :  BEGIN
        !          4393:            Height : 5 cm Min;
        !          4394:            ...
        !          4395:            END;
        !          4396: Keywords : BEGIN
        !          4397:            VertPos : Top = Summary . Bottom;
        !          4398:            ...
        !          4399:            END;
        !          4400: </PRE>
        !          4401: </BLOCKQUOTE>
        !          4402: </DIV>
        !          4403: 
        !          4404: <DIV class="subsubsection">
        !          4405: <H4>Relative extents</H4>
        !          4406: 
        !          4407: <P>
        !          4408: A relative extent determines the extent as a function of the extent of another
        !          4409: box, just as a relative position places a box in relation to another. The
        !          4410: reference box in an extent rule is designated using the same syntax as is used
        !          4411: in a relative position rule.  It is followed by a period and a <TT>Height</TT>
        !          4412: or <TT>Width</TT> keyword, depending on the extent being referred to.  Next
        !          4413: comes the relation between the extent being defined and the extent of the
        !          4414: reference box.  This relation can be either a percentage or a difference.</P>
        !          4415: <P>
        !          4416: A percentage is indicated by a star (the multiplication symbol) followed by
        !          4417: the numeric percentage value (which may be greater than or less than 100) and
        !          4418: the percent (`%') character.  A difference is simply indicated by a signed
        !          4419: difference.</P>
        !          4420: <P>
        !          4421: If the rule appears in the presentation rules of a numeric attribute, the
        !          4422: percentage value can be replaced by the name of the attribute. This attribute
        !          4423: is then used as a percentage.  The attribute can also be used as part of a <A
        !          4424: href="#distance">difference</A>.</P>
        !          4425: <P>
        !          4426: Just as with a fixed extent, a relative extent rule can end with the
        !          4427: <TT>Min</TT> keyword, which signifies that the extent is a minimum and that,
        !          4428: if the contents of the box require it, a larger extent is possible.</P>
        !          4429: <P>
        !          4430: A special case of relative extent rules is:</P>
        !          4431: <PRE>
        !          4432: Height : Enclosed . Height;
        !          4433: </PRE>
        !          4434: <P>
        !          4435: or</P>
        !          4436: <PRE>
        !          4437: Width  : Enclosed . Width;
        !          4438: </PRE>
        !          4439: <P>
        !          4440: which specifies that the box has a height (or width) such that itencloses all
        !          4441: the boxes which it contains, excluding boxes having  a rule<TT>VertOverflow:
        !          4442: Yes;</TT>ou <TT>HorizOverflow:Yes;</TT>.</P>
        !          4443: <P>
        !          4444: <STRONG>Note:</STRONG> character strings (type <TT>TEXT_UNIT</TT>) generally
        !          4445: must use the sum of the widths of the characters which compose them as their
        !          4446: width, which is expressed by the rule:</P>
        !          4447: <PRE>
        !          4448: TEXT_UNIT :
        !          4449:    Width  : Enclosed . Width;
        !          4450: </PRE>
        !          4451: <P>
        !          4452: If this rule is not the default <TT>Width</TT>rule, it must be givenexplicitly
        !          4453: in the <TT>RULES</TT>section which defines the presentationrules of the
        !          4454: logical elements.</P>
        !          4455: <PRE>
        !          4456:                   'Height' ':' Extent
        !          4457:                   'Width' ':' Extent
        !          4458:      Extent      = Reference '.' HeightWidth [ Relation ]
        !          4459:                    [ 'Min' ] / ...
        !          4460:      HeightWidth ='Height' / 'Width' .
        !          4461:      Relation    ='*' ExtentAttr '%' / Distance .
        !          4462:      ExtentAttr  = ExtentVal / AttrID .
        !          4463:      ExtentVal   = NUMBER .
        !          4464: </PRE>
        !          4465: <BLOCKQUOTE class="example">
        !          4466: <P>
        !          4467: <STRONG>Example:</STRONG></P>
        !          4468: <P>
        !          4469: Completing the <A href="#expos1">above example</A>, it is possible tospecify
        !          4470: that the report takes its width from the editing window andits height from the
        !          4471: size of its contents (this can obviously begreater than that of the
        !          4472: window):</P>
        !          4473: <PRE>
        !          4474: Report :  BEGIN
        !          4475:           Width : Enclosing . Width;
        !          4476:           Height : Enclosed . Height;
        !          4477:           ...
        !          4478:           END;
        !          4479: </PRE>
        !          4480: <P>
        !          4481: Then, the following rules make the title occupy 60% of the width ofthe report
        !          4482: (which is that of the window) and is broken into centeredlines of this width
        !          4483: (see the <A href="#linerule"><TT>Line</TT> rule</A>).</P>
        !          4484: <PRE>
        !          4485: Title :   BEGIN
        !          4486:           Width : Enclosing . Width * 60%;
        !          4487:           Height : Enclosed . Height;
        !          4488:           Line;
        !          4489:           Adjust : VMiddle;
        !          4490:           ...
        !          4491:           END;
        !          4492: </PRE>
        !          4493: <P>
        !          4494: The summary occupy the entire width of the window, with the exceptionof a 2 cm
        !          4495: margin reserved by the horizontal position rule:</P>
        !          4496: <PRE>
        !          4497: Summary : BEGIN
        !          4498:           Width : Enclosing . Width - 2 cm;
        !          4499:           Height : Enclosed . Height;
        !          4500:           ...
        !          4501:           END;
        !          4502: </PRE>
        !          4503: <P>
        !          4504: This set of rules, plus the <A href="#reportexample">position rules given
        !          4505: above</A>, produce the layout of boxes shown in the following<A
        !          4506: href="#posdim">figure</A>.</P>
        !          4507: 
        !          4508: <DIV class="figure">
        !          4509: <HR>
        !          4510: <PRE>
        !          4511: -------------------------------------------------------------
        !          4512: | Window and Report           ^                             |
        !          4513: |                             | 1 line                      |
        !          4514: |                             v                             |
        !          4515: |           -------------------------------------           |
        !          4516: |           |                                   |           |
        !          4517: :    20%    :               Title               :    20%    :
        !          4518: :&lt;--------->:                                   :&lt;--------->:
        !          4519: :           :                60%                :           :
        !          4520: :           :&lt;--------------------------------->:           :
        !          4521: |           |                                   |           |
        !          4522: |           -------------------------------------           |
        !          4523: |                             ^                             |
        !          4524: |                             | 1.5 line                    |
        !          4525: |                             |                             |
        !          4526: |                             v                             |
        !          4527: |        ---------------------------------------------------|
        !          4528: |  2 cm  |                                                  |
        !          4529: |&lt;------>|                    Summary                       |
        !          4530: :        :                                                  :
        !          4531: </PRE>
        !          4532: <P align=center>
        !          4533: <EM><A name="posdim">Box position and extent</A><EM></EM></EM></P>
        !          4534: <HR>
        !          4535: </DIV>
        !          4536: </BLOCKQUOTE>
        !          4537: </DIV>
        !          4538: 
        !          4539: <DIV class="subsubsection">
        !          4540: <H4>Elastic extents</H4>
        !          4541: 
        !          4542: <P>
        !          4543: The last type of extent is the elastic extent.  Either one or both extents can
        !          4544: be elastic.  A box has an elastic extent when two opposite sides are linked by
        !          4545: distance constraints to two sides or axes of other boxes.</P>
        !          4546: <P>
        !          4547: One of the sides of the elastic box is linked by a position rule
        !          4548: (<TT>VertPos</TT> or <TT>HorizPos</TT>) to a neighboring box.  The other side
        !          4549: is link to another box by a <TT>Height</TT> or <TT>Width</TT> rule, which
        !          4550: takes the same form as the position rule.  For the elastic box itself, the
        !          4551: notions of sides (left or right, top or bottom) are fuzzy, since the movement
        !          4552: of either one of the two reference boxes can, for example, make the left side
        !          4553: of the elastic box move to the right of its right side.  This is not
        !          4554: important.  The only requirement is that the two sides of the elastic box used
        !          4555: in the position and extent rule are opposite sides of the box.</P>
        !          4556: <PRE>
        !          4557:                   'Height' ':' Extent
        !          4558:                   'Width' ':' Extent
        !          4559:      Extent   = HPos / VPos / ...
        !          4560: </PRE>
        !          4561: <BLOCKQUOTE class="example">
        !          4562: <P>
        !          4563: <STRONG>Example:</STRONG></P>
        !          4564: <P>
        !          4565: Suppose we want to draw an elastic arrow or line between the middle ofthe
        !          4566: bottom side of box A and the upper left corner of box B.  To dothis, we would
        !          4567: define a graphics box whose upper left corner coincideswith the middle of the
        !          4568: bottom side of A (a position rule) and whoselower right corner coincides with
        !          4569: with the upper left corner of B(dimension rules):</P>
        !          4570: <PRE>
        !          4571: LinkedBox :
        !          4572:    BEGIN
        !          4573:    VertPos : Top = A .Bottom;
        !          4574:    HorizPos : Left = A . VMiddle;
        !          4575:    Height : Bottom = B . Top;
        !          4576:    Width : Right = B . Left;
        !          4577:    END;
        !          4578: </PRE>
        !          4579: </BLOCKQUOTE>
        !          4580: <BLOCKQUOTE class="example">
        !          4581: <P>
        !          4582: <STRONG>Example:</STRONG></P>
        !          4583: <P>
        !          4584: The element SectionTitle creates a presentation box called SectionNumwhich
        !          4585: contains the number of the section.  Suppose we want to alignthe SectionNum
        !          4586: and SectionTitle horizontally, have the SectionNum takeits width from its
        !          4587: contents (the section number), have theSectionTitle box begin 0.5 cm to the
        !          4588: right of the SectionNum box andend at the right edge of its enclosing box.
        !          4589: This would make theSectionTitle box elastic, since its width is defined by the
        !          4590: positionof its left and right sides.  The following rules produce this
        !          4591: effect:</P>
        !          4592: <PRE>
        !          4593: SectionNum :
        !          4594:    BEGIN
        !          4595:    HorizPos : Left = Enclosing . Left;
        !          4596:    Width : Enclosed . Width;
        !          4597:    ...
        !          4598:    END;
        !          4599: 
        !          4600: SectionTitle :
        !          4601:    BEGIN
        !          4602:    HorizPos : Left = SectionNum . Right + 0.5 cm;
        !          4603:    Width : Right = Enclosing . Right;
        !          4604:    ...
        !          4605:    END;
        !          4606: </PRE>
        !          4607: </BLOCKQUOTE>
        !          4608: </DIV>
        !          4609: </DIV>
        !          4610: 
        !          4611: <DIV class="subsection">
        !          4612: <H3>Overflow</H3>
        !          4613: 
        !          4614: <P>
        !          4615: A boxes corresponding to a structural element normally contain all boxes
        !          4616: corresponding to the elements of its subtree.  However, in some cases, it
        !          4617: could be necessary to allow a box to jut out from its parent box. Two
        !          4618: presentation rules indicate that such an overflow is allowed, one for
        !          4619: horizontal overflow, one for vertical overflow.</P>
        !          4620: <P>
        !          4621: Each of these rules is expressed by a keyword followed by a colon and the
        !          4622: keyword <TT>Yes</TT> or <TT>No</TT>.</P>
        !          4623: <PRE>
        !          4624:                'VertOverflow' ':' Boolean /
        !          4625:                'HorizOverflow' ':' Boolean .
        !          4626:      Boolean = 'Yes' / 'No' .
        !          4627: </PRE>
        !          4628: </DIV>
        !          4629: 
        !          4630: <DIV class="subsection">
        !          4631: <H3>Inheritance</H3>
        !          4632: 
        !          4633: <P>
        !          4634: A presentation parameter can be defined by reference to the same parameter of
        !          4635: another box in the tree of boxes.  These structural links are expressed by
        !          4636: kinship.  The reference box can be that of the element immediately above in
        !          4637: the structure (<TT>Enclosing</TT>), two levels above (<TT>GrandFather</TT>),
        !          4638: immediately below (<TT>Enclosed</TT>) or immediately before
        !          4639: (<TT>Previous</TT>).  In the case of a presentation box, and only in that
        !          4640: case, the reference box may be the element which created the presentation box
        !          4641: (<TT>Creator</TT>).</P>
        !          4642: <P>
        !          4643: Kinship is expressed in terms of the logical structure of the document and not
        !          4644: in terms of the tree of boxes.  The presentation box cannot transmit any of
        !          4645: their parameters by inheritance; only structured element boxes can do so. As
        !          4646: an example, consider an element B which follows an element A in the logical
        !          4647: structure.  The element B creates a presentation box P in front of itself,
        !          4648: using the <TT>CreateBefore</TT> rule (see the <A href="#creation">creation
        !          4649: rules</A>).  If element B's box inherits its character style using the
        !          4650: <TT>Previous</TT> kinship operation, it gets its character style from A's box,
        !          4651: not from P's box.  Inheritance works differently for positions and extents,
        !          4652: which can refer to presentation boxes.</P>
        !          4653: <P>
        !          4654: The inherited parameter value can be the same as that of the reference box.
        !          4655: This is indicated by an equals sign.  However, for numeric parameters, a
        !          4656: different value can be obtained by adding or subtracting a number from the
        !          4657: reference box's parameter value.  Addition is indicated by a plus sign before
        !          4658: the number, while subtraction is specified with a minus sign.  The value of a
        !          4659: parameter can also be given a maximum (if the sign is a plus) or minimum (if
        !          4660: the sign is a minus).</P>
        !          4661: <P>
        !          4662: If the rule is being applied to a numeric attribute, the number to add or
        !          4663: subtract can be replaced by the attribute name.  The value of a maximum or
        !          4664: minimum may also be replaced by an attribute name.  In these cases, the value
        !          4665: of the attribute is used.</P>
        !          4666: <PRE>
        !          4667:   Inheritance   = Kinship  InheritedValue .
        !          4668:   Kinship       ='Enclosing' / 'GrandFather' / 'Enclosed' /
        !          4669:                  'Previous' / 'Creator' .
        !          4670:   InheritedValue ='+' PosIntAttr [ 'Max' maximumA ] /
        !          4671:                  '-' NegIntAttr [ 'Min' minimumA ] /
        !          4672:                  '=' .
        !          4673:   PosIntAttr    = PosInt / AttrID .
        !          4674:   PosInt        = NUMBER .
        !          4675:   NegIntAttr    = NegInt / AttrID .
        !          4676:   NegInt        = NUMBER .
        !          4677:   maximumA      = maximum / AttrID .
        !          4678:   maximum       = NUMBER .
        !          4679:   minimumA      = minimum / AttrID .
        !          4680:   minimum       = NUMBER .
        !          4681: </PRE>
        !          4682: <P>
        !          4683: The parameters which can be obtained by inheritance are justification,
        !          4684: hyphenation, interline spacing, character font (font family), font style, font
        !          4685: size, visibility, indentation, underlining, alignment of text, stacking order
        !          4686: of objects, the style and thickness of lines, fill pattern and the colors of
        !          4687: lines and characters.</P>
        !          4688: </DIV>
        !          4689: 
        !          4690: <DIV class="subsection">
        !          4691: <H3><A name="linerule">Line breaking</A></H3>
        !          4692: 
        !          4693: <P>
        !          4694: The <TT>Line</TT> rule specifies that the contents of the box should be broken
        !          4695: into lines: the boxes included in the box to which this rule is attached are
        !          4696: displayed one after the other, from left to right, with their horizontal
        !          4697: reference axes aligned so that they form a series of lines.  The length of
        !          4698: these lines is equal to the width of the box to which the <TT>Line</TT> rule
        !          4699: is attached.</P>
        !          4700: <P>
        !          4701: When an included box overflows the current line, it is either carried forward
        !          4702: to the next line, cur, or left the way it is.  The <A
        !          4703: href="#breakcond"><TT>LineBreak</TT> rule</A> is used to allow or prevent the
        !          4704: breaking of included boxes.  If the included box is not breakable but is
        !          4705: longer than the space remaining on the line, it is left as is.  When a
        !          4706: character string box is breakable, the line is broken between words or, if
        !          4707: necessary, by <A href="#hyphenaterule">hyphenating a word</A>.  When a
        !          4708: compound box is breakable, the box is transparent in regard to line breaking.
        !          4709: The boxes included in the compound box are treated just like included boxes
        !          4710: which have the <TT>LineBreak</TT> rule.  Thus, it is possible to traverse a
        !          4711: complete subtree of boxes to line break the text leaves of a complex
        !          4712: structure.</P>
        !          4713: <P>
        !          4714: The relative position rules of the included boxes are ignored, since the boxes
        !          4715: will be placed according to the line breaking rules.</P>
        !          4716: <P>
        !          4717: The <TT>Line</TT> rule does not have a parameter.  The characteristics of the
        !          4718: lines that will be constructed are determined by the <TT>LineSpacing</TT>,
        !          4719: <TT>Indent</TT>, <TT>Adjust</TT>, <TT>Justify</TT>, and <TT>Hyphenate</TT>
        !          4720: rules.  Moreover, the <A href="#inlinerule"><TT>Inline</TT> rule</A> permits
        !          4721: the exclusion of certain elements from the line breaking process.</P>
        !          4722: <P>
        !          4723: When the <TT>Line</TT> rule appears in the rules sequence of a non-primary
        !          4724: view, it applies only to that view, but when the <TT>Line</TT> rule appears in
        !          4725: the rules sequence of the primary view, it also applies to the other views by
        !          4726: default, except for those views which explicitly invoke the <TT>NoLine</TT>
        !          4727: rule.  Thus, the <TT>NoLine</TT> rule can be used in a non-primary view to
        !          4728: override the primary view's <TT>Line</TT> rule.  The <TT>NoLine</TT> rule must
        !          4729: not be used with the primary view because the absence of the <TT>Line</TT>
        !          4730: rule has the same effect. Like the <TT>Line</TT> rule, the <TT>NoLine</TT>
        !          4731: rule does not take any parameters.</P>
        !          4732: <PRE>
        !          4733:                  'Line'
        !          4734:                  'NoLine'
        !          4735: </PRE>
        !          4736: 
        !          4737: <DIV class="subsubsection">
        !          4738: <H4><A name="linespacing">Line spacing</A></H4>
        !          4739: 
        !          4740: <P>
        !          4741: The <TT>LineSpacing</TT> rule defines the line spacing to be used in the line
        !          4742: breaking process.  The line spacing is the distance between the baselines
        !          4743: (horizontal reference axis) of the successive lines produced by the
        !          4744: <TT>Line</TT> rule.  The value of the line spacing can be specified as a
        !          4745: constant or by inheritance.  It is expressed in any of the available <A
        !          4746: href="#distunits">distance units</A>.</P>
        !          4747: <P>
        !          4748: Inheritance allows the value to be obtained from a relative in the structure
        !          4749: tree, either without change (an equals sign appears after the inheritance
        !          4750: keyword), with a positive difference (a plus sign), or a negative difference
        !          4751: (a minus sign).  When the rule uses a difference, the value of the difference
        !          4752: follows the sign and is expressed as a <A href="#distunits">distance</A>.</P>
        !          4753: <PRE>
        !          4754:                       'LineSpacing' ':' DistOrInherit
        !          4755:      DistOrInherit =   Kinship InheritedDist / Distance .
        !          4756:      InheritedDist = '=' / '+' AbsDist / '-' AbsDist .
        !          4757: </PRE>
        !          4758: <P>
        !          4759: When the line spacing value (or its difference from another element) is
        !          4760: expressed in relative units, it changes with the size of the characters. Thus,
        !          4761: when a larger font is chosen for a part of the document, the line spacing of
        !          4762: that part expands proportionally.  In contrast, when the line spacing value is
        !          4763: expressed in absolute units (centimeters, inches, typographer's points), it is
        !          4764: independent of the characters, which permits the maintenance of a consistent
        !          4765: line spacing, whatever the character font.  Either approach can be taken,
        !          4766: depending on the desired effect.</P>
        !          4767: </DIV>
        !          4768: 
        !          4769: <DIV class="subsubsection">
        !          4770: <H4>First line indentation</H4>
        !          4771: 
        !          4772: <P>
        !          4773: The <TT>Indent</TT> rule is used to specify the indentation of the first line
        !          4774: of the elements broken into lines by the <TT>Line</TT> function. The
        !          4775: indentation determines how far the first line of the element is shifted with
        !          4776: respect to the other lines of the same element.  It can be specified as a
        !          4777: constant or by inheritance.  The constant value is a positive integer (shifted
        !          4778: to the right; the sign is optional), a negative integer (shifted to the left)
        !          4779: or zero (no shift).  All available <A href="#distunits">units</A> can be
        !          4780: used.</P>
        !          4781: <P>
        !          4782: Indentation can be defined for any box, regardless of whether the box is line
        !          4783: broken, and transmitted by inheritance to elements that are line broken. The
        !          4784: size of the indentation is specified in the same manner as the <A
        !          4785: href="#linespacing">line spacing</A>.</P>
        !          4786: <PRE>
        !          4787:                  'Indent' ':' DistOrInherit
        !          4788: </PRE>
        !          4789: </DIV>
        !          4790: 
        !          4791: <DIV class="subsubsection">
        !          4792: <H4>Alignment</H4>
        !          4793: 
        !          4794: <P>
        !          4795: The alignment style of the lines constructed during line breaking is defined
        !          4796: by the <TT>Adjust</TT> rule.  The alignment value can be a constant or
        !          4797: inherited.  A constant value is specified by a keyword:</P>
        !          4798: <UL>
        !          4799: <LI><TT>Left</TT>: at the left edge,
        !          4800: <LI><TT>Right</TT>: at the right edge,
        !          4801: <LI><TT>VMiddle</TT>: centered
        !          4802: <LI><TT>LeftWithDots</TT>: at the left edge with a dotted linefilling out the
        !          4803: last line up to the right edge of the line breaking box.
        !          4804: </UL>
        !          4805: <P>
        !          4806: An inherited value can only be the same as that of the reference box and is
        !          4807: specified by a kinship keyword followed by an equals sign.</P>
        !          4808: <PRE>
        !          4809:                   'Adjust' ':' AlignOrInherit
        !          4810:      AlignOrInherit = Kinship '=' / Alignment .
        !          4811:      Alignment      = 'Left' / 'Right' / 'VMiddle' /
        !          4812:                       'LeftWithDots' .
        !          4813: </PRE>
        !          4814: </DIV>
        !          4815: 
        !          4816: <DIV class="subsubsection">
        !          4817: <H4>Justification</H4>
        !          4818: 
        !          4819: <P>
        !          4820: The <TT>Justify</TT> rule indicates whether the lines contained in the box and
        !          4821: produced by a <TT>Line</TT> rule should be extended horizontally to occupy the
        !          4822: entire width of their enclosing box.  The first and last lines are treated
        !          4823: specially: the position of the beginning of the first line is fixed by the
        !          4824: <TT>Indent</TT> rule and last line is not extended.  The justification
        !          4825: parameter defined by this rule takes a boolean value, which can be a constant
        !          4826: or inherited.  A constant boolean value is expressed by either the
        !          4827: <TT>Yes</TT> or the <TT>No</TT> keyword.  An inherited value can only be the
        !          4828: same as that of the reference box and is specified by a kinship keyword
        !          4829: followed by an equals sign.</P>
        !          4830: <PRE>
        !          4831:                    'Justify' ':' BoolInherit
        !          4832:      BoolInherit = Boolean / Kinship '=' .
        !          4833:      Boolean      ='Yes' / 'No' .
        !          4834: </PRE>
        !          4835: <P>
        !          4836: When the lines are justified, the alignment parameter specified in the
        !          4837: <TT>Adjust</TT> rule has no influence, other than on the last line produced.
        !          4838: This occurs because, when the other are extended to the limits of the box, the
        !          4839: alignment style is no longer perceptible.</P>
        !          4840: <BLOCKQUOTE class="example">
        !          4841: <P>
        !          4842: <STRONG>Example:</STRONG></P>
        !          4843: <P>
        !          4844: An important use of inheritance is to vary the characteristics oflines for an
        !          4845: element type (for example, Paragraph) according to theenclosing environment
        !          4846: (for example, Summary or Section), and thusobtain different line breaking
        !          4847: styles for the same elements when theyappear in different environments.  The
        !          4848: following rules specify thatparagraphs inherit their alignment, justification,
        !          4849: and line spacing:</P>
        !          4850: <PRE>
        !          4851: Paragraph :
        !          4852:    BEGIN
        !          4853:    Justify : Enclosing = ;
        !          4854:    LineSpacing : Enclosing = ;
        !          4855:    Adjust : Enclosing =;
        !          4856:    Line;
        !          4857:    END;
        !          4858: </PRE>
        !          4859: <P>
        !          4860: If the alignment, justification, and line spacing of the Sectionand Summary
        !          4861: elements is fixed:</P>
        !          4862: <PRE>
        !          4863: Section :
        !          4864:    BEGIN
        !          4865:    Adjust : Left;
        !          4866:    Justify : Yes;
        !          4867:    LineSpacing : 1;
        !          4868:    END;
        !          4869: Summary :
        !          4870:    BEGIN
        !          4871:    Adjust : VMiddle;
        !          4872:    Justify : No;
        !          4873:    LineSpacing : 1.3;
        !          4874:    END;
        !          4875: </PRE>
        !          4876: <P>
        !          4877: then the paragraphs appearing in sections are justified with a simpleline
        !          4878: spacing while those appearing in summaries are centered and notjustified and
        !          4879: have a larger line spacing.  These are nevertheless thevery same type of
        !          4880: paragraph defined in the logical structure schema.</P>
        !          4881: </BLOCKQUOTE>
        !          4882: </DIV>
        !          4883: 
        !          4884: <DIV class="subsubsection">
        !          4885: <H4><A name="hyphenaterule">Hyphenation</A></H4>
        !          4886: 
        !          4887: <P>
        !          4888: The <TT>Hyphenate</TT> rule indicates whether or not words should be broken by
        !          4889: hyphenation at the end of lines.  It affects the lines produced by the
        !          4890: <TT>Line</TT> rule and contained in the box carrying the <TT>Hyphenate</TT>
        !          4891: rule.</P>
        !          4892: <P>
        !          4893: The hyphenation parameter takes a boolean value, which can be either constant
        !          4894: or inherited.  A constant boolean value is expressed by either the
        !          4895: <TT>Yes</TT> or the <TT>No</TT> keyword.  An inherited value can only be the
        !          4896: same as that of the reference box and is specified by a kinship keyword
        !          4897: followed by an equals sign.</P>
        !          4898: <PRE>
        !          4899:                    'Hyphenate' ':' BoolInherit
        !          4900:      BoolInherit = Boolean / Kinship '=' .
        !          4901:      Boolean     = 'Yes' / 'No' .
        !          4902: </PRE>
        !          4903: </DIV>
        !          4904: 
        !          4905: <DIV class="subsubsection">
        !          4906: <H4><A name="inlinerule">Avoiding line breaking</A></H4>
        !          4907: 
        !          4908: <P>
        !          4909: The <TT>InLine</TT> rule is used to specify that a box that would otherwise
        !          4910: participate in line breaking asked for by the <TT>Line</TT> rule of an
        !          4911: enclosing box, instead avoids the line breaking process and positions itself
        !          4912: according to the <TT>HorizPos</TT> and <TT>VertPos</TT> rules that apply to
        !          4913: it.  When the <TT>InLine</TT> rule applies to a box which would not be line
        !          4914: broken, it has no effect.</P>
        !          4915: <P>
        !          4916: The rule is expressed by the <TT>InLine</TT> keyword followed by a colon and
        !          4917: the keyword <TT>Yes</TT>, if the box should participate in line breaking, or
        !          4918: the keyword <TT>No</TT>, if it should not.  This is the only form possible:
        !          4919: this rule cannot be inherited.  Moreover, it can only appear in the rules of
        !          4920: the primary view and applies to all views defined in the presentation
        !          4921: schema.</P>
        !          4922: <PRE>
        !          4923:                'InLine' ':' Boolean .
        !          4924:      Boolean = 'Yes' / 'No' .
        !          4925: </PRE>
        !          4926: <BLOCKQUOTE class="example">
        !          4927: <P>
        !          4928: <STRONG>Example:</STRONG></P>
        !          4929: <P>
        !          4930: Suppose the structure schema defines a logical attribute
        !          4931: called<TT>New</TT>which is used to identify the passages in a document which
        !          4932: wererecently modified.  It would be nice to have the presentation schemamake a
        !          4933: bar appear in the left margin next to each passage having
        !          4934: the<TT>New</TT>attribute.  A new passage can be an entire element, such asa
        !          4935: paragraph or section, or it can be some words in the middle of aparagraph.  To
        !          4936: produce the desired effect, the <TT>New</TT>attribute isgiven a creation rule
        !          4937: which generates a <TT>VerticalBar</TT>presentationbox.</P>
        !          4938: <P>
        !          4939: When the <TT>New</TT> attribute is attached to a character string which is
        !          4940: inside a line broken element (inside a paragraph, for example), the bar is one
        !          4941: of the elements which participates in line breaking and it is placed normally
        !          4942: in the current line, at the end of the character string which has the
        !          4943: attribute.  To avoid this, the <TT>InLine</TT> rule is used in the following
        !          4944: way:</P>
        !          4945: <PRE>
        !          4946: BOXES
        !          4947:   VerticalBar:
        !          4948:      BEGIN
        !          4949:      Content: Graphics 'l';
        !          4950:      HorizPos: Left = Root . Left;
        !          4951:      VertPos: Top = Creator . Top;
        !          4952:      Height: Bottom = Creator . Bottom;
        !          4953:      Width: 1 pt;
        !          4954:      InLine: No;
        !          4955:      ...
        !          4956:      END;
        !          4957: ...
        !          4958: ATTRIBUTES
        !          4959:   Nouveau:
        !          4960:      BEGIN
        !          4961:      CreateAfter(VerticalBar);
        !          4962:      END;
        !          4963: </PRE>
        !          4964: </BLOCKQUOTE>
        !          4965: </DIV>
        !          4966: </DIV>
        !          4967: 
        !          4968: <DIV class="subsection">
        !          4969: <H3><A name="breakcond">Page breaking and line breaking conditions</A></H3>
        !          4970: 
        !          4971: <P>
        !          4972: Pages are constructed by the editor in accordance with the model specified by
        !          4973: a <A href="#page"><TT>Page</TT> rule</A>.  The page model describes only the
        !          4974: composition of the pages but does not give any rules for breaking different
        !          4975: element types across pages.  Now, it is possible that certain elements must
        !          4976: not be cut by page breaks, while others can be cut anywhere. The
        !          4977: <TT>PageBreak</TT>, <TT>NoBreak1</TT>, and <TT>NoBreak2</TT> rules are used to
        !          4978: specify the conditions under which each element type can be cut.</P>
        !          4979: <P>
        !          4980: The <TT>PageBreak</TT> rule is used to indicate whether or not the box can be
        !          4981: cut during the construction of pages.  If cutting is authorized, the box can
        !          4982: be cut, with one part appearing at the bottom of a page and the other part
        !          4983: appearing at the top of the next page. The rule is formed by the
        !          4984: <TT>PageBreak</TT> keyword followed by a colon and a constant boolean value
        !          4985: (<TT>Yes</TT> or <TT>No</TT>).  This is the only form possible: this rule
        !          4986: cannot be inherited.  Moreover, it can only appear in the rules of the primary
        !          4987: view and applies to all views defined in the presentation schema.</P>
        !          4988: <P>
        !          4989: Whether objects can be cut by line breaks can be controlled in a similar way
        !          4990: using the <TT>LineBreak</TT> rule.  This rule allows the specification of
        !          4991: whether or not the box can be cut during the construction of lines.  If
        !          4992: cutting is authorized, the box can be cut, with one part appearing at the end
        !          4993: of a line and the other part appearing at the beginning of the next line.  The
        !          4994: rule is formed by the <TT>LineBreak</TT> keyword followed by a colon and a
        !          4995: constant boolean value (<TT>Yes</TT> or <TT>No</TT>).  This is the only form
        !          4996: possible: this rule cannot be inherited.  Moreover, it can only appear in the
        !          4997: rules of the primary view and applies to all views defined in the presentation
        !          4998: schema.</P>
        !          4999: <PRE>
        !          5000:                'PageBreak' ':' Boolean .
        !          5001:                'LineBreak' ':' Boolean .
        !          5002:      Boolean = 'Yes' / 'No' .
        !          5003: </PRE>
        !          5004: <P>
        !          5005: When a box can be cut by a page break, it is possible that a page break will
        !          5006: fall an inappropriate spot, creating, for example, a widow or orphan, or
        !          5007: separating the title of a section from the first paragraph of the section. The
        !          5008: <TT>NoBreak1</TT> and <TT>NoBreak2</TT> rules are used to avoid this. They
        !          5009: specify that the box of the element type to which they apply cannot be cut
        !          5010: within a certain zone above (<TT>NoBreak1</TT> rule) or below
        !          5011: (<TT>NoBreak2</TT> rule).  These two rules specify the height of the zones in
        !          5012: which page breaks are prohibited.</P>
        !          5013: <P>
        !          5014: The <TT>NoBreak1</TT> and <TT>NoBreak2</TT> rules give the height of the zone
        !          5015: in which page breaking is prohibited.  The height is given as a constant value
        !          5016: using any of the <A href="#distunits">available units</A>, absolute or
        !          5017: relative.  The value may not be inherited.</P>
        !          5018: <PRE>
        !          5019:                    'NoBreak1' ':' AbsDist .
        !          5020:                    'NoBreak2' ':' AbsDist .
        !          5021: </PRE>
        !          5022: <BLOCKQUOTE class="example">
        !          5023: <P>
        !          5024: <STRONG>Example:</STRONG></P>
        !          5025: <P>
        !          5026: The following rules  prevent widows and orphans in a paragraph:</P>
        !          5027: <PRE>
        !          5028: Paragraph :
        !          5029:    BEGIN
        !          5030:    NoBreak1 : 2;
        !          5031:    NoBreak2 : 2;
        !          5032:    END;
        !          5033: </PRE>
        !          5034: <P>
        !          5035: This rule prevents a section title from becoming separated from thefirst
        !          5036: paragraph of the section by prohibiting page breaks at thebeginning of the
        !          5037: section rule:</P>
        !          5038: <PRE>
        !          5039: Section :
        !          5040:    NoBreak1 : 1.5 cm;
        !          5041: </PRE>
        !          5042: <P>
        !          5043: Finally, this rule prevents a figure from being page broken in any way:</P>
        !          5044: <PRE>
        !          5045: Figure :
        !          5046:    PageBreak : No;
        !          5047: </PRE>
        !          5048: </BLOCKQUOTE>
        !          5049: <P>
        !          5050: The Thot editor constructs the document images displayed on the screen
        !          5051: dynamically.  As the user moves in the document or makes the document scroll
        !          5052: in a window, the editor constructs the image to be displayed in little bits,
        !          5053: filling the gaps which are produced in the course of these operations.  It
        !          5054: stops filling in the image when an element reaches the edge of the window in
        !          5055: which the gap appears.  If the appearance of the document is complex, it is
        !          5056: possible that the image in incomplete, even though the edge of the window was
        !          5057: reached.  For example, an element might need to be presented to the side of
        !          5058: the last element displayed, but its image was not constructed.  The user will
        !          5059: not know whether the element is really absent or if its image has simply not
        !          5060: been constructed.</P>
        !          5061: <P>
        !          5062: The <TT>Gather</TT> rule is used to remedy this problem.  When the rule
        !          5063: <TT>Gather : Yes;</TT> is associated with an element type, the image of such
        !          5064: elements is constructed as a block by the editor: it is never split up.</P>
        !          5065: <P>
        !          5066: The <TT>Gather</TT> rule may not appear in the <A
        !          5067: href="#defaultpresrules">default rules</A>.  Elements which do not have the
        !          5068: <TT>Gather</TT> rule are considered susceptible to being split up during
        !          5069: display.  Thus, it is not necessary to use the <TT>Gather : No;</TT> form.
        !          5070: This rule must be used prudently and only for those elements which truly need
        !          5071: it.  If used incorrectly, it can pointlessly increase the size of the image
        !          5072: constructed by the editor and lead to excessive memory consumption by the
        !          5073: editor.</P>
        !          5074: <P>
        !          5075: Like the <TT>PageBreak</TT> and <TT>LineBreak</TT> rules, the <TT>Gather</TT>
        !          5076: rule can only appear in rules of the primary view and applies to all views
        !          5077: defined in the presentation schema.</P>
        !          5078: <PRE>
        !          5079:                    'Gather' ':' Boolean .
        !          5080: </PRE>
        !          5081: </DIV>
        !          5082: 
        !          5083: <DIV class="subsection">
        !          5084: <H3><A name="visib">Visibility</A></H3>
        !          5085: 
        !          5086: <P>
        !          5087: The visibility parameter is used to control which elements should or should
        !          5088: not be displayed, based on context.  An element can have different
        !          5089: visibilities in different views.  If an element's visibility is zero for a
        !          5090: view, that element is not displayed in that view and does not occupy any space
        !          5091: (its extents are zero).</P>
        !          5092: <P>
        !          5093: Visibility takes non-negative integer values (positive or zero).  If values
        !          5094: greater than 1 are used, they allow the user to choose a degree of visibility
        !          5095: and, thus, to see only those boxes whose visibility parameter exceeds a
        !          5096: certain threshold.  This gives the user control over the granularity of the
        !          5097: displayed images.</P>
        !          5098: <P>
        !          5099: The visibility parameter can be defined as a constant or by inheritance. If
        !          5100: defined by inheritance, it cannot be based on the value of the next or
        !          5101: previous box.  Visibility can only be inherited from above.</P>
        !          5102: <P>
        !          5103: If it is a numeric attribute's presentation rule, the visibility can be
        !          5104: specified by the attribute's name, in which case the value of the attribute is
        !          5105: used.</P>
        !          5106: <PRE>
        !          5107:                   'Visibility' ':' NumberInherit
        !          5108:      NumberInherit = Integer / AttrID / Inheritance .
        !          5109:      Integer      = NUMBER .
        !          5110: </PRE>
        !          5111: <BLOCKQUOTE class="example">
        !          5112: <P>
        !          5113: <STRONG>Example:</STRONG></P>
        !          5114: <P>
        !          5115: Suppose that only <TT>Formula</TT>elements should be displayed in
        !          5116: the<TT>MathView</TT>view.  Then, the default rules should include:</P>
        !          5117: <PRE>
        !          5118: DEFAULT
        !          5119:      IN MathView Visibility:0;
        !          5120: </PRE>
        !          5121: <P>
        !          5122: which makes all elements invisible in the <TT>MathView</TT>view.However, the
        !          5123: <TT>Formula</TT>element also has a <TT>Visibility</TT>rule:</P>
        !          5124: <PRE>
        !          5125: Formula :
        !          5126:      IN MathView Visibility:5;
        !          5127: </PRE>
        !          5128: <P>
        !          5129: which makes formulas, and only formulas, visible.</P>
        !          5130: </BLOCKQUOTE>
        !          5131: </DIV>
        !          5132: 
        !          5133: <DIV class="subsection">
        !          5134: <H3>Character style parameters</H3>
        !          5135: 
        !          5136: <P>
        !          5137: Four parameters are used to determine which characters are used to display
        !          5138: text.  They are size, font, style, and underlining.</P>
        !          5139: 
        !          5140: <DIV class="subsubsection">
        !          5141: <H4>Character size</H4>
        !          5142: 
        !          5143: <P>
        !          5144: The size parameter has two effects.  First, it is used to specify the actual
        !          5145: size and distance units for boxes defined in <A href="#distunits">relative
        !          5146: units</A>.  Second, it defines the size of the characters contained in the
        !          5147: box.</P>
        !          5148: <P>
        !          5149: As a distance or length, the size can be expressed in abstract or absolute
        !          5150: units.  It can also be inherited.  If it is not inherited, it is expressed
        !          5151: simply as an integer followed by the <TT>pt</TT> keyword, which indicates that
        !          5152: the size is expressed in typographer's points. The absence of the <TT>pt</TT>
        !          5153: keyword indicates that it is in abstract units in which the value 1 represents
        !          5154: the smallest size while the value 16 is the largest size.  The relationship
        !          5155: between these abstract sizes and the real character sizes is controlled by a
        !          5156: table which can be modified statically or even dynamically during the
        !          5157: execution of the Thot editor.</P>
        !          5158: <P>
        !          5159: If it is a numeric attribute's presentation rule, the value of the size
        !          5160: parameter can be specified by the attribute's name, in which case the value of
        !          5161: the attribute is used.</P>
        !          5162: <P>
        !          5163: <STRONG>Note:</STRONG> the only unit available for  defining an absolute size
        !          5164: is the typographer's point.  Centimeters and inches may not be used.</P>
        !          5165: <P>
        !          5166: If the size is inherited, the rule must specify the relative from which to
        !          5167: inherit and any difference from that relative's value.  The difference can be
        !          5168: expressed in either typographer's points or in abstract units.  The maximum or
        !          5169: minimum size can also be specified, but without specifying the type of unit:
        !          5170: it is the same as was specified for the difference.</P>
        !          5171: <P>
        !          5172: In a numeric attribute's presentation rule, the difference in size can be
        !          5173: indicated by the attribute's name, which means that the attribute's value
        !          5174: should be used as the difference.  The attribute can also be used as the
        !          5175: minimum or maximum size.</P>
        !          5176: <PRE>
        !          5177:                     'Size' ':' SizeInherit
        !          5178:      SizeInherit   = SizeAttr [ 'pt' ] /
        !          5179:                      Kinship InheritedSize .
        !          5180:      InheritedSize ='+' SizeAttr [ 'pt' ]
        !          5181:                      [ 'Max' MaxSizeAttr ] /
        !          5182:                     '-' SizeAttr [ 'pt' ]
        !          5183:                      [ 'Min' MinSizeAttr ] /
        !          5184:                     '=' .
        !          5185:      SizeAttr       = Size / AttrID .
        !          5186:      Size        = NUMBER .
        !          5187:      MaxSizeAttr    = MaxSize / AttrID .
        !          5188:      MaxSize     = NUMBER .
        !          5189:      MinSizeAttr    = MinSize / AttrID .
        !          5190:      MinSize     = NUMBER .
        !          5191: </PRE>
        !          5192: <BLOCKQUOTE class="example">
        !          5193: <P>
        !          5194: <STRONG>Example:</STRONG></P>
        !          5195: <P>
        !          5196: The rule</P>
        !          5197: <PRE>
        !          5198: Size : Enclosing - 2 pt Min 7;
        !          5199: </PRE>
        !          5200: <P>
        !          5201: states that the character size is 2 points less than that of theenclosing box,
        !          5202: but that it may not be less than 7 points, whatever theenclosing box's
        !          5203: value.</P>
        !          5204: <P>
        !          5205: The following rules make the text of a report be displayed with medium-sized
        !          5206: characters (for example, size 5), while the title is displayed with larger
        !          5207: characters and the summary is displayed with smaller characters:</P>
        !          5208: <PRE>
        !          5209: Report :
        !          5210:      Size : 5;
        !          5211: Title :
        !          5212:      Size : Enclosing + 2;
        !          5213: Summary :
        !          5214:      Size : Enclosing - 1;
        !          5215: </PRE>
        !          5216: <P>
        !          5217: Thus, the character sizes in the entire document can be changed bychanging the
        !          5218: size parameter of the Report element, while preservingthe relationships
        !          5219: between the sizes of the different elements.</P>
        !          5220: </BLOCKQUOTE>
        !          5221: </DIV>
        !          5222: 
        !          5223: <DIV class="subsubsection">
        !          5224: <H4><A name="style">Font and character style</A></H4>
        !          5225: 
        !          5226: <P>
        !          5227: The <TT>Font</TT> rule determines the font family to be used to display the
        !          5228: characters contained in the box, while the <TT>Style</TT> rule determines
        !          5229: their style.  Thot recognizes three character fonts (Times, Helvetica, and
        !          5230: Courier) and six styles: Roman, Italics, Bold, BoldItalics, Oblique, and
        !          5231: BoldOblique.</P>
        !          5232: <P>
        !          5233: The font family and style can specified by a named constant or can be
        !          5234: inherited.  For the name of the font family only the first character is
        !          5235: used.</P>
        !          5236: <P>
        !          5237: Only identical inheritance is allowed: the box takes the same font or style as
        !          5238: the box from which it inherits.  This is indicated by an equals sign after the
        !          5239: kinship specification.</P>
        !          5240: <BLOCKQUOTE class="example">
        !          5241: <P>
        !          5242: <STRONG>Example:</STRONG></P>
        !          5243: <P>
        !          5244: To specify that the summary uses the font family of the rest of thedocument,
        !          5245: but in the italic style, the following rules are used:</P>
        !          5246: <PRE>
        !          5247: Summary :
        !          5248:    BEGIN
        !          5249:    Font : Enclosing =;
        !          5250:    Style : Italics;
        !          5251:    END;
        !          5252: </PRE>
        !          5253: </BLOCKQUOTE>
        !          5254: </DIV>
        !          5255: 
        !          5256: <DIV class="subsubsection">
        !          5257: <H4><A name="underline">Underlining</A></H4>
        !          5258: 
        !          5259: <P>
        !          5260: The <TT>Underline</TT> rule is used to specify if the characters contained in
        !          5261: a box should have lines drawn on or near them.  There are four underlining
        !          5262: styles: <TT>Underlined</TT>, <TT>Overlined</TT>, <TT>CrossedOut</TT>, and
        !          5263: <TT>NoUnderline</TT>.  The <TT>Thickness</TT> rule specifies the thickness of
        !          5264: the line, <TT>Thin</TT> or <TT>Thick</TT>.</P>
        !          5265: <P>
        !          5266: As with font family and style, only identical inheritance is allowed: the box
        !          5267: has the same underlining type as the box from which it inherits the value.
        !          5268: This is indicated by an equals sign after the kinship specification.</P>
        !          5269: <PRE>
        !          5270:                    'Underline' ':' UnderLineInherit /
        !          5271:                    'Thickness' ':' ThicknessInherit /
        !          5272: 
        !          5273: UnderLineInherit = Kinship '=' / 'NoUnderline' /
        !          5274:                    'Underlined' / 
        !          5275:                    'Overlined' / 'CrossedOut' .
        !          5276: ThicknessInherit = Kinship '=' / 'Thick' / 'Thin' .
        !          5277: </PRE>
        !          5278: </DIV>
        !          5279: </DIV>
        !          5280: 
        !          5281: <DIV class="subsection">
        !          5282: <H3>Stacking order</H3>
        !          5283: 
        !          5284: <P>
        !          5285: The <TT>Depth</TT> rule is used to define the stacking order of terminal boxes
        !          5286: when multiple boxes at least partially overlap.  This rule defines how the
        !          5287: depth parameter, which is zero or a positive integer, is calculated.  The
        !          5288: depth parameter has a value for all boxes.  For terminal boxes in the
        !          5289: structure and for presentation boxes, the depth value is used during display
        !          5290: and printing: the boxes with the lowest value overlap those with higher
        !          5291: depths.  For non-terminal boxes, the depth is not interpreted during display,
        !          5292: but it is used to calculate the depth of terminal boxes by inheritance.</P>
        !          5293: <P>
        !          5294: Like most other rules, the depth rule is defined in the <A
        !          5295: href="#defaultpresrules">default rules</A> of each presentation schema.  Thus,
        !          5296: there is always a depth value, even when it is not necessary because there is
        !          5297: no overlapping.  To avoid useless operations, a zero value can be given to the
        !          5298: depth parameter, which signifies that overlapping is never a problem.</P>
        !          5299: <P>
        !          5300: The depth rule has the same form as the <A href="#visib">visibility rule</A>.
        !          5301: It can be defined by inheritance or by a constant numeric value. When the rule
        !          5302: is attached to a numeric attribute, it can take the value of that
        !          5303: attribute.</P>
        !          5304: <PRE>
        !          5305:                 'Depth' ':' NumberInherit
        !          5306: </PRE>
        !          5307: <BLOCKQUOTE class="example">
        !          5308: <P>
        !          5309: <STRONG>Example:</STRONG></P>
        !          5310: <P>
        !          5311: For a purely textual document, in which overlapping never poses aproblem, a
        !          5312: single default <TT>Depth</TT>rule in the presentation schemais sufficient:</P>
        !          5313: <PRE>
        !          5314: DEFAULT
        !          5315:     Depth : 0;
        !          5316:     ...
        !          5317: </PRE>
        !          5318: <P>
        !          5319: To make the text of examples appear on a light blue background, a presentation
        !          5320: box is defined:</P>
        !          5321: <PRE>
        !          5322: BOXES
        !          5323:    BlueBG :
        !          5324:       BEGIN
        !          5325:       Content : Graphics 'R';
        !          5326:       Background : LightBlue3;
        !          5327:       FillPattern: backgroundcolor;
        !          5328:       Depth : 2;
        !          5329:       ...
        !          5330:       END;
        !          5331: </PRE>
        !          5332: <P>
        !          5333: and is created by the <TT>Example</TT>element, which has the rules:</P>
        !          5334: <PRE>
        !          5335: RULES
        !          5336:    Example :
        !          5337:       BEGIN
        !          5338:       CreateFirst (BlueBG);
        !          5339:       Depth : 1;
        !          5340:       ...
        !          5341:       END;
        !          5342: </PRE>
        !          5343: <P>
        !          5344: In this way, the text of an example (if it inherits its depth from
        !          5345: itsancestor) will be superimposed on a light blue background, and not
        !          5346: thereverse).</P>
        !          5347: </BLOCKQUOTE>
        !          5348: </DIV>
        !          5349: 
        !          5350: <DIV class="subsection">
        !          5351: <H3>Line Style</H3>
        !          5352: 
        !          5353: <P>
        !          5354: The <TT>LineStyle</TT> rule determines the style of line which should be used
        !          5355: to draw all the elements contained in the box.  The line style can be
        !          5356: indicated by a name (<TT>Solid</TT>, <TT>Dashed</TT>, <TT>Dotted</TT>) or it
        !          5357: can be inherited.  Only elements of the graphic base type are affected by this
        !          5358: rule, but it can be attached to any box and transmitted by inheritance to the
        !          5359: graphic elements.</P>
        !          5360: <P>
        !          5361: Only identical inheritance is allowed: the box takes the same line style as
        !          5362: the box from which it inherits.  This is indicated by an equals sign after the
        !          5363: kinship specification.</P>
        !          5364: <PRE>
        !          5365:                       'LineStyle' ':' LineStyleInherit
        !          5366:      LineStyleInherit = Kinship '=' /
        !          5367:                       'Solid' / 'Dashed' / 'Dotted' .
        !          5368: </PRE>
        !          5369: <BLOCKQUOTE class="example">
        !          5370: <P>
        !          5371: <STRONG>Example:</STRONG></P>
        !          5372: <P>
        !          5373: To specify that, in Figures, the graphical parts should bedrawn in solid
        !          5374: lines, the Figure element is given a rule using the<TT>Solid</TT>name:</P>
        !          5375: <PRE>
        !          5376: Figure :
        !          5377:    LineStyle : Solid;
        !          5378: </PRE>
        !          5379: <P>
        !          5380: and the elements composing figures are given an inheritance rule:</P>
        !          5381: <PRE>
        !          5382:    LineStyle : Enclosing =;
        !          5383: </PRE>
        !          5384: </BLOCKQUOTE>
        !          5385: </DIV>
        !          5386: 
        !          5387: <DIV class="subsection">
        !          5388: <H3>Line thickness</H3>
        !          5389: 
        !          5390: <P>
        !          5391: The <TT>LineWeight</TT> rule determines the thickness of the lines  of all
        !          5392: graphical elements which appear in the box, no matter what their line style.
        !          5393: Line thickness can be specified by a constant value or by inheritance.  A
        !          5394: constant value is a positive number followed by an optional unit specification
        !          5395: (which is absent when using relative units).  All available <A
        !          5396: href="#distunits">distance units</A> can be used.  Line thickness is expressed
        !          5397: in the same way as <A href="#linespacing">line spacing</A>.</P>
        !          5398: <PRE>
        !          5399:                  'LineWeight' ':' DistOrInherit
        !          5400: </PRE>
        !          5401: <P>
        !          5402: Only elements of the graphic base type are affected by this rule, but it can
        !          5403: be attached to any box and transmitted by inheritance to the graphic
        !          5404: elements.</P>
        !          5405: <BLOCKQUOTE class="example">
        !          5406: <P>
        !          5407: <STRONG>Example:</STRONG></P>
        !          5408: <P>
        !          5409: To specify that, in Figures, the graphical parts should be drawn withlines 0.3
        !          5410: pt thick, the Figure element is given this rule:</P>
        !          5411: <PRE>
        !          5412: Figure :
        !          5413:    LineWeight : 0.3 pt;
        !          5414: </PRE>
        !          5415: <P>
        !          5416: and the elements composing figures are given an inheritance rule:</P>
        !          5417: <PRE>
        !          5418:    LineWeight : Enclosing =;
        !          5419: </PRE>
        !          5420: </BLOCKQUOTE>
        !          5421: </DIV>
        !          5422: 
        !          5423: <DIV class="subsection">
        !          5424: <H3><A name="pattern">Fill pattern</A></H3>
        !          5425: 
        !          5426: <P>
        !          5427: The <TT>FillPattern</TT> rule determines the pattern used to fill closed
        !          5428: graphical elements (circles, rectangles, etc.) which appear in the box.  This
        !          5429: pattern can be indicated by a named constant or by inheritance.  The named
        !          5430: constant identifies one of the patterns available in Thot.  The names of the
        !          5431: available patterns are: nopattern, foregroundcolor, backgroundcolor, gray1,
        !          5432: gray2, gray3, gray4, gray5, gray6, gray7, horiz1, horiz2, horiz3, vert1,
        !          5433: vert2, vert3, left1, left2, left3, right1, right2, right3, square1, square2,
        !          5434: square3, lozenge, brick, tile, sea, basket.</P>
        !          5435: <P>
        !          5436: Like the other rules peculiar to graphics, <TT>LineStyle</TT> and
        !          5437: <TT>LineWeight</TT>, only elements of the graphic base type are affected by
        !          5438: the <TT>FillPattern</TT> rule, but the rule can be attached to any box and
        !          5439: transmitted by inheritance to the graphic elements.  As with the other rules
        !          5440: specific to graphics, only identical inheritance is allowed.</P>
        !          5441: <P>
        !          5442: The <TT>FillPattern</TT> rule can also be used to determine whether or not
        !          5443: text characters, symbols and bitmaps should be colored.  For these element
        !          5444: types (test, symbols, and images), the only valid values are nopattern,
        !          5445: foregroundcolor, and backgroundcolor.  When <TT>FillPattern</TT> has the value
        !          5446: <TT>backgroundcolor</TT>, text characters, symbols, and bitmaps are given the
        !          5447: color specified by the <A href="#colors"><TT>Background</TT> rule</A> which
        !          5448: applies to these elements.  When <TT>FillPattern</TT> has the value
        !          5449: <TT>foregroundcolor</TT>, these same elements are given the color specified by
        !          5450: the <A href="#colors"><TT>Foreground</TT> rule</A> which applies to these
        !          5451: elements.  In all other case, text characters are not colored.</P>
        !          5452: <PRE>
        !          5453:                  'FillPattern' ':' NameInherit
        !          5454: </PRE>
        !          5455: <BLOCKQUOTE class="example">
        !          5456: <P>
        !          5457: <STRONG>Example:</STRONG></P>
        !          5458: <P>
        !          5459: To specify that, in Figures, the closed graphical elements should befilled
        !          5460: with a pattern resembling a brick wall, the Figure element isgiven this
        !          5461: rule:</P>
        !          5462: <PRE>
        !          5463: Figure :
        !          5464:    FillPattern : brick;
        !          5465: </PRE>
        !          5466: <P>
        !          5467: and the elements composing figures are given an inheritance rule:</P>
        !          5468: <PRE>
        !          5469:    FillPattern : Enclosing =;
        !          5470: </PRE>
        !          5471: </BLOCKQUOTE>
        !          5472: </DIV>
        !          5473: 
        !          5474: <DIV class="subsection">
        !          5475: <H3><A name="colors">Colors</A></H3>
        !          5476: 
        !          5477: <P>
        !          5478: The <TT>Foreground</TT> and <TT>Background</TT> rules determine the foreground
        !          5479: and background colors of the base elements which appear in the box. These
        !          5480: colors cancan be specified with a named constant or by inheritance. The named
        !          5481: constants specify one of the available colors in Thot.  The available color
        !          5482: names can be found in the file <TT>thot.color</TT>.</P>
        !          5483: <P>
        !          5484: In contrast to the preceding rules, the color rules affect all base elements
        !          5485: the same way, no matter what their type (text, graphics, images, symbols), but
        !          5486: they only affect base elements.  The color rules can nevertheless be
        !          5487: associated with any box and can be transmitted to the base elements by
        !          5488: inheritance.  Like the preceding rules, only inheritance of the same value is
        !          5489: allowed.</P>
        !          5490: <PRE>
        !          5491:                  'Foreground' ':' NameInherit
        !          5492:                  'Background' ':' NameInherit
        !          5493: </PRE>
        !          5494: <P>
        !          5495: <STRONG>Note:</STRONG> text colors only appear for text elements whose <A
        !          5496: href="#pattern">fill pattern</A> does not prevent the use of color.</P>
        !          5497: <BLOCKQUOTE class="example">
        !          5498: <P>
        !          5499: <STRONG>Example:</STRONG></P>
        !          5500: <P>
        !          5501: To specify that, in Figures, everything must be drawn in blue on abackground
        !          5502: of yellow, the Figure element isgiven these rules:</P>
        !          5503: <PRE>
        !          5504: Figure :
        !          5505:    BEGIN
        !          5506:    Foreground : Blue;
        !          5507:    Background : Yellow;
        !          5508:    Fillpattern : backgroundcolor;
        !          5509:    END;
        !          5510: </PRE>
        !          5511: <P>
        !          5512: and the elements composing figures are given inheritance rules:</P>
        !          5513: <PRE>
        !          5514:    Foreground : Enclosing =;
        !          5515:    Background : Enclosing =;
        !          5516:    FillPattern : Enclosing =;
        !          5517: </PRE>
        !          5518: </BLOCKQUOTE>
        !          5519: </DIV>
        !          5520: 
        !          5521: <DIV class="subsection">
        !          5522: <H3><A name="content">Presentation box content</A></H3>
        !          5523: 
        !          5524: <P>
        !          5525: The <TT>Content</TT> rule applies to presentation boxes.  It indicates the
        !          5526: content given to a box.  This content is either a variable's value or a
        !          5527: constant value.  In the special case of <A href="#page">header or footer
        !          5528: boxes</A>, the content can also be a structured element type.</P>
        !          5529: <P>
        !          5530: If the content is a constant, it can be specified, as in a variable
        !          5531: declaration, either by the name of a constant declared in the <TT>CONST</TT>
        !          5532: section or by direct specification of the type and value of the box's
        !          5533: content.</P>
        !          5534: <P>
        !          5535: Similarly, if it is a variable, the name of a variable declared in
        !          5536: <TT>VAR</TT> section can be given or the variable may be defined within
        !          5537: parentheses.  The content inside the parentheses has the same syntax as a <A
        !          5538: href="#variables">variable declaration</A>.</P>
        !          5539: <P>
        !          5540: When the content is a structured element type, the name of the element type is
        !          5541: given after the colon.  In this case,  the box's content is all elements of
        !          5542: the named type which are designated by references which are part of the page
        !          5543: on which the header or footer with this <TT>Content</TT> rule appears.  Only
        !          5544: associated elements can appear in a <TT>Content</TT> rule and the structure
        !          5545: must provide references to these elements.  Moreover, the box whose content
        !          5546: they are must be a header or footer box generated by a page box of the primary
        !          5547: view.</P>
        !          5548: <PRE>
        !          5549:                'Content' ':' VarConst
        !          5550:      VarConst = ConstID / ConstType ConstValue /
        !          5551:                 VarID / '(' FunctionSeq ')' /
        !          5552:                 ElemID .
        !          5553: </PRE>
        !          5554: <P>
        !          5555: A presentation box can have only one <TT>Content</TT> rule, which means that
        !          5556: the content of a presentation box cannot vary from view to view. However, such
        !          5557: an effect can be achieved by creating several presentation boxes, each with
        !          5558: different content and visible in different views.</P>
        !          5559: <P>
        !          5560: The <TT>Content</TT> rule also applies to elements defined as references in
        !          5561: the structure schema.  In this case, the content defined by the rule  must be
        !          5562: a constant.  It is this content which appears on the screen or paper to
        !          5563: represent references of the type to which the rule applies.  A reference can
        !          5564: have a <TT>Content</TT> rule or a <A href="#copyrule"><TT>Copy</TT> rule</A>
        !          5565: for each view.  If neither of these rules appears, the reference is displayed
        !          5566: as <TT>[*]</TT>, which is equivalent to the rule:</P>
        !          5567: <PRE>
        !          5568:      Content: Text '[*]';
        !          5569: </PRE>
        !          5570: <BLOCKQUOTE class="example">
        !          5571: <P>
        !          5572: <STRONG>Example:</STRONG></P>
        !          5573: <P>
        !          5574: The content of the presentation box created to make the chapternumber and
        !          5575: section number appear before each section title can bedefined by:</P>
        !          5576: <PRE>
        !          5577: BOXES
        !          5578:      SectionNumBox :
        !          5579:           BEGIN
        !          5580:           Content : NumSection;
        !          5581:           ...
        !          5582:           END;
        !          5583: </PRE>
        !          5584: <P>
        !          5585: if the <TT>NumSection</TT>variable has been defined in the variabledefinition
        !          5586: section of the presentation schema.  Otherwise the<TT>Content</TT>would be
        !          5587: written:</P>
        !          5588: <PRE>
        !          5589: BOXES
        !          5590:      SectionNumBox :
        !          5591:           BEGIN
        !          5592:           Content : (VALUE (ChapterCtr, Roman) TEXT '.'
        !          5593:                      VALUE (SectionCtr, Arabic));
        !          5594:           ...
        !          5595:           END;
        !          5596: </PRE>
        !          5597: <P>
        !          5598: To specify that a page footer should contain all elements of the <TT>Note</TT>
        !          5599: type are referred to in the page, the following rule is written:</P>
        !          5600: <PRE>
        !          5601: BOXES
        !          5602:      NotesFooterBox :
        !          5603:           BEGIN
        !          5604:           Content : Note;
        !          5605:           ...
        !          5606:           END;
        !          5607: </PRE>
        !          5608: <P>
        !          5609: <TT>Note</TT>is defined as an associated element in the structure schemaand
        !          5610: NotesFooterBox is created by a page box of the primary view.</P>
        !          5611: </BLOCKQUOTE>
        !          5612: </DIV>
        !          5613: 
        !          5614: <DIV class="subsection">
        !          5615: <H3><A name="creation">Presentation box creation</A></H3>
        !          5616: 
        !          5617: <P>
        !          5618: A creation rule specifies that a presentation box should be created when an
        !          5619: element of the type to which the rule is attached appears in the document.</P>
        !          5620: <P>
        !          5621: A keyword specifies the position, relative to the creating box, at which the
        !          5622: created box will be placed in the structure:</P>
        !          5623: <DL>
        !          5624: <DT><TT>CreateFirst</TT></DT>
        !          5625: <DD>specifies that the box should be created asthe first box of the next lower
        !          5626: level, before any already existingboxes, and only if the beginning of the
        !          5627: creating element is visible;
        !          5628: </DD>
        !          5629: <DT><TT>CreateLast</TT></DT>
        !          5630: <DD>specifies that the box should be created asthe last box of the next lower
        !          5631: level, after any existing boxes, andonly if the end of the creating element is
        !          5632: visible;
        !          5633: </DD>
        !          5634: <DT><TT>CreateBefore</TT></DT>
        !          5635: <DD>specifies that the box should be createdbefore the creating box, on the
        !          5636: same level as the creating box, andonly if the beginning of the creating
        !          5637: element is visible;
        !          5638: </DD>
        !          5639: <DT><TT>CreateAfter</TT></DT>
        !          5640: <DD>specifies that the box should be createdafter the creating box, on the
        !          5641: same level as the creating box, andonly if the beginning of the creating
        !          5642: element is visible;
        !          5643: </DD>
        !          5644: <DT><TT>CreateEnclosing</TT></DT>
        !          5645: <DD>specifies that the box should be createdat the upper level relatively to
        !          5646: the creating box, and that it mustcontain that creating box and all
        !          5647: presentation boxes created by thesame creating box.
        !          5648: </DD>
        !          5649: </DL>
        !          5650: <P>
        !          5651: This keyword can be followed by the <TT>Repeated</TT> keyword to indicate that
        !          5652: the box must be created for each part of the creating element. These parts
        !          5653: result from the division of the element by page breaks or column changes.  If
        !          5654: the <TT>Repeated</TT> keyword is missing, the box is only created for the
        !          5655: first part of the creating element (<TT>CreateFirst</TT> and
        !          5656: <TT>CreateBefore</TT> rules) or for the last part (<TT>CreateLast</TT> and
        !          5657: <TT>CreateAfter</TT> rules).</P>
        !          5658: <P>
        !          5659: The type of presentation to be created is specified at the end of the rule
        !          5660: between parentheses.</P>
        !          5661: <P>
        !          5662: Creation rules cannot appear in the <A href="#defaultpresrules">default
        !          5663: presentation rules</A>.  The boxes being created should have a
        !          5664: <TT>Content</TT> rule which indicates their <A
        !          5665: href="#content">content</A>.</P>
        !          5666: <P>
        !          5667: Creation rules can only appear in the block of rules for the primary view;
        !          5668: creation is provoked by a document element for all views. However, for each
        !          5669: view, the presentation box is only created if the creating element is itself a
        !          5670: box in the view. Moreover, the visibility parameter of the presentation box
        !          5671: can be adjusted to control the creation of the box on a view-by-view
        !          5672: basis.</P>
        !          5673: <PRE>
        !          5674:                      Creation '(' BoxID ')'
        !          5675:      Creation      = Create [ 'Repeated' ] .
        !          5676:      Create        ='CreateFirst' / 'CreateLast' /
        !          5677:                     'CreateBefore' / 'CreateAfter' /
        !          5678:                     'CreateEnclosing' .
        !          5679: </PRE>
        !          5680: <BLOCKQUOTE class="example">
        !          5681: <P>
        !          5682: <STRONG>Example:</STRONG></P>
        !          5683: <P>
        !          5684: Let us define an object type, called Table, which is composed of asequence of
        !          5685: columns, all having the same fixed width, where thecolumns are separated by
        !          5686: vertical lines.  There is a line to the leftof the first column and one to the
        !          5687: right of the last.  Each column hasa variable number of cells, placed one on
        !          5688: top of the other andseparated by horizontal lines.  There are no horizontal
        !          5689: lines abovethe first cell or below the last cell.  The text contained in
        !          5690: eachcell is  broken into lines and these lines are centered horizontallyin the
        !          5691: cell. The logical structure of this object is defined by:</P>
        !          5692: <PRE>
        !          5693: Table   = LIST OF (Column);
        !          5694: Column  = LIST OF (Cell = Text);
        !          5695: </PRE>
        !          5696: 
        !          5697: <DIV class="figure">
        !          5698: <HR>
        !          5699: <PRE>
        !          5700: |                |                |               |
        !          5701: |  xx xxxx xxxx  |x xxxx xxx xxxxx|  x xxx x xxx  |
        !          5702: | xxx xxx xxxx x |   x xx x xxx   | xxxxx xxxx xx |
        !          5703: |   xxxxx xxxx   |----------------|  xxx xxxxx x  |
        !          5704: | xxxxx xxx xxxx | xxxx xx xx xxx |     xx xx     |
        !          5705: | xxx xxxx x xxx |  xxxx x xxx x  |---------------|
        !          5706: |----------------| xxx xxxx xxxxx |  xxxxx xxxxx  |
        !          5707: | xxx xxx xxxxxx |----------------| xxx xxxx xxxx |
        !          5708: |  xxxx xxxx xx  |  xxxx xx x xx  |  xxx xx x xx  |
        !          5709: |----------------| xxx xxxxx xxxx | xxxx xxxx xxx |
        !          5710: | xxxxx xxx xxxx |  xxxx xx x xx  |   xxxxx xxx   |
        !          5711: |xxxx xx x xxxxxx| xxxx xx xxxxxx |  xxxxx xxxxx  |
        !          5712: </PRE>
        !          5713: <P align=center>
        !          5714: <EM><A name="table">The design of a table</A></EM></P>
        !          5715: <HR>
        !          5716: </DIV>
        !          5717: <P>
        !          5718: The presentation of the table should resemble the design of the above <A
        !          5719: href="#table">figure</A>.  It is defined by the following presentation schema
        !          5720: fragment:</P>
        !          5721: <PRE>
        !          5722: BOXES
        !          5723:      VertLine : BEGIN
        !          5724:                 Width : 0.3 cm;
        !          5725:                 Height : Enclosing . Height;
        !          5726:                 VertPos : Top = Enclosing . Top;
        !          5727:                 HorizPos : Left = Previous . Right;
        !          5728:                 Content : Graphics 'v';
        !          5729:                 END;
        !          5730: 
        !          5731:      HorizLine: BEGIN
        !          5732:                 Width : Enclosing . Width;
        !          5733:                 Height : 0.3 cm;
        !          5734:                 VertPos : Top = Previous . Bottom;
        !          5735:                 HorizPos : Left = Enclosing . Left;
        !          5736:                 Content : Graphics 'h';
        !          5737:                 END;
        !          5738: 
        !          5739: RULES
        !          5740:      Column  : BEGIN
        !          5741:                CreateBefore (VertLine);
        !          5742:                IF LAST CreateAfter (VertLine);
        !          5743:                Width : 2.8 cm;
        !          5744:                Height : Enclosed . Height;
        !          5745:                VertPos : Top = Enclosing . Top;
        !          5746:                HorizPos : Left = Previous . Right;
        !          5747:                END;
        !          5748: 
        !          5749:      Cell    : BEGIN
        !          5750:                IF NOT FIRST CreateBefore (HorizLine);
        !          5751:                Width : Enclosing . Width;
        !          5752:                Height : Enclosed . Height;
        !          5753:                VertPos : Top = Previous . Bottom;
        !          5754:                HorizPos : Left = Enclosing . Left;
        !          5755:                Line;
        !          5756:                Adjust : VMiddle;
        !          5757:                END;
        !          5758: </PRE>
        !          5759: <P>
        !          5760: It is useful to note that the horizontal position rule of the first vertical
        !          5761: line will not be applied, since there is no preceding box. In this case, the
        !          5762: box is simply placed on the left side of the enclosing box.</P>
        !          5763: </BLOCKQUOTE>
        !          5764: </DIV>
        !          5765: 
        !          5766: <DIV class="subsection">
        !          5767: <H3><A name="page">Page layout</A></H3>
        !          5768: 
        !          5769: <P>
        !          5770: The page models specified in the <TT>Page</TT> rule are defined by boxes
        !          5771: declared in the <TT>BOXES</TT> section of the presentation schema.  Pages are
        !          5772: not described as frames which will be filled by the document's text, but as
        !          5773: element are inserted in the flow of the document and which mark the page
        !          5774: breaks.  Each of these page break elements contains presentation boxes which
        !          5775: represent the footer boxes of a page followed by header boxes of the next
        !          5776: page.  The page box itself is the simple line which separates two pages on the
        !          5777: screen.  Both the footer and header boxes placed themselves with respect to
        !          5778: this page box, with the footer being placed above it and the header boxes
        !          5779: being placed above it.</P>
        !          5780: <P>
        !          5781: The boxes created by a page box are headers and footers and can only place
        !          5782: themselves vertically with respect to the page box itself (which is in fact
        !          5783: the separation between two pages).  Besides, it is their vertical position
        !          5784: rule  which determines whether they are header or footer boxes.  Header and
        !          5785: footer boxes must have an explicit vertical position rule (they must not use
        !          5786: the default rule).</P>
        !          5787: <P>
        !          5788: Footer boxes must have an absolute height or inherit the height of their
        !          5789: contents:</P>
        !          5790: <PRE>
        !          5791: Height : Enclosed . Height;
        !          5792: </PRE>
        !          5793: <P>
        !          5794: A page box must have height and width rules and these two rules must be
        !          5795: specified with constant values, expressed in centimeters, inches, or
        !          5796: typographer's points.  These two rules are interpreted in a special way for
        !          5797: page boxes:  they determine the width of the page and the vertical distance
        !          5798: between two page separators, which is the height of the page and its header
        !          5799: and footer together.</P>
        !          5800: <P>
        !          5801: A page box should also have vertical and horizontal position rules and these
        !          5802: two rules should specify the position on the sheet of paper of the rectangle
        !          5803: enclosing the page's contents.  These two rules must position the upper left
        !          5804: corner of the enclosing rectangle in relation to the upper left corner of the
        !          5805: sheet of paper, considered to be the enclosing element.  In both rules,
        !          5806: distances must be expressed in fixed units: centimeters (<TT>cm</TT>), inches
        !          5807: (<TT>in</TT>), or typographer's points (<TT>pt</TT>).  Thus, rules similar to
        !          5808: the following should be found in the rules for a page box:</P>
        !          5809: <PRE>
        !          5810: BOXES
        !          5811:    ThePage :
        !          5812:       BEGIN
        !          5813:       VertPos : Top = Enclosing . Top + 3 cm;
        !          5814:       HorizPos : Left = Enclosing . Left + 2.5 cm;
        !          5815:       Width : 16 cm;
        !          5816:       Height : 22.5 cm;
        !          5817:       END;
        !          5818: </PRE>
        !          5819: <P>
        !          5820: When a document must be page broken, the page models to be constructed are
        !          5821: defined in the <TT>BOXES</TT> section of the presentation schema by declaring
        !          5822: page boxes and header and footer boxes.  Also, the <TT>Page</TT> rule is used
        !          5823: to specify to which parts of the document and to which views each model should
        !          5824: be applied.</P>
        !          5825: <P>
        !          5826: The <TT>Page</TT> rule has only one parameter, given between parentheses after
        !          5827: the <TT>Page</TT> keyword.  This parameter is the name of the box which must
        !          5828: serve as the model for page construction.  When a <TT>Page</TT> rule is
        !          5829: attached to an element type, each time such an element appears in a document,
        !          5830: a page break takes place and the page model indicated in the rule is applied
        !          5831: to all following pages, until reaching the next element which has a
        !          5832: <TT>Page</TT> rule.</P>
        !          5833: <P>
        !          5834: The <TT>Page</TT> rule applies to only one view; if it appears in the primary
        !          5835: view's block of rules, a <TT>Page</TT> rule applies only to that view. Thus,
        !          5836: different page models can be defined for the full document and for its table
        !          5837: of contents, which is another view of the same document. Some views can be
        !          5838: specified with pages, and other views of the same document can be specified
        !          5839: without pages.</P>
        !          5840: <PRE>
        !          5841:                    'Page' '(' BoxID ')'
        !          5842: </PRE>
        !          5843: </DIV>
        !          5844: 
        !          5845: <DIV class="subsection">
        !          5846: <H3><A name="copyrule">Box copies</A></H3>
        !          5847: 
        !          5848: <P>
        !          5849: The <TT>Copy</TT> rule can be used for an element which is defined as a
        !          5850: reference in the structure schema.  In this case, the rule specified, between
        !          5851: parenthesis, thee name of the box (declared in the <TT>BOXES</TT> section)
        !          5852: which must be produced when this reference appears in the structure of a
        !          5853: document.  The box produced is a copy (same contents, but possible different
        !          5854: presentation) of the box type indicated by the parameter between parentheses,
        !          5855: and which is in the element designated by the reference.  The name of a box
        !          5856: can be replaced by type name. Then what is copied is the contents of the
        !          5857: element of this type which is inside the referenced element.</P>
        !          5858: <P>
        !          5859: Whether a box name or type name is given, it may be followed by the name of a
        !          5860: structure schema between parentheses.  This signifies that the box or type is
        !          5861: defined in the indicated structure schema and not in the structure schema with
        !          5862: which the rule's presentation schema is associated.</P>
        !          5863: <P>
        !          5864: The <TT>Copy</TT> rule can also be applied to a presentation box.  If the
        !          5865: presentation box was created by a reference attribute, the rule is applied as
        !          5866: in the case of a reference element: the contents of the box having the
        !          5867: <TT>Copy</TT> rule are based on the element designated by the reference
        !          5868: attribute.  For other presentation boxes, the <TT>Copy</TT> rule takes a type
        !          5869: name parameter which can be followed, between parentheses, by the name of the
        !          5870: structure schema in which the type is defined, if it is not defined in the
        !          5871: same schema.  The contents of the box which has this rule are a copy of the
        !          5872: element of this type which is in the element creating the presentation box, or
        !          5873: by default, the box of this type which precedes the presentation box.  This
        !          5874: last facility is used, for example, to define the running titles in headers or
        !          5875: footers.</P>
        !          5876: <PRE>
        !          5877:                'Copy' '(' BoxTypeToCopy ')' .
        !          5878:   BoxTypeToCopy = BoxID [ ExtStruct ] /
        !          5879:                      ElemID [ ExtStruct ] .
        !          5880:   ExtStruct        = '(' ElemID ')' .
        !          5881: </PRE>
        !          5882: <P>
        !          5883: Like the creation rules, the <TT>Copy</TT> rule cannot appear in the <A
        !          5884: href="#defaultpresrules">default presentation rules</A>.  Moreover, this rule
        !          5885: can only appear in the primary view's block of rules; the copy rule is applied
        !          5886: to all views.</P>
        !          5887: <BLOCKQUOTE class="example">
        !          5888: <P>
        !          5889: <STRONG>Example:</STRONG></P>
        !          5890: <P>
        !          5891: If the following definitions are in the structure schema:</P>
        !          5892: <PRE>
        !          5893: Body = LIST OF (Chapter =
        !          5894:                      BEGIN
        !          5895:                      ChapterTitle = Text;
        !          5896:                      ChapterBody = SectionSeq;
        !          5897:                      END);
        !          5898: RefChapter = REFERENCE (Chapter);
        !          5899: </PRE>
        !          5900: <P>
        !          5901: then the following presentation rules (among many other rules in
        !          5902: thepresentation schema) can be specified:</P>
        !          5903: <PRE>
        !          5904: COUNTERS
        !          5905:    ChapterCtr : RANK OF Chapter;
        !          5906: BOXES
        !          5907:    ChapterNumber :
        !          5908:       BEGIN
        !          5909:       Content : (VALUE (ChapterCtr, URoman));
        !          5910:       ...
        !          5911:       END;
        !          5912: RULES
        !          5913:    Chapter :
        !          5914:       BEGIN
        !          5915:       CreateFirst (ChapterNumber);
        !          5916:       ...
        !          5917:       END;
        !          5918:    RefChapter :
        !          5919:       BEGIN
        !          5920:       Copy (ChapterNumber);
        !          5921:       ...
        !          5922:       END;
        !          5923: </PRE>
        !          5924: <P>
        !          5925: which makes the number of the chapter designated by the referenceappear in
        !          5926: uppercase roman numerals, in place of the reference to achapter itself.
        !          5927: Alternatively, the chapter title can be made toappear in place of the
        !          5928: reference by writing this <TT>Copy</TT>rule:</P>
        !          5929: <PRE>
        !          5930:       Copy (ChapterTitle);
        !          5931: </PRE>
        !          5932: <P>
        !          5933: To define a header box, named <TT>RunningTitle</TT>, which contains the title
        !          5934: of the current chapter, the box's contents are defined in this way:</P>
        !          5935: <PRE>
        !          5936: BOXES
        !          5937:    RunningTitle :
        !          5938:       Copy (ChapterTitle);
        !          5939: </PRE>
        !          5940: </BLOCKQUOTE>
        !          5941: </DIV>
        !          5942: </DIV>
        !          5943: <HR>
        !          5944: </DIV>
        !          5945: 
        !          5946: <DIV class="chapter">
        !          5947: <H1>The T language</H1>
        !          5948: 
        !          5949: 
        !          5950: <DIV class="section">
        !          5951: <H2>Document translation</H2>
        !          5952: 
        !          5953: <P>
        !          5954: Because of its document model, Thot can produce documents in a high-level
        !          5955: abstract form.  This form, called the <EM>canonical form</EM> is specific to
        !          5956: Thot; it is well suited to the editor's manipulations, but it does not
        !          5957: necessarily suit other operations which might be applied to documents. Because
        !          5958: of this, the Thot editor offers the choice of saving documents in its own form
        !          5959: (the canonical form) or a format defined by the user.  In the latter case, the
        !          5960: Thot document is transformed by the translation program.  This facility can
        !          5961: also be used to export documents from Thot to systems using other
        !          5962: formalisms.</P>
        !          5963: 
        !          5964: <DIV class="subsection">
        !          5965: <H3>Translation principles</H3>
        !          5966: 
        !          5967: <P>
        !          5968: Document translation allows the export of documents to other systems which do
        !          5969: not accept Thot's canonical form.  Translation can be used to export document
        !          5970: to source-based formatters like T<SUB><BIG>E</BIG></SUB>X,
        !          5971: L<SUP>A</SUP>T<SUB><BIG>E</BIG></SUB>X, and <TT>troff</TT>.  It can also be
        !          5972: used to translate documents into interchange formats like SGML or HTML.  To
        !          5973: allow the widest range of possible exports, Thot does not limit the choice of
        !          5974: translations, but rather allows the user to define the formalisms into which
        !          5975: documents can be translated.</P>
        !          5976: <P>
        !          5977: For each document or object class, a set of translation rules can be defined,
        !          5978: specifying how the canonical form should be transformed into a given
        !          5979: formalism.  These translation rules are grouped into <EM>translation
        !          5980: schemas</EM>, each schema containing the rules necessary to translate a
        !          5981: generic logical structure (document or object structure) into a particular
        !          5982: formalism.  The same generic logical structure can have several different
        !          5983: translation schemas, each defining translation rules for a different
        !          5984: formalism.</P>
        !          5985: <P>
        !          5986: Like presentation schemas, translation schemas are generic.  Thus, they apply
        !          5987: to an entire object or document class and permit translation of all documents
        !          5988: or objects of that class.</P>
        !          5989: </DIV>
        !          5990: 
        !          5991: <DIV class="subsection">
        !          5992: <H3>Translation procedure</H3>
        !          5993: 
        !          5994: <P>
        !          5995: The translator works on the specific logical structure of the document being
        !          5996: translated.  It traverses the primary tree of this logical structure in
        !          5997: pre-order and, at each node encountered, it applies the corresponding
        !          5998: translation rules defined in the translation schema. Translation can be
        !          5999: associated:</P>
        !          6000: <UL>
        !          6001: <LI>with element types defined in the structure schema,
        !          6002: <LI>with global or local attributes defined in the structure schema,
        !          6003: <LI>with specific presentation rules,
        !          6004: <LI>with the content of the leaves of  the structure (characters,symbols and
        !          6005: graphical elements)
        !          6006: </UL>
        !          6007: <P>
        !          6008: Thus, for each node, the translator applies all rules associated with the
        !          6009: element type, all rules associated with each attribute (local or global)
        !          6010: carried by the element, and if the element is a leaf of the tree, it also
        !          6011: applies Translation rules for characters, symbols, or graphical elements,
        !          6012: depending on the type of the leaf.</P>
        !          6013: <P>
        !          6014: Rules associated with the content of leaves are different from all other
        !          6015: rules: they specify only how to translate character strings, symbols, and
        !          6016: graphical elements.  All other rules, whether associated with element types,
        !          6017: with specific presentation rules or with attributes, are treated similarly.
        !          6018: These rules primarily allow:</P>
        !          6019: <UL>
        !          6020: <LI>generation of a text constant or variable before or afterthe contents of
        !          6021: an element,
        !          6022: <LI>modification of the order in which elements appear aftertranslation,
        !          6023: <LI>removal of an element in the translated document,
        !          6024: <LI>and writing messages on the user's terminal during translation.
        !          6025: </UL>
        !          6026: </DIV>
        !          6027: </DIV>
        !          6028: 
        !          6029: <DIV class="section">
        !          6030: <H2>Translation definition language</H2>
        !          6031: 
        !          6032: <P>
        !          6033: Translation schemas are written in a custom language, called T, which is
        !          6034: described in the rest of this chapter.  The grammar of T is specified using
        !          6035: the same <A href="#metalang">meta-language</A> as was used for the S and P
        !          6036: languages and the translation schemas are written using the same conventions
        !          6037: as the structure and presentation schemas.  In particular, the keywords of the
        !          6038: T language (the stings between apostrophes in the following syntax rules) can
        !          6039: be written in any combination of upper-case and lower-case letters, but
        !          6040: identifiers created by the programmer must always be written in the same
        !          6041: way.</P>
        !          6042: 
        !          6043: <DIV class="subsection">
        !          6044: <H3>Organization of a translation schema</H3>
        !          6045: 
        !          6046: <P>
        !          6047: A translation schema is begun by the <TT>TRANSLATION</TT> keyword and is
        !          6048: terminated by the <TT>END</TT> keyword.  The <TT>TRANSLATION</TT> keyword is
        !          6049: followed by the name of the generic structure for which a translation is being
        !          6050: defined and a semicolon.  This name must be identical to the name which
        !          6051: appears after the <TT>STRUCTURE</TT> keyword in the corresponding structure
        !          6052: schema.</P>
        !          6053: <P>
        !          6054: After this declaration of the structure, the following material appears in
        !          6055: order:</P>
        !          6056: <UL>
        !          6057: <LI>the length of lines produced by the translation,
        !          6058: <LI>the character delimiting the end of the line,
        !          6059: <LI>the character string which the translator will insert if it must
        !          6060: line-break the translated text,
        !          6061: <LI>declarations of
        !          6062: <UL>
        !          6063: <LI>buffers,
        !          6064: <LI>counters,
        !          6065: <LI>constants,
        !          6066: <LI>variables,
        !          6067: </UL>
        !          6068: <LI>translation rules associated with element types,
        !          6069: <LI>translation rules associated with attributes,
        !          6070: <LI>translation rules associated with specific presentation rules,
        !          6071: <LI>translation rules associated with characters strings, symbols and
        !          6072: graphical elements.
        !          6073: </UL>
        !          6074: <P>
        !          6075: Each of these sections is introduced by a keyword followed by a sequence of
        !          6076: declarations.  All of these sections are optional, expect for the translation
        !          6077: rules associated with element types. Many <TT>TEXTTRANSLATE</TT> sections can
        !          6078: appear, each defining the rules for translating character strings of a
        !          6079: particular alphabet.</P>
        !          6080: <PRE>
        !          6081:      TransSchema ='TRANSLATION' ElemID ';'
        !          6082:                 [ 'LINELENGTH' LineLength ';' ]
        !          6083:                 [ 'LINEEND' CHARACTER ';' ]
        !          6084:                 [ 'LINEENDINSERT' STRING ';' ]
        !          6085:                 [ 'BUFFERS' BufferSeq ]
        !          6086:                 [ 'COUNTERS' CounterSeq ]
        !          6087:                 [ 'CONST' ConstSeq ]
        !          6088:                 [ 'VAR' VariableSeq ]
        !          6089:                   'RULES' ElemSeq
        !          6090:                 [ 'ATTRIBUTES' AttrSeq ]
        !          6091:                 [ 'PRESENTATION' PresSeq ]
        !          6092:                 &lt; 'TEXTTRANSLATE' TextTransSeq >
        !          6093:                 [ 'SYMBTRANSLATE' TransSeq ]
        !          6094:                 [ 'GRAPHTRANSLATE' TransSeq ]
        !          6095:                   'END' .
        !          6096: </PRE>
        !          6097: </DIV>
        !          6098: 
        !          6099: <DIV class="subsection">
        !          6100: <H3><A name="linelength">Line length</A></H3>
        !          6101: 
        !          6102: <P>
        !          6103: If a <TT>LINELENGTH</TT> instruction is present after the structure
        !          6104: declaration, the translator divides the text it produces into lines, each line
        !          6105: having a length less than or equal to the integer which follows the
        !          6106: <TT>LINELENGTH</TT> keyword.  This maximum line length is expressed as a
        !          6107: number of characters.  The end of the line is marked by the character defined
        !          6108: by the <TT>LINEEND</TT> instruction.  When the translator breaks the lines on
        !          6109: a space character in generated text, this space will be replaced by the
        !          6110: character string defined by the <TT>LINEENDINSERT</TT> instruction.</P>
        !          6111: <P>
        !          6112: If the <TT>LINEEND</TT> instruction is not defined then the linefeed character
        !          6113: (octal code 12) is used as the default line end character. If the
        !          6114: <TT>LINEENDINSERT</TT> instruction is not defined, the linefeed character is
        !          6115: inserted at the end of the produced lines.  If there is no <TT>LINELENGTH</TT>
        !          6116: instruction, the translated text is not divided into lines.  Otherwise, if the
        !          6117: translation rules generate line end marks, these marks remain in the
        !          6118: translated text, but the length of the lines is not controlled by the
        !          6119: translator.</P>
        !          6120: <PRE>
        !          6121:      LineLength = NUMBER .
        !          6122: </PRE>
        !          6123: <BLOCKQUOTE class="example">
        !          6124: <P>
        !          6125: <STRONG>Example:</STRONG></P>
        !          6126: <P>
        !          6127: To limit the lines produced by the translator to a length of 80characters, the
        !          6128: following rule is written at the beginning of thetranslation schema.</P>
        !          6129: <PRE>
        !          6130: LineLength 80;
        !          6131: </PRE>
        !          6132: </BLOCKQUOTE>
        !          6133: </DIV>
        !          6134: 
        !          6135: <DIV class="subsection">
        !          6136: <H3>Buffers</H3>
        !          6137: 
        !          6138: <P>
        !          6139: A buffer is a  unit of memory managed by the translator, which can either
        !          6140: contain text read from the terminal during the translation (see the <A
        !          6141: href="#readrule"><TT>Read</TT> rule</A>), or the name of the last image
        !          6142: (bit-map) encountered by the translator in its traversal of the document.
        !          6143: Remember the images are stored in files that are separate for the document
        !          6144: files and that the canonical form contains only the names of the files in
        !          6145: which the images are found.</P>
        !          6146: <P>
        !          6147: Thus, there are two types of buffers:  buffers for reading from the terminal
        !          6148: (filled by the <TT>Read</TT> rule) and the buffer of image names (containing
        !          6149: the name of the last image encountered).  A translation schema can use either
        !          6150: type, one or several read buffers and one (and only one) image name
        !          6151: buffer.</P>
        !          6152: <P>
        !          6153: If any buffers are used, the <TT>BUFFERS</TT> keyword must be present,
        !          6154: followed by declarations of every buffer used in the translation schema.  Each
        !          6155: buffer declaration  is composed only of the name of the buffer, chosen freely
        !          6156: by the programmer.  The image name buffer is identified by the
        !          6157: <TT>Picture</TT> keyword, between parentheses, following the buffer name.  The
        !          6158: <TT>Picture</TT> keyword may only appear once.  Each buffer declaration is
        !          6159: terminated by a semicolon.</P>
        !          6160: <PRE>
        !          6161:      BufferSeq = Buffer &lt; Buffer > .
        !          6162:      Buffer    = BufferID [ '(' 'Picture' ')' ] ';' .
        !          6163:      BufferID  = NAME .
        !          6164: </PRE>
        !          6165: <BLOCKQUOTE class="example">
        !          6166: <P>
        !          6167: <STRONG>Example:</STRONG></P>
        !          6168: <P>
        !          6169: The following buffer declarations create an image name buffer
        !          6170: named<TT>ImageName</TT>and a read buffer named<A
        !          6171: name="destname"><TT>DestName</TT></A>:</P>
        !          6172: <PRE>
        !          6173: BUFFERS
        !          6174:      ImageName (Picture); DestName;
        !          6175: </PRE>
        !          6176: </BLOCKQUOTE>
        !          6177: </DIV>
        !          6178: 
        !          6179: <DIV class="subsection">
        !          6180: <H3><A name="counters">Counters</A></H3>
        !          6181: 
        !          6182: <P>
        !          6183: Certain translation rules generate text that varies according to the context
        !          6184: of the element to which the rules apply.  Variable text is defined either in
        !          6185: the <A href="#varsect"><TT>VAR</TT> section</A> of the translation schema or
        !          6186: in the rule itself (see the <TT>Create</TT> and <TT>Write</TT> rules).  Both
        !          6187: types of definition rely on counters for the calculation of variable
        !          6188: material.</P>
        !          6189: <P>
        !          6190: There are two types of counter: counters whose value is explicitely computed
        !          6191: by applying <A href="#setandadd"><TT>Set</TT> and <TT>Add</TT> rules</A>, and
        !          6192: counters whose value is computed by a function associated with the counter.
        !          6193: Those functions allow the same calculations as can be used in presentation
        !          6194: schemas. As in a presentation schema, counters must be defined in the
        !          6195: <TT>COUNTERS</TT> section of the translation schema before they are used.</P>
        !          6196: <P>
        !          6197: When counters are used in a translation schema, the <TT>COUNTERS</TT> keyword
        !          6198: is followed by the declarations of every counter used.  Each declaration is
        !          6199: composed of the counter's name possibly followed by a colon and the counting
        !          6200: function to be used for the counter.  The declaration is terminated by a
        !          6201: semi-colon. If the counter is explicitely computed by <TT>Set</TT> and
        !          6202: <TT>Add</TT> rules, no counting function is indicated. If a counting function
        !          6203: is indicated, <TT>Set</TT> and <TT>Add</TT> rules cannot be applied to that
        !          6204: counter.</P>
        !          6205: <P>
        !          6206: The counting function indicates how the counter's value will be computed.
        !          6207: Three functions are available: <TT>Rank</TT>, <TT>Rlevel</TT>, and
        !          6208: <TT>Set</TT>.</P>
        !          6209: <UL>
        !          6210: <LI><TT>Rank of ElemID</TT>indicates that the counter's value is the rank
        !          6211: ofthe element of type <TT>ElemID</TT>which encloses the element for whichthe
        !          6212: counter is being evaluated.  For the purposes of this function, anelement of
        !          6213: type <TT>ElemID</TT>is considered to enclose itself.  Thisfunction is
        !          6214: primarily used  when the element of type <TT>ElemID</TT>ispart of an aggregate
        !          6215: or list, in which case the counter's value is theelement's rank in its list or
        !          6216: aggregate.  Note that, unlike the<TT>Rank</TT>function for presentation
        !          6217: schemas, the <TT>Page</TT>keyword cannotbe used in place of the
        !          6218: <TT>ElemID</TT>.
        !          6219: <P>
        !          6220: The type name <TT>ElemID</TT> can be followed by an integer.  That number
        !          6221: represents the relative level, among the ancestors of the concerned element,
        !          6222: of the element whose rank is asked.  If that relative level <I>n</I> is
        !          6223: unsigned, the $n^th$ element of type <TT>ElemID</TT> encountered when
        !          6224: travelling the logical structure from the root to the concerned element is
        !          6225: taken into account.  If the relative level is negative, the logical structure
        !          6226: is travelled in the other direction, from the concerned element to the
        !          6227: root.</P>
        !          6228: <LI><TT>Rlevel of ElemID</TT>indicates that the counter's values is
        !          6229: therelative level in the tree of the element for which the counter isbeing
        !          6230: evaluated.  The counter counts the number of elements of
        !          6231: type<TT>ElemID</TT>which are found on the path between the root of
        !          6232: thedocument's logical structure tree and the element (inclusive).
        !          6233: <LI><TT>Set n on Type1 Add m on Type2</TT>indicates that the counter's valueis
        !          6234: calculated as follows:  in traversing the document from thebeginning to the
        !          6235: element for which the counter is being evaluated, thecounter is set to the
        !          6236: value <TT>n</TT>each time a <TT>Type1</TT>element isencountered and is
        !          6237: incremented by the amount <TT>m</TT>each time a<TT>Type2</TT>element is
        !          6238: encountered.  The initial value <TT>n</TT>and theincrement <TT>m</TT>are
        !          6239: integers.
        !          6240: </UL>
        !          6241: <P>
        !          6242: As in a presentation schema, the <TT>Rank</TT> and <TT>Set</TT> functions can
        !          6243: be modified by a numeric attribute which changes their initial value. This is
        !          6244: indicated by the <TT>Init</TT> keyword followed by the numeric attribute's
        !          6245: name.  The <TT>Set</TT> function takes the value of the attribute instead of
        !          6246: the <TT>InitValue</TT> (<TT>n</TT>).  For the <TT>Rank</TT> function, the
        !          6247: value of the attribute is considered to be the rank of the first element of
        !          6248: the list (rather than the normal value of 1). Subsequent items in the list
        !          6249: have their ranks shifted accordingly.  In both cases, the attribute must be
        !          6250: numeric and must be a local attribute of the root of the document itself.</P>
        !          6251: <PRE>
        !          6252:      CounterSeq  = Counter &lt; Counter > .
        !          6253:      Counter     = CounterID [ ':' CounterFunc ] ';' .
        !          6254:      CounterID   = NAME .
        !          6255:      CounterFunc = 'Rank' 'of' ElemID [ SLevelAsc ]
        !          6256:                    [ 'Init' AttrID ] /
        !          6257:                    'Rlevel' 'of' ElemID /
        !          6258:                    'Set' InitValue 'On' ElemID
        !          6259:                          'Add' Increment 'On' ElemID
        !          6260:                          [ 'Init' AttrID ] .
        !          6261:      SLevelAsc   = [ '-' ] LevelAsc .
        !          6262:      LevelAsc    =  NUMBER .
        !          6263:      InitValue   = NUMBER .
        !          6264:      Increment   = NUMBER .
        !          6265:      ElemID      = NAME .
        !          6266:      AttrID      = NAME .
        !          6267: </PRE>
        !          6268: <BLOCKQUOTE class="example">
        !          6269: <P>
        !          6270: <STRONG>Example:</STRONG></P>
        !          6271: <P>
        !          6272: If the body of a chapter is defined in the structure schema by:</P>
        !          6273: <PRE>
        !          6274: Chapter_Body = LIST OF
        !          6275:          (Section = BEGIN
        !          6276:                     Section_Title = Text;
        !          6277:                     Section_Body  = BEGIN
        !          6278:                                     Paragraphs;
        !          6279:                                     Section;
        !          6280:                                     END;
        !          6281:                     END
        !          6282:          );
        !          6283: </PRE>
        !          6284: <P>
        !          6285: (sections are defined recursively), a counter can be defined givingthe <A
        !          6286: name="sectnum">number of a section</A>within its level in thehierarchy:</P>
        !          6287: <PRE>
        !          6288: COUNTERS
        !          6289:    SectionNumber : Rank of Section;
        !          6290: </PRE>
        !          6291: <P>
        !          6292: A counter holding the hierarchic level of a section:</P>
        !          6293: <PRE>
        !          6294:    SectionLevel : Rlevel of Section;
        !          6295: </PRE>
        !          6296: <P>
        !          6297: A <A name="uniquenum">counter</A>which sequentially numbers all thedocument's
        !          6298: sections, whatever their hierarchic level:</P>
        !          6299: <PRE>
        !          6300:    UniqueSectNum : Set 0 on Document Add 1 on Section;
        !          6301: </PRE>
        !          6302: </BLOCKQUOTE>
        !          6303: </DIV>
        !          6304: 
        !          6305: <DIV class="subsection">
        !          6306: <H3>Constants</H3>
        !          6307: 
        !          6308: <P>
        !          6309: A common feature of translation rules is the generation of constant text. This
        !          6310: text can be defined in the rule that generates it (see for example the <A
        !          6311: href="#create"><TT>Create</TT></A> and <A href="#writerule"><TT>Write</TT></A>
        !          6312: rules); but it can also be defined once in the constant declaration section
        !          6313: and used many times in different rules.  The latter option is preferable when
        !          6314: the same text is used in several rules or several <A
        !          6315: href="#varsect">variables</A>.</P>
        !          6316: <P>
        !          6317: The <TT>CONST</TT> keyword begins the constant declaration section of the
        !          6318: translation schema.  It must be omitted if no constants are declared. Each
        !          6319: constant declaration is composed of the constant name, an equals sign, and the
        !          6320: constant's value, which is a character string between apostrophes.  A constant
        !          6321: declaration is terminated by a semicolon.</P>
        !          6322: <PRE>
        !          6323:      ConstSeq   = Const &lt; Const > .
        !          6324:      Const      = ConstID '=' ConstValue ';' .
        !          6325:      ConstID    = NAME .
        !          6326:      ConstValue = STRING .
        !          6327: </PRE>
        !          6328: <BLOCKQUOTE class="example">
        !          6329: <P>
        !          6330: <STRONG><A name="levelexample">Example:</A></STRONG></P>
        !          6331: <P>
        !          6332: The following rule assigns the name <TT>TxtLevel</TT>to the characterstring
        !          6333: ``Level'':</P>
        !          6334: <PRE>
        !          6335: CONST
        !          6336:      TxtLevel = 'Level';
        !          6337: </PRE>
        !          6338: </BLOCKQUOTE>
        !          6339: </DIV>
        !          6340: 
        !          6341: <DIV class="subsection">
        !          6342: <H3><A name="varsect">Variables</A></H3>
        !          6343: 
        !          6344: <P>
        !          6345: Variables allow to define file names or variable text which is generated by
        !          6346: the <TT>Create</TT> and <TT>Write</TT> rules.  Variables can be defined either
        !          6347: in the <TT>VAR</TT> section of the translation schema or directly in the rules
        !          6348: which use them.  Variables that define fine names must be declared in the
        !          6349: <TT>VAR</TT> section, and when the same variable is used several times in the
        !          6350: translation schema, it makes sense to define it globally in the <TT>VAR</TT>
        !          6351: section.  This section is only present if at least one variable is defined
        !          6352: globally.</P>
        !          6353: <P>
        !          6354: After the <TT>VAR</TT> keyword, each global variable is defined by its name, a
        !          6355: colon separator and a sequence of functions (at least one function). Each
        !          6356: variable definition is terminated by a semicolon. Functions determine the
        !          6357: different parts which together give the value of the variable.  The value is
        !          6358: obtained by concatenating the strings produced by each of the functions. Seven
        !          6359: types of functions are available.  Each variable definition may use any number
        !          6360: of functions of each type.</P>
        !          6361: <UL>
        !          6362: <LI>The function <TT>Value(Counter)</TT>returns a string representing thevalue
        !          6363: taken by the counter when it is evaluated for the element inwhose rule the
        !          6364: variable is used.  The counter must have been declaredin the
        !          6365: <TT>COUNTERS</TT>section of the translation schema.  When thecounter is
        !          6366: expressed in arabic numerals, the countername can be followed by a colon and
        !          6367: an integer indicating a minimumlength (number of characters) for the string;
        !          6368: if the counter's valueis normally expressed with fewer characters than the
        !          6369: required minimum,zeroes are added to the front of the string to achieve the
        !          6370: minimumlength.
        !          6371: <P>
        !          6372: By default, the counter value is written in arabic digits. If another
        !          6373: representation of that value is needed, the counter name must be followed by a
        !          6374: comma and one of the following keywords:</P>
        !          6375: <UL>
        !          6376: <LI><TT>Arabic</TT>: arabic numerals (default value),
        !          6377: <LI><TT>LRoman</TT>: lower-case roman numerals,
        !          6378: <LI><TT>URoman</TT>: upper-case roman numerals,
        !          6379: <LI><TT>Uppercase</TT>: upper-case letter,
        !          6380: <LI><TT>Lowercase</TT>: lower-case letter.
        !          6381: </UL>
        !          6382: <LI>The function <TT>FileDir</TT>, without parameter, returns a
        !          6383: stringrepresenting the name of the directory of the output file that has
        !          6384: beengiven as a parameter to the translation program. The string includesa
        !          6385: character '/' at the end.
        !          6386: <LI>The function <TT>FileName</TT>, without parameter, returns a
        !          6387: stringrepresenting the name of the output file that has been given as
        !          6388: aparameter to the translation program. The file extension (the characterstring
        !          6389: that terminate the file name, after a dot) is not part ofthat string.
        !          6390: <LI>The function <TT>Extension</TT>, without parameter, returns a
        !          6391: stringrepresenting the extension of the file name. That string is emptyif the
        !          6392: file name that has been given as a parameter to the translationprogram has no
        !          6393: extension. If there is an extension, its firstcharacter is a dot.
        !          6394: <LI>The function <TT>DocumentName</TT>, without parameter, returns a
        !          6395: stringrepresenting the name of the document being translated.
        !          6396: <LI>The function <TT>DocumentDir</TT>, without parameter, returns a
        !          6397: stringrepresenting the directory containing the document being translated.
        !          6398: <LI>The function formed by the name of a constant returns thatconstant's
        !          6399: value.
        !          6400: <LI>The function formed by a character string between apostrophes returnsthat
        !          6401: string.
        !          6402: <LI>The function formed by the name of a buffer returns the contents ofthat
        !          6403: buffer.  If the named buffer is the image buffer, then the nameof the last
        !          6404: image encountered is returned.  Otherwise, the buffer is a read bufferand the
        !          6405: value returned is text previously read from the terminal.  Ifthe buffer is
        !          6406: empty (no image has been encountered or the <TT>Read</TT>rule has not been
        !          6407: executed for the buffer), then the empty string isreturned.
        !          6408: <LI>The function formed by an attribute name takes the value of theindicated
        !          6409: attribute for the element to which the variable applies.  Ifthe element does
        !          6410: not have that attribute, then the element's ancestorare searched toward the
        !          6411: root of the tree.  If one of the ancestorsdoes have the attribute then its
        !          6412: value is used.  If no ancestors havethe attribute, then the value of the
        !          6413: function is the empty string.
        !          6414: </UL>
        !          6415: <PRE>
        !          6416:      VariableSeq = Variable &lt; Variable > .
        !          6417:      Variable    = VarID ':' Function &lt; Function > ';' .
        !          6418:      VarID       = NAME .
        !          6419:      Function    ='Value' '(' CounterID [ ':' Length ]
        !          6420:                             [ ',' CounterStyle ] ')' /
        !          6421:                   'FileDir' / 'FileName' / 'Extension' /
        !          6422:                   'DocumentName' / 'DocumentDir' /
        !          6423:                    ConstID / CharString / 
        !          6424:                    BufferID / AttrID .
        !          6425:      Length      = NUMBER .
        !          6426:      CounterStyle= 'Arabic' / 'LRoman' / 'URoman' /
        !          6427:                    'Uppercase' / 'Lowercase' .
        !          6428:      CharString  = STRING .
        !          6429: </PRE>
        !          6430: <BLOCKQUOTE class="example">
        !          6431: <P>
        !          6432: <STRONG>Example:</STRONG></P>
        !          6433: <P>
        !          6434: To create, at the beginning of each section of the translateddocument, text
        !          6435: composed of the string ``Section'' followed by thesection number, the
        !          6436: following <A name="varsectexample">variable definition</A>might be used:</P>
        !          6437: <PRE>
        !          6438: VAR
        !          6439:      SectionVar : 'Section' Value(SectionNumber);
        !          6440: </PRE>
        !          6441: <P>
        !          6442: (see the definition of <A href="#sectnum"><TT>SectionNumber</TT></A>).</P>
        !          6443: <P>
        !          6444: The following variable definition can be used to create, at the beginning of
        !          6445: each section, the text ``Level'' followed by the hierarchical level of the
        !          6446: section. It used the constant defined above.</P>
        !          6447: <PRE>
        !          6448:      LevelVar : TxtLevel Value(SectionLevel);
        !          6449: </PRE>
        !          6450: <P>
        !          6451: (see the definitions of <A href="#sectnum"><TT>SectionLevel</TT></A>and of <A
        !          6452: href="#levelexample"><TT>TxtLevel</TT></A>).</P>
        !          6453: <P>
        !          6454: To generate the translation of each section in a different file (see <A
        !          6455: href="#changemainfile">rule <TT>ChangeMainFile</TT></A>), the name of these
        !          6456: files might be defined by the following variable:</P>
        !          6457: <PRE>
        !          6458:      VarOutpuFile : FileName Value(SectionNumber)
        !          6459:                     Extension;
        !          6460: </PRE>
        !          6461: <P>
        !          6462: If <TT>output.txt</TT>is the name of the <A name="varoutputfile">output
        !          6463: file</A>specified when starting the translation program, translatedsections
        !          6464: are written in files <TT>output1.txt</TT>, <TT>output2.txt</TT>,etc.</P>
        !          6465: </BLOCKQUOTE>
        !          6466: </DIV>
        !          6467: 
        !          6468: <DIV class="subsection">
        !          6469: <H3>Translating structure elements</H3>
        !          6470: 
        !          6471: <P>
        !          6472: The <TT>RULES</TT> keyword introduces the translation rules which will be
        !          6473: applied to the various structured element types.  Translation rules can be
        !          6474: specified for each element type defined in the structure schema, including the
        !          6475: base types defined implicitly, whose names are <TT>TEXT_UNIT</TT>,
        !          6476: <TT>PICTURE_UNIT</TT>, <TT>SYMBOL_UNIT</TT>, <TT>GRAPHIC_UNIT</TT> and
        !          6477: <TT>PAGE_UNIT</TT> in the English version of Thot or <TT>TEXTE</TT>,
        !          6478: <TT>IMAGE</TT>, <TT>SYMBOLE</TT>, <TT>GRAPHIQUE</TT> and <TT>PAGE</TT> in the
        !          6479: French version.  But it is not necessary to specify rules for every defined
        !          6480: type.</P>
        !          6481: <P>
        !          6482: If there are no translation rules for an element type, the elements that it
        !          6483: contains (and which may have rules themselves) will still be translated, but
        !          6484: the translator will produce nothing for the element itself.  To make the
        !          6485: translator completely ignore the content of an element the <A
        !          6486: href="#remove"><TT>Remove</TT> rule</A> must be used.</P>
        !          6487: <P>
        !          6488: The translation rules for an element type defined in the structure schema are
        !          6489: written using the name of the type followed by a colon and the list of
        !          6490: applicable rules.  When the element  type is a <A href="#pairs">mark pair</A>,
        !          6491: but only in this case, the type name must be preceded by the <TT>First</TT> or
        !          6492: <TT>Second</TT> keyword.  This keyword indicates whether the rules that follow
        !          6493: apply to the first or second mark of the pair.</P>
        !          6494: <P>
        !          6495: The list of rules can take several forms.  It may be a simple non-conditional
        !          6496: rule.  It can also be formed by a condition followed by one or more simple
        !          6497: rules.  Or it can be a block of rules beginning with the <TT>BEGIN</TT>
        !          6498: keyword and ending with the <TT>END</TT> keyword and a semicolon.  This block
        !          6499: of rules can contain one or more simple rules and/or one or more conditions,
        !          6500: each followed by one or more simple rules.</P>
        !          6501: <PRE>
        !          6502:      ElemSeq        = TransType &lt; TransType > .
        !          6503:      TransType      = [ FirstSec ] ElemID ':' RuleSeq .
        !          6504:      FirstSec       = 'First' / 'Second' .
        !          6505:      RuleSeq        = Rule / 'BEGIN' &lt; Rule > 'END' ';' .
        !          6506:      Rule           = SimpleRule / ConditionBlock .
        !          6507:      ConditionBlock = 'IF' ConditionSeq SimpleRuleSeq .
        !          6508:      SimpleRuleSeq  = 'BEGIN' &lt; SimpleRule > 'END' ';' / 
        !          6509:                       SimpleRule .
        !          6510: </PRE>
        !          6511: </DIV>
        !          6512: 
        !          6513: <DIV class="subsection">
        !          6514: <H3><A name="transcond">Conditional rules</A></H3>
        !          6515: 
        !          6516: <P>
        !          6517: In a translation schema, the translation rules are either associated with
        !          6518: element types or with attribute values or with a specific presentation.  They
        !          6519: are applied by the translator each time an element of the corresponding type
        !          6520: is encountered in the translated document or each time the attribute value is
        !          6521: carried by an element or also, each time the specific translation is attached
        !          6522: to an element.  This systematic application of the rules can be relaxed: it is
        !          6523: possible to add a condition to one or more rules, so that these rules are only
        !          6524: applied when the condition is true.</P>
        !          6525: <P>
        !          6526: A condition begins with the keyword <TT>IF</TT>, followed by a sequence of
        !          6527: elementary conditions.  Elementary conditions are separated from each other by
        !          6528: the <TT>AND</TT> keyword.  If there is only one elementary condition, this
        !          6529: keyword is absent.  The rules are only applied if all the elementary
        !          6530: conditions are true.  The elementary condition can be negative; it is then
        !          6531: preceded by the <TT>NOT</TT> keyword.</P>
        !          6532: <P>
        !          6533: When the translation rule(s) controlled by the condition apply to a reference
        !          6534: element or a reference attribute, an elementary condition can also apply to
        !          6535: element referred by this reference.  The <TT>Target</TT> keyword is used for
        !          6536: that purpose.  It must appear before the keyword defining the condition
        !          6537: type.</P>
        !          6538: <P>
        !          6539: Depending on their type, some conditions may apply either to the element with
        !          6540: which they are associated, or to one of its ancestor.  In the case od an
        !          6541: ancestor, the key word <TT>Ancestor</TT> must be used, followed by</P>
        !          6542: <UL>
        !          6543: <LI>either an integer which represents the number of levels in thetree between
        !          6544: the element and the ancestor of interest,
        !          6545: <LI>or the type name of the ancestor of interest.  If that type isdefined in a
        !          6546: separate structure schema, the name of that schema mustfollow between
        !          6547: parentheses.
        !          6548: </UL>
        !          6549: <P>
        !          6550: There is a special case for the parent element, which can be simplywritten
        !          6551: <TT>Parent</TT>instead of <TT>Ancestor 1</TT>.</P>
        !          6552: <P>
        !          6553: Only conditions <TT>First</TT>, <TT>Last</TT>, <TT>Referred</TT>,
        !          6554: <TT>Within</TT>, <TT>Attributes</TT>, <TT>Presentation</TT>, <TT>Comment</TT>
        !          6555: and those concerning an attribute or a specific presentation can apply to an
        !          6556: ancestor. Conditions <TT>Defined</TT>, <TT>FirstRef</TT>, <TT>LastRef</TT>,
        !          6557: <TT>ExternalRef</TT>, <TT>Alphabet</TT>, <TT>FirstAttr</TT>,
        !          6558: <TT>LastAttr</TT>, <TT>ComputedPage</TT>, <TT>StartPage</TT>,
        !          6559: <TT>UserPage</TT>, <TT>ReminderPage</TT>, <TT>Empty</TT> cannot be preceded by
        !          6560: keywords <TT>Parent</TT> or <TT>Ancestor</TT>.</P>
        !          6561: <P>
        !          6562: In condition <TT>Referred</TT> and in the condition that applies to a named
        !          6563: attribute, a symbol <TT>*</TT> can indicate that the condition is related only
        !          6564: to the element itself. If this symbol is not present, not only the element is
        !          6565: considered, but also its ancestor, at any level.</P>
        !          6566: <P>
        !          6567: The form of an elementary condition varies according to the type of
        !          6568: condition.</P>
        !          6569: 
        !          6570: <DIV class="subsubsection">
        !          6571: <H4>Conditions based on the logical position of the element</H4>
        !          6572: 
        !          6573: <P>
        !          6574: The condition can be on the position of the element in the document's logical
        !          6575: structure tree.  It is possible to test whether the element is the first
        !          6576: (<TT>First</TT>) or last (<TT>Last</TT>) among its siblings or if it is not
        !          6577: the first (<TT>NOT First</TT>) or not the last (<TT>NOT Last</TT>).</P>
        !          6578: <P>
        !          6579: It is also possible to test if the element is contained in an element of a
        !          6580: given type (<TT>Within</TT>) or if it is not (<TT>NOT Within</TT>). If that
        !          6581: element type is defined in a structure schema which is not the one which
        !          6582: corresponds to the translation schema, the type name of this element must be
        !          6583: followed, between parentheses, by the name of the structure schema which
        !          6584: defines it.</P>
        !          6585: <P>
        !          6586: If the keyword <TT>Within</TT> is preceded by <TT>Immediately</TT>, the
        !          6587: condition is satisfied only if the <EM>parent</EM> element has the type
        !          6588: indicated. If the word <TT>Immediately</TT> is missing, the condition is
        !          6589: satisfied if any <EM>ancestor</EM> has the type indicated.</P>
        !          6590: <P>
        !          6591: An integer <I>n</I> can appear between the keyword <TT>Within</TT> and the
        !          6592: type.  It specifies the number of ancestors of the indicated type that must be
        !          6593: present for the condition to be satisfied.  If the keyword
        !          6594: <TT>Immediately</TT> is also present, the <I>n</I> immediate ancestors of the
        !          6595: element must have the indicated type.  The integer <I>n</I> must be positive
        !          6596: or zero.  It can be preceded by <TT>&lt;</TT> or <TT>></TT> to indicate a
        !          6597: maximum or minimum number of ancestors.  If these symbols are missing, the
        !          6598: condition is satisfied only if it exists exactly <I>n</I> ancestors.  When
        !          6599: this number is missing, it is equivalent to > 0.</P>
        !          6600: </DIV>
        !          6601: 
        !          6602: <DIV class="subsubsection">
        !          6603: <H4>Conditions on references</H4>
        !          6604: 
        !          6605: <P>
        !          6606: References may be taken into account in conditions, which can be based on the
        !          6607: fact that the element, or one of its ancestors (unless symbol <TT>*</TT> is
        !          6608: present), is designated by a at least one reference (<TT>Referred</TT>) or by
        !          6609: none (<TT>NOT Referred</TT>).  If the element or attribute to which the
        !          6610: condition is attached is a reference, the condition can be based on the fact
        !          6611: that it acts as the first reference to the designated element
        !          6612: (<TT>FirstRef</TT>), or as the last (<TT>LastRef</TT>), or as a reference to
        !          6613: an element located in another document (<TT>ExternalRef</TT>).  Like all
        !          6614: conditions, conditions on references can be inverted by the <TT>NOT</TT>
        !          6615: keyword.</P>
        !          6616: </DIV>
        !          6617: 
        !          6618: <DIV class="subsubsection">
        !          6619: <H4>Conditions on the parameters</H4>
        !          6620: 
        !          6621: <P>
        !          6622: Elements which are <A href="#param">parameters</A> can be given a particular
        !          6623: condition which is based on whether or not the parameter is given a value in
        !          6624: the document (<TT>Defined</TT> or <TT>NOT Defined</TT>, respectively).</P>
        !          6625: </DIV>
        !          6626: 
        !          6627: <DIV class="subsubsection">
        !          6628: <H4>Conditions on the alphabets</H4>
        !          6629: 
        !          6630: <P>
        !          6631: The character string base type (and only this type) can use the condition
        !          6632: <TT>Alphabet = a</TT> which indicates that the translation rule(s) should only
        !          6633: apply if the alphabet of the character string is the one whose name appears
        !          6634: after the equals sign (or is not, if there is a preceding <TT>NOT</TT>
        !          6635: keyword).  This condition cannot be applied to translation rules of an
        !          6636: attribute.</P>
        !          6637: <P>
        !          6638: In the current implementation of Thot, the available alphabets are the
        !          6639: <TT>Latin</TT> alphabet and the <TT>Greek</TT> alphabet.</P>
        !          6640: </DIV>
        !          6641: 
        !          6642: <DIV class="subsubsection">
        !          6643: <H4>Conditions on page breaks</H4>
        !          6644: 
        !          6645: <P>
        !          6646: The page break base type (and only this type) can use the following
        !          6647: conditions: <TT>ComputedPage</TT>, <TT>StartPage</TT>, <TT>UserPage</TT>, and
        !          6648: <TT>ReminderPage</TT>.  The <TT>ComputedPage</TT> condition indicates that the
        !          6649: translation rule(s) should apply if the page break was created automatically
        !          6650: by Thot;  the <TT>StartPage</TT> condition is true if the page break is
        !          6651: generated before the element by the <TT>Page</TT> rule of the P language; the
        !          6652: <TT>UserPage</TT> condition applies if the page break was inserted by the
        !          6653: user; and the <TT>ReminderPage</TT> is applied if the page break is a reminder
        !          6654: of page breaking.</P>
        !          6655: </DIV>
        !          6656: 
        !          6657: <DIV class="subsubsection">
        !          6658: <H4>Conditions on the element's content</H4>
        !          6659: 
        !          6660: <P>
        !          6661: The condition can be based on whether or not the element is empty.  An element
        !          6662: which has no children or whose leaves are all empty is considered to be empty
        !          6663: itself.  This condition is expressed by the <TT>Empty</TT> keyword, optionally
        !          6664: preceded by the <TT>NOT</TT> keyword.</P>
        !          6665: </DIV>
        !          6666: 
        !          6667: <DIV class="subsubsection">
        !          6668: <H4>Conditions on the presence of comments</H4>
        !          6669: 
        !          6670: <P>
        !          6671: The condition can be based on the presence or absence of comments associated
        !          6672: with the translated element.  This condition is expressed by the keyword
        !          6673: <TT>Comment</TT>, optionally preceded by the keyword <TT>NOT</TT>.</P>
        !          6674: </DIV>
        !          6675: 
        !          6676: <DIV class="subsubsection">
        !          6677: <H4>Conditions on the presence of specific presentation rules</H4>
        !          6678: 
        !          6679: <P>
        !          6680: The condition can be based on the presence or absence of specific presentation
        !          6681: rules associated with the translated element, whatever the rules, their value
        !          6682: or their number.  This condition is expressed by the keyword
        !          6683: <TT>Presentation</TT>, optionally preceded by the <TT>NOT</TT> keyword.</P>
        !          6684: </DIV>
        !          6685: 
        !          6686: <DIV class="subsubsection">
        !          6687: <H4>Conditions on the presence of logical attributes</H4>
        !          6688: 
        !          6689: <P>
        !          6690: In the same way, the condition can be based on the presence or absence of
        !          6691: attributes associated with the translated elements, no matter what the
        !          6692: attributes or their values.  The <TT>Attributes</TT> keyword expresses this
        !          6693: condition.</P>
        !          6694: </DIV>
        !          6695: 
        !          6696: <DIV class="subsubsection">
        !          6697: <H4>Conditions on logical attributes</H4>
        !          6698: 
        !          6699: <P>
        !          6700: If the condition appears in the translation rules of an attribute, the
        !          6701: <TT>FirstAttr</TT> and <TT>LastAttr</TT> keywords can be used to indicate that
        !          6702: the rules must only be applied if this attribute is the first attribute for
        !          6703: the translated element or if it is the last (respectively).  These conditions
        !          6704: can also be inverted by the <TT>NOT</TT> keyword.</P>
        !          6705: <P>
        !          6706: Another type of condition can only be applied to the translation rules when
        !          6707: the element being processed (or one of its ancestors if symbol <TT>*</TT> is
        !          6708: missing) has a certain attribute, perhaps with a certain value or, in
        !          6709: contrast, when the element does not have this attribute with this value.  The
        !          6710: condition is specified by writing the name of the attribute after the keyword
        !          6711: <TT>IF</TT> or <TT>AND</TT>.  The <TT>NOT</TT> keyword can be used to invert
        !          6712: the condition.  If the translation rules must be applied to any element which
        !          6713: has this attribute (or does not have it, if the condition is inverted) no
        !          6714: matter what the attribute's value, the condition is complete.  If, in
        !          6715: contrast, the condition applies to one or more values of the attribute, these
        !          6716: are indicated after the name of the attribute, except for reference attributes
        !          6717: which do not have values.</P>
        !          6718: <P>
        !          6719: The representation of the values of an <A name="relattr">attribute</A> in a
        !          6720: condition depends on the attribute's type.  For attributes with enumerated or
        !          6721: textual types, the value (a name or character string between apostrophes,
        !          6722: respectively) is simply preceded by an equals sign.  For numeric attributes,
        !          6723: the condition can be based on a single value or on a range of values.  In the
        !          6724: case of a unique value, this value (an integer) is simply preceded by an
        !          6725: equals sign.  Conditions based on ranges of values have several forms:</P>
        !          6726: <UL>
        !          6727: <LI>all values less than a given value (the value is preceded by a``less
        !          6728: than'' sign).
        !          6729: <LI>all values greater than a given value (the value is preceded by a``greater
        !          6730: than'' sign).
        !          6731: <LI>all values falling in an interval, bounds included.  The rangeof values is
        !          6732: then specified <TT>IN [</TT>Minimum <TT>..</TT>Maximum<TT>]</TT>,where Minimum
        !          6733: and Maximum are integers.
        !          6734: </UL>
        !          6735: <P>
        !          6736: All numeric values may be negative.  The integer is simply preceded bya minus
        !          6737: sign.</P>
        !          6738: <P>
        !          6739: Both local and global attributes can be used in conditions.</P>
        !          6740: </DIV>
        !          6741: 
        !          6742: <DIV class="subsubsection">
        !          6743: <H4>Conditions on specific presentation rules</H4>
        !          6744: 
        !          6745: <P>
        !          6746: It is possible to apply translation rules only when the element being
        !          6747: processed has or does not have a specific presentation rule, possibly with a
        !          6748: certain value.  The condition is specified by writing the name of the
        !          6749: presentation rule after the keyword <TT>IF</TT> or <TT>AND</TT>.  The
        !          6750: <TT>NOT</TT> keyword can be used to invert the condition.  If the translation
        !          6751: rules must be applied to any element which has this presentation rule (or does
        !          6752: not have it, if the condition is inverted) no matter what the rule's value,
        !          6753: the condition is complete.  If, in contrast, the condition applies to one or
        !          6754: more values of the rule, these are indicated after the name of the
        !          6755: attribute.</P>
        !          6756: <P>
        !          6757: The representation of presentation rule values in a condition is similar to
        !          6758: that for attribute values.  The representation of these values depend on the
        !          6759: type of the presentation rule. There are three categories of presentation
        !          6760: rules:</P>
        !          6761: <UL>
        !          6762: <LI>those taking numeric values (<TT>Size, Indent, LineSpacing,
        !          6763: LineWeight</TT>),
        !          6764: <LI>those with values taken from a predefined list (<TT>Adjust, Justify,
        !          6765: Hyphenate, Style, Font, UnderLine, Thickness, LineStyle</TT>),
        !          6766: <LI>those whose value is a name (<TT>FillPattern, Background,
        !          6767: Foreground</TT>).
        !          6768: </UL>
        !          6769: <P>
        !          6770: For presentation rules which take numeric values, the condition can take a
        !          6771: unique value or a range of values.  In the case of a unique value, this value
        !          6772: (an integer) is simply preceded by an equals sign. Conditions based on ranges
        !          6773: of values have several forms:</P>
        !          6774: <UL>
        !          6775: <LI>all values less than a given value (the value is preceded by a``less
        !          6776: than'' sign).
        !          6777: <LI>all values greater than a given value (the value is preceded by a``greater
        !          6778: than'' sign).
        !          6779: <LI>all values falling in an interval, bounds included.  The rangeof values is
        !          6780: then specified <TT>IN [</TT>Minimum <TT>..</TT>Maximum<TT>]</TT>,where Minimum
        !          6781: and Maximum are integers.
        !          6782: </UL>
        !          6783: <P>
        !          6784: Values for the <TT>Indent</TT>rule may be negative.  The integer is thensimply
        !          6785: preceded by a minus sign and represents how far the first linestarts to the
        !          6786: left of the other lines.</P>
        !          6787: <P>
        !          6788: For presentation rules whose values are taken from predefined lists, the value
        !          6789: which satisfies the condition is indicated by an equals sign followed by the
        !          6790: name of the value.</P>
        !          6791: <P>
        !          6792: For presentation rule whose values are names, the value which satisfies the
        !          6793: condition is indicated by the equals sign followed by the value's name. The
        !          6794: names of fill patterns (the <TT>FillPattern</TT> rule) and of colors (the
        !          6795: <TT>Foreground</TT> and <TT>Background</TT> rules) known to Thot are the same
        !          6796: as in the P language.</P>
        !          6797: <P>
        !          6798: The syntax of conditions based on the specific presentation is the same as the
        !          6799: syntax used to express the <A href="#prestrans">translation of specific
        !          6800: presentation rules</A>.</P>
        !          6801: <P>
        !          6802: When a condition has only one rule, the condition is simply followed by that
        !          6803: rule.  If it has several rules, they are placed after the condition between
        !          6804: the keywords <TT>BEGIN</TT> and <TT>END</TT>.</P>
        !          6805: <PRE>
        !          6806:    ConditionSeq = Condition [ 'AND' Condition ] .
        !          6807:    Condition    = [ 'NOT' ] [ 'Target' ] Cond .
        !          6808:    Cond         = CondElem / CondAscend .
        !          6809:    CondElem     ='FirstRef' / 'LastRef' /
        !          6810:                  'ExternalRef' /
        !          6811:                  'Defined' /
        !          6812:                  'Alphabet' '=' Alphabet /
        !          6813:                  'ComputedPage' / 'StartPage' / 
        !          6814:                  'UserPage' / 'ReminderPage' /
        !          6815:                  'Empty' /
        !          6816:                  'FirstAttr' / 'LastAttr' .
        !          6817:    CondAscend   = [ Ascend ] CondOnAscend .
        !          6818:    Ascend       = '*' / 'Parent' / 'Ancestor' LevelOrType .
        !          6819:    LevelOrType  = CondRelLevel / ElemID [ ExtStruct ] .
        !          6820:    CondRelLevel = NUMBER .
        !          6821:    CondOnAscend ='First' / 'Last' /
        !          6822:                  'Referred' / 
        !          6823:                   [ 'Immediately' ] 'Within' [ NumParent ]
        !          6824:                                     ElemID [ ExtStruct ] /
        !          6825:                  'Attributes' /
        !          6826:                   AttrID [ RelatAttr ] /
        !          6827:                  'Presentation' /
        !          6828:                   PresRule /
        !          6829:                  'Comment' .                  
        !          6830:    NumParent    = [ GreaterLess ] NParent .
        !          6831:    GreaterLess  = '>' / '&lt;' .
        !          6832:    NParent      = NUMBER.
        !          6833:    ExtStruct    = '(' ElemID ')' .
        !          6834:    Alphabet     = NAME .
        !          6835:    RelatAttr    ='=' Value /
        !          6836:                  '>' [ '-' ] Minimum /
        !          6837:                  '&lt;' [ '-' ] Maximum /
        !          6838:                  'IN' '[' [ '-' ] MinInterval '..'
        !          6839:                           [ '-' ] MaxInterval ']' .
        !          6840:    Value        = [ '-' ] IntegerVal / TextVal / AttrValue .
        !          6841:    Minimum      = NUMBER .
        !          6842:    Maximum      = NUMBER .
        !          6843:    MinInterval  = NUMBER .
        !          6844:    MaxInterval  = NUMBER .
        !          6845:    IntegerVal   = NUMBER .
        !          6846:    TextVal      = STRING .
        !          6847:    AttrValue    = NAME .
        !          6848: </PRE>
        !          6849: <BLOCKQUOTE class="example">
        !          6850: <P>
        !          6851: <STRONG>Example:</STRONG></P>
        !          6852: <P>
        !          6853: Suppose that after each element of type Section_Title it is useful toproduce
        !          6854: the text <TT>\label{SectX}</TT>where <TT>X</TT>represents thesection number,
        !          6855: but only if the section is designated by one or morereferences in the
        !          6856: document.  The following conditional rule producesthis effect:</P>
        !          6857: <PRE>
        !          6858: RULES
        !          6859:   Section_Title :
        !          6860:     IF Referred
        !          6861:       Create ('\label{Sect' Value(UniqueSectNum)
        !          6862:               '}\12') After;
        !          6863: </PRE>
        !          6864: <P>
        !          6865: (the declaration of the <A href="#prestrans"><TT>UniqueSectNum</TT>
        !          6866: counter</A>is given above).  The string <TT>\12</TT>represents aline
        !          6867: break.</P>
        !          6868: </BLOCKQUOTE>
        !          6869: <BLOCKQUOTE class="example">
        !          6870: <P>
        !          6871: <STRONG>Example:</STRONG></P>
        !          6872: <P>
        !          6873: Suppose that for elements of the Elmnt type it would be useful toproduce a
        !          6874: character indicating the value of the numeric attributeLevel associated with
        !          6875: the element: an  ``A'' for all values of Levelless than 3, a ``B'' for values
        !          6876: between 3 and 10 and a ``C'' forvalues greater than 10.  This can be achieved
        !          6877: by writing the followingrules for the Elmnt type:</P>
        !          6878: <PRE>
        !          6879: RULES
        !          6880:   Elmnt :
        !          6881:     BEGIN
        !          6882:     IF Level &lt; 3
        !          6883:       Create 'A';
        !          6884:     IF Level IN [3..10]
        !          6885:       Create 'B';
        !          6886:     IF Level > 10
        !          6887:       Create 'C';
        !          6888:     END;
        !          6889: </PRE>
        !          6890: </BLOCKQUOTE>
        !          6891: </DIV>
        !          6892: </DIV>
        !          6893: 
        !          6894: <DIV class="subsection">
        !          6895: <H3>Translation rules</H3>
        !          6896: 
        !          6897: <P>
        !          6898: Thirteen types of translation rules can be associated with element types and
        !          6899: attribute values.  They are the <TT>Create</TT>, <TT>Write</TT>,
        !          6900: <TT>Read</TT>, <TT>Include</TT>, <TT>Get</TT>, <TT>Copy</TT>, <TT>Use</TT>,
        !          6901: <TT>Remove</TT>, <TT>NoTranslation</TT>, <TT>NoLineBreak</TT>,
        !          6902: <TT>ChangeMainFile</TT>, <TT>Set</TT>, <TT>Add</TT> rules. Each rule has its
        !          6903: own syntax, although they are all based on very similar models.</P>
        !          6904: <PRE>
        !          6905:      SimpleRule = 'Create' [ 'IN' VarID ] Object
        !          6906:                         [ Position ] ';' /
        !          6907:                   'Write' Object [ Position ] ';' /
        !          6908:                   'Read' BufferID [ Position ] ';' /
        !          6909:                   'Include' File [ Position ] ';' /
        !          6910:                   'Get' [ RelPosition ] ElemID 
        !          6911:                         [ ExtStruct ] 
        !          6912:                         [ Position ] ';' /
        !          6913:                   'Copy' [ RelPosition ] ElemID 
        !          6914:                         [ ExtStruct ] 
        !          6915:                         [ Position ] ';' /
        !          6916:                   'Use' TrSchema [ 'For' ElemID ] ';' /
        !          6917:                   'Remove' ';' /
        !          6918:                   'NoTranslation' ';' /
        !          6919:                   'NoLineBreak' ';' /
        !          6920:                   'ChangeMainFile' VarID [ Position ] ';' /
        !          6921:                   'Set' CounterID InitValue
        !          6922:                         [ Position ] ';' /
        !          6923:                   'Add' CounterID Increment
        !          6924:                         [ Position ] ';' .
        !          6925: </PRE>
        !          6926: </DIV>
        !          6927: 
        !          6928: <DIV class="subsection">
        !          6929: <H3><A name="create">The <TT>Create</TT> rule</A></H3>
        !          6930: 
        !          6931: <P>
        !          6932: The most frequently used rule is undoubtedly the <TT>Create</TT> rule, which
        !          6933: generates fixed or variable text (called an <EM>object</EM>) in the output
        !          6934: file.  The generated text can be made to appear either before or after the
        !          6935: content of the element to which the rule applies. The rule begins with the
        !          6936: <TT>Create</TT> keyword, followed by a specifier for the object and a keyword
        !          6937: (<TT>Before</TT> or <TT>After</TT>) indicating the position of the generated
        !          6938: text (<A href="#order">before or after</A> the element's content).  If the
        !          6939: position is not indicated, the object will be generated before the element's
        !          6940: content.  This rule, like all translation rules, is terminated by a
        !          6941: semicolon.</P>
        !          6942: <P>
        !          6943: The <TT>Create</TT> keyword can be followed by the <TT>IN</TT> keyword and by
        !          6944: the name of a variable.  This means that the text generated by the rule must
        !          6945: not be written in the main output file, but in the file whose name is
        !          6946: specified by the variable.</P>
        !          6947: <P>
        !          6948: This allows the translation program to generate text in different files during
        !          6949: the same run. These files do not need to be explicetely declared or opened.
        !          6950: They do not need to be closed either. As soon as the translation program
        !          6951: executes a <TT>Create</TT> rule for a file that is not yet open, it opens the
        !          6952: file. These files are closed when the translation is finished.</P>
        !          6953: <PRE>
        !          6954:                'Create' [ 'IN' VarID ] Object
        !          6955:                         [ Position ] ';'
        !          6956:      Object   = ConstID / CharString /
        !          6957:                 BufferID /
        !          6958:                 VarID /
        !          6959:                '(' Function &lt; Function > ')' /
        !          6960:                 AttrID /
        !          6961:                'Value' /
        !          6962:                'Content' /
        !          6963:                'Comment' / 
        !          6964:                'Attributes' /
        !          6965:                'Presentation' /
        !          6966:                'RefId' /
        !          6967:                'PairId' /
        !          6968:                'FileDir' /
        !          6969:                'FileName' /
        !          6970:                'Extension' /
        !          6971:                'DocumentName' /
        !          6972:                'DocumentDir' /
        !          6973:                 [ 'Referred' ] ReferredObject .
        !          6974:      Position ='After' / 'Before' .
        !          6975: 
        !          6976:      ReferredObject = VarID /
        !          6977:                 ElemID [ ExtStruct ] /
        !          6978:                'RefId' /
        !          6979:                'DocumentName' /
        !          6980:                'DocumentDir' .
        !          6981: </PRE>
        !          6982: <P>
        !          6983: The object to be generated can be:</P>
        !          6984: <UL>
        !          6985: <LI>a constant string, specified by its name if it is declared inthe schema's
        !          6986: <TT>CONST</TT>section, or given directly as a value betweenapostrophes;
        !          6987: <LI>the contents of a buffer, designated by the name of the buffer;
        !          6988: <LI>a variable, designated by its name if it is declared in thetranslation
        !          6989: schema's <TT>VAR</TT>section, or given directly betweenparentheses.  The text
        !          6990: generated is the value of that variableevaluated for the element to which the
        !          6991: rule applies.
        !          6992: <LI>the value of an attribute, if the element being translated has
        !          6993: thisattribute.  The attribute is specified by its name;
        !          6994: <LI>the value of a specific presentation rule.  This object can onlybe
        !          6995: generated if the translation rule is for a <A href="#prestransl">specific
        !          6996: presentation rule</A>.  It is specified by the <TT>Value</TT>keyword;
        !          6997: <LI>the element's content.  That is, the content of the leaves ofthe subtree
        !          6998: of the translated element.  This is specified by the<TT>Content</TT>keyword;
        !          6999: <LI>the comment attached to the element.  When the element doesn'thave a
        !          7000: comment, nothing is generated.  This is indicated by
        !          7001: the<TT>Comment</TT>keyword;
        !          7002: <LI>the translation of all attributes of the element (which isprimarily used
        !          7003: to apply the attribute translation rules<A href="#order">before</A>those of
        !          7004: the element type).  This isspecified by the <TT>Attributes</TT>keyword.
        !          7005: <LI>the translation of all of the element's specific presentationrules (which
        !          7006: is primarily used to apply the translation rules for thespecific presentation
        !          7007: rules <A href="#order">before</A>those of theelement or its attributes).  This
        !          7008: option is specifiedby the <TT>Presentation</TT>keyword;
        !          7009: <LI>The value of the reference's identifier.<BR>Thot associates a
        !          7010: uniqueidentifier with eachelement in a document.  Thisidentifier (called
        !          7011: <EM>reference's identifier</EM>or <EM>label</EM>) is acharacter string
        !          7012: containing the letter `L' followed by digits.  Thot uses itin references for
        !          7013: identifying the referred element.<BR>The <TT>RefId</TT>keyword produces the
        !          7014: reference's identifierof the element to which the translation rule is applied,
        !          7015: or the reference'sidentifier of its first ancestor that is referred by a
        !          7016: referenceor that can be referred by a reference.
        !          7017: <LI>the value of a mark pair's unique identifier.  This may only be usedfor <A
        !          7018: href="#pairs">mark pairs</A>and is indicated by the<TT>PairId</TT>keyword.
        !          7019: <LI>the directory containing the file being generated (this stringincludes an
        !          7020: ending '/', if it is not empty).  This is indicated by
        !          7021: the<TT>FileDir</TT>keyword.
        !          7022: <LI>the name of the file being generated (only the name, without thedirectory
        !          7023: and without the extension). This is indicated by the <TT>FileName</TT>keyword.
        !          7024: <LI>the extension of the file being generated (this string starts with adot,
        !          7025: if it is not empty).  This is indicated by the <TT>Extension</TT>keyword.
        !          7026: <LI>the name of the document being translated.  This is indicated bythe
        !          7027: <TT>DocumentName</TT>keyword.
        !          7028: <LI>the directory containing the document being translated.  This isindicated
        !          7029: by the <TT>DocumentDir</TT>keyword.
        !          7030: </UL>
        !          7031: <P>
        !          7032: When the rule applies to a reference (an element or an attribute defined as a
        !          7033: reference in the structure schema), it can generate a text related to the
        !          7034: element referred by that reference.  The rule name is then followed the
        !          7035: <TT>Referred</TT> keyword and a specification of the object to be generated
        !          7036: for the referred element.  This specification can be:</P>
        !          7037: <UL>
        !          7038: <LI>the name of a variable.  The rule generates the value of thatvariable,
        !          7039: computed for the referred element.
        !          7040: <LI>an element type.  The rule generates the translation of the elementof that
        !          7041: type, which is in the subtree of the referred element.  If thiselement is not
        !          7042: defined in the structure schema which corresponds to thetranslation schema
        !          7043: (that is, an object defined in another schema), theelement's type name must be
        !          7044: followed by the name of its structureschema between parentheses.
        !          7045: <LI>the <TT>RefId</TT>keyword.  The rule generates the reference'sidentifier
        !          7046: of the referred element.
        !          7047: <LI>the <TT>DocumentName</TT>keyword.  The rule generates the name ofthe
        !          7048: document to which the referred element belongs.
        !          7049: <LI>the <TT>DocumentDir</TT>keyword.  The rule generates the name ofthe
        !          7050: directory that contains the document of the referred element.
        !          7051: </UL>
        !          7052: </DIV>
        !          7053: 
        !          7054: <DIV class="subsection">
        !          7055: <H3><A name="writerule">The <TT>Write</TT> rule</A></H3>
        !          7056: 
        !          7057: <P>
        !          7058: The <TT>Write</TT> has the same syntax as the <TT>Create</TT> rule.  It also
        !          7059: produces the same effect, but the generated text is displayed on the user's
        !          7060: terminal during the translation of the document, instead of being produced in
        !          7061: the translated document.  This is useful for helping the user keep track of
        !          7062: the progress of the translation and for prompting the user on the terminal for
        !          7063: input required by the <TT>Read</TT> rule.</P>
        !          7064: <PRE>
        !          7065:                'Write' Object [ Position ] ';'
        !          7066: </PRE>
        !          7067: <P>
        !          7068: Notice: if the translator is launched by the editor (by the ``Save as''
        !          7069: command), messages produced by the <TT>Write</TT> rule are not displayed.</P>
        !          7070: <BLOCKQUOTE class="example">
        !          7071: <P>
        !          7072: <STRONG>Example:</STRONG></P>
        !          7073: <P>
        !          7074: To make the translator display the number of each section beingtranslated on
        !          7075: the user's terminal, the following rule is specified forthe
        !          7076: <TT>Section</TT>element type:</P>
        !          7077: <PRE>
        !          7078: Section : BEGIN
        !          7079:           Write VarSection;
        !          7080:           ...
        !          7081:           END;
        !          7082: </PRE>
        !          7083: <P>
        !          7084: (see <A href="#varsectexample">above</A>for the definition of
        !          7085: the<TT>VarSection</TT>variable).</P>
        !          7086: <P>
        !          7087: To display text on the terminal before issuing a read operation with the
        !          7088: <TT>Read</TT> rule, the following rule is used:</P>
        !          7089: <PRE>
        !          7090: BEGIN
        !          7091: Write 'Enter the name of the destination: ';
        !          7092: ...
        !          7093: END;
        !          7094: </PRE>
        !          7095: </BLOCKQUOTE>
        !          7096: </DIV>
        !          7097: 
        !          7098: <DIV class="subsection">
        !          7099: <H3><A name="readrule">The <TT>Read</TT> rule</A></H3>
        !          7100: 
        !          7101: <P>
        !          7102: The <TT>Read</TT> rule reads text from the terminal during the translation of
        !          7103: the document and saves the text read in one of the buffers declared in the
        !          7104: <TT>BUFFERS</TT> section of the schema.  The buffer to be used is indicated by
        !          7105: its name, after the <TT>READ</TT> keyword.  This name can be followed, as in
        !          7106: the <TT>Create</TT> and <TT>Write</TT> rules, by a keyword indicating if the
        !          7107: read operation must be performed <TT>Before</TT> or <TT>After</TT> the
        !          7108: translation of the element's content.  If this keyword is absent, the read
        !          7109: operation is done beforehand.  The text is read into the buffer and remains
        !          7110: there until a rule using the same buffer --- possibly the same rule --- is
        !          7111: applied.</P>
        !          7112: <PRE>
        !          7113:                'Read' BufferID [ Position ] ';'
        !          7114: </PRE>
        !          7115: <BLOCKQUOTE class="example">
        !          7116: <P>
        !          7117: <STRONG>Example:</STRONG></P>
        !          7118: <P>
        !          7119: The following set of rules tells the user that the translator iswaiting for
        !          7120: the entry of some text, reads this text into a buffer andcopies the text into
        !          7121: the translated document.</P>
        !          7122: <PRE>
        !          7123: BEGIN
        !          7124: Write 'Enter the name of the destination: ';
        !          7125: Read DestName;
        !          7126: Create DestName;
        !          7127: ...
        !          7128: END;
        !          7129: </PRE>
        !          7130: <P>
        !          7131: (see <A href="#destname">above</A>the definition of <TT>DestName</TT>).</P>
        !          7132: </BLOCKQUOTE>
        !          7133: </DIV>
        !          7134: 
        !          7135: <DIV class="subsection">
        !          7136: <H3>The <TT>Include</TT> rule</H3>
        !          7137: 
        !          7138: <P>
        !          7139: The <TT>Include</TT> rule, like the <TT>Create</TT> rule, is used to produce
        !          7140: text in the translated document.  It inserts constant text which is not
        !          7141: defined in the translation schema, but is instead taken from a file.  The
        !          7142: file's name  is specified after the <TT>Include</TT> keyword, either directly
        !          7143: as a character string between apostrophes or as the name of one of the buffers
        !          7144: declared in the <TT>BUFFERS</TT> section of the schema.  In the latter case,
        !          7145: the buffer is assumed to contain the file's name.  This can be used when the
        !          7146: included file's name is known only at the moment of translation.  This only
        !          7147: requires that the <TT>Include</TT> rule is preceded by a <TT>Read</TT> rule
        !          7148: which puts the name of the file desired by the user into the buffer.</P>
        !          7149: <P>
        !          7150: Like the other rules, it is possible to specify whether the inclusion will
        !          7151: occur before or after the element's content, with the default being before.
        !          7152: The file inclusion is only done at the moment of translation, not during the
        !          7153: compilation of the translation schema. Thus, the file to be included need not
        !          7154: exist during the compilation, but it must be accessible at the time of
        !          7155: translation.  Its contents can also be modified between two translations, thus
        !          7156: producing different results, even if neither the document or the translation
        !          7157: schema are modified.</P>
        !          7158: <P>
        !          7159: During translation, the file to be included is searched for along the schema
        !          7160: directory path (indicated by the environment variable <TT>THOTSCH</TT>).  The
        !          7161: file name is normally only composed of a simple name, without specification of
        !          7162: a complete file path.</P>
        !          7163: <PRE>
        !          7164:                  'Include' File [ Position ] ';'
        !          7165:      File      = FileName / BufferID .
        !          7166:      FileName  = STRING .
        !          7167: </PRE>
        !          7168: <BLOCKQUOTE class="example">
        !          7169: <P>
        !          7170: <STRONG>Example:</STRONG></P>
        !          7171: <P>
        !          7172: Suppose that it is desirable to print documents of the Article classwith a
        !          7173: formatter which requires a number of declarations anddefinitions at the
        !          7174: beginning of the file.  The <TT>Include</TT>rule canbe used to achieve this.
        !          7175: All the declarations and definitions areplaced in a file called
        !          7176: <TT>DeclarArt</TT>and then the <TT>Article</TT>element type is given the
        !          7177: following rule:</P>
        !          7178: <PRE>
        !          7179: Article : BEGIN
        !          7180:           Include 'DeclarArt' Before;
        !          7181:           ...
        !          7182:           END;
        !          7183: </PRE>
        !          7184: </BLOCKQUOTE>
        !          7185: </DIV>
        !          7186: 
        !          7187: <DIV class="subsection">
        !          7188: <H3>The <TT>Get</TT> rule</H3>
        !          7189: 
        !          7190: <P>
        !          7191: The <TT>Get</TT> rule is used to change the order in which the elements appear
        !          7192: in the translated document.  More precisely, it produces  the translation of a
        !          7193: specified element before or after the translation of the content of the
        !          7194: element to which the rule applies.  The <TT>Before</TT> and <TT>After</TT>
        !          7195: keywords are placed at the end of the rule to specify whether the operation
        !          7196: should be performed before or after translation of the rule's element (the
        !          7197: default is before). The type of the element to be moved must be specified
        !          7198: after the <TT>Get</TT> keyword, optionally preceded by a keyword indicating
        !          7199: where the element will be found in the logical structure of the document:</P>
        !          7200: <DL>
        !          7201: <DT><TT>Included</TT></DT>
        !          7202: <DD>The element to be moved is the first element of the indicated typewhich is
        !          7203: found inside the element to which the rule applies.
        !          7204: </DD>
        !          7205: <DT><TT>Referred</TT></DT>
        !          7206: <DD>This keyword can only be used if the rule applies to a referenceelement.
        !          7207: The element to be moved is either the element designated bythe reference (if
        !          7208: that element is of the specified type), or the firstelement of the desired
        !          7209: type contained within the element designated bythe reference.
        !          7210: </DD>
        !          7211: <DT>no keyword</DT>
        !          7212: <DD>If the element to be moved is an associated element, defined in the<A
        !          7213: href="#assocelem"><TT>ASSOC</TT> section</A>of the structure schema,all
        !          7214: associated elements of this type whichhave not been translated yet are then
        !          7215: translated.  Certain elementsmay in fact have already been translated by a
        !          7216: <TT>Get Referred</TT>rule.
        !          7217: <P>
        !          7218: If the element to be moved is not an associated element, the translator takes
        !          7219: the first element of the indicated type from among the siblings of the rule's
        !          7220: element.  This is primarily used to change the order of the components of an
        !          7221: aggregate.</P>
        !          7222: </DD>
        !          7223: </DL>
        !          7224: <P>
        !          7225: If the element to be moved is defined in a structure schema which is not the
        !          7226: one which corresponds to the translation schema (in the case of an included
        !          7227: object with a different schema), the type name of this element must be
        !          7228: followed, between parentheses, by the name of the structure schema which
        !          7229: defines it.</P>
        !          7230: <PRE>
        !          7231:                   'Get' [ RelPosition ] ElemID 
        !          7232:                         [ ExtStruct ]
        !          7233:                         [ Position ] ';' /
        !          7234:      RelPosition ='Included' / 'Referred' .
        !          7235:      ExtStruct   = '(' ElemID ')' .
        !          7236: </PRE>
        !          7237: <P>
        !          7238: The <TT>Get</TT> rule has no effect if the element which it is supposed to
        !          7239: move has already been translated.  Thus, the element will not be duplicated.
        !          7240: It is generally best to associate the rule with the first element which will
        !          7241: be encountered by the translator in its traversal of the document.  Suppose an
        !          7242: aggregate has two elements <TT>A</TT> and <TT>B</TT>, with <TT>A</TT>
        !          7243: appearing first in the logical structure.  To permute these two elements, a
        !          7244: <TT>Get B before</TT> rule should be associated with the <TT>A</TT> element
        !          7245: type, not the inverse.  Similarly, a rule of the form <TT>Get Included X
        !          7246: After</TT>, even though syntactically correct, makes no sense since, by the
        !          7247: time it will be applied, after the translation of the contents of the element
        !          7248: to which it is attached, the <TT>X</TT> element will already have been
        !          7249: translated.</P>
        !          7250: <P>
        !          7251: The <TT>Get</TT> rule is the only way to obtain the translation of the
        !          7252: associated elements.  In fact, the translator only traverses the primary tree
        !          7253: of the document and thus does not translate the associated elements, except
        !          7254: when the translation is explicitly required by a <TT>Get Referred Type</TT> or
        !          7255: <TT>Get Type</TT> rule where <TT>Type</TT> is an associated element type.</P>
        !          7256: <BLOCKQUOTE class="example">
        !          7257: <P>
        !          7258: <STRONG>Example:</STRONG></P>
        !          7259: <P>
        !          7260: The structure schema defined figures as associated element which arecomposed
        !          7261: of some content and a caption.  Moreover, it is possible to makereferences to
        !          7262: figures, using elements of the <TT>RefFigure</TT>type:</P>
        !          7263: <PRE>
        !          7264:      ...
        !          7265:      RefFigure = REFERENCE(Figure);
        !          7266: ASSOC
        !          7267:      Figure = BEGIN
        !          7268:               Content = NATURE;
        !          7269:               Caption = Text;
        !          7270:               END;
        !          7271:      ...
        !          7272: </PRE>
        !          7273: <P>
        !          7274: Suppose it would be useful to make a figure appear in the translateddocument
        !          7275: at the place in the text where the first reference to thefigure is made.  If
        !          7276: some figures are not referenced, then they wouldappear at the end of the
        !          7277: document.  Also, each figure's caption shouldappear before the content.  The
        !          7278: following rules in the translationschema will produce this result:</P>
        !          7279: <PRE>
        !          7280: Article :   BEGIN
        !          7281:             ...
        !          7282:             Get Figures After;
        !          7283:             END;
        !          7284: RefFigure : BEGIN
        !          7285:             If FirstRef Get Referred Figure;
        !          7286:             ...
        !          7287:             END;
        !          7288: Content :   BEGIN
        !          7289:             Get Caption Before;
        !          7290:             ...
        !          7291:             END;
        !          7292: </PRE>
        !          7293: </BLOCKQUOTE>
        !          7294: </DIV>
        !          7295: 
        !          7296: <DIV class="subsection">
        !          7297: <H3>The <TT>Copy</TT> rule</H3>
        !          7298: 
        !          7299: <P>
        !          7300: Like the <TT>Get</TT> rule, the <TT>Copy</TT> rule generates the translation
        !          7301: of a specified element, but it acts even if the element has already been
        !          7302: translated and it allows to copy it or to translate it later. Both rules have
        !          7303: the same syntax.</P>
        !          7304: <PRE>
        !          7305:               'Copy' [ RelPosition ] ElemID 
        !          7306:                      [ ExtStruct ] [ Position ] ';'
        !          7307: </PRE>
        !          7308: </DIV>
        !          7309: 
        !          7310: <DIV class="subsection">
        !          7311: <H3>The <TT>Use</TT> rule</H3>
        !          7312: 
        !          7313: <P>
        !          7314: The <TT>Use</TT> rule specifies the translation schema to be applied to
        !          7315: objects of a certain class that are part of the document.  This rule only
        !          7316: appears in the rules for the root element of the document (the first type
        !          7317: defined after the <TT>STRUCT</TT> keyword in the structure schema) or the
        !          7318: rules of an element defined by an external structure (by another structure
        !          7319: schema).  Also, the <TT>Use</TT> rule cannot be conditional.</P>
        !          7320: <P>
        !          7321: If the rule is applied to an element defined by an external structure, the
        !          7322: <TT>Use</TT> keyword is simply followed by the name of the translation schema
        !          7323: to be used for element constructed  according to that external structure.  If
        !          7324: the rule is applied to the document's root element, it is formed by the
        !          7325: <TT>Use</TT> keyword followed by the translation schema's name, the
        !          7326: <TT>For</TT> keyword and the name of the external structure to which the
        !          7327: indicated translation schema should be applied.</P>
        !          7328: <PRE>
        !          7329:                'Use' TrSchema [ 'For' ElemID ] ';'
        !          7330:      TrSchema = NAME .
        !          7331: </PRE>
        !          7332: <P>
        !          7333: If no <TT>Use</TT> rule defines the translation schema to be used for an
        !          7334: external structure which appears in a document, the translator asks the user,
        !          7335: during the translation process, which schema should be used. Thus, it is not
        !          7336: necessary to give the translation schema a <TT>Use</TT> rule for every
        !          7337: external structure used, especially when the choice of translation schemas is
        !          7338: to be left to the user.</P>
        !          7339: <P>
        !          7340: Notice: if the translator is launched by the editor (by the ``Save as''
        !          7341: command), prompts are not displayed.</P>
        !          7342: <BLOCKQUOTE class="example">
        !          7343: <P>
        !          7344: <STRONG>Example:</STRONG></P>
        !          7345: <P>
        !          7346: The <TT>Article</TT>structure schema uses the
        !          7347: <TT>Formula</TT>externalstructure, defined by another structure schema, for
        !          7348: mathematical formulas:</P>
        !          7349: <PRE>
        !          7350: STRUCTURE Article;
        !          7351:    ...
        !          7352: STRUCT
        !          7353:    Article = ...
        !          7354:    ...
        !          7355:    Formula_in_text  = Formula;
        !          7356:    Isolated_formula = Formula;
        !          7357:    ...
        !          7358: END
        !          7359: </PRE>
        !          7360: <P>
        !          7361: Suppose that it would be useful to use the <TT>FormulaT</TT>translationschema
        !          7362: for the formulas of an article.  This can be expressed in twodifferent ways in
        !          7363: the <TT>Article</TT>class translation schema, usingthe rules:</P>
        !          7364: <PRE>
        !          7365: RULES
        !          7366:     Article :
        !          7367:        Use FormulaT for Formula;
        !          7368: </PRE>
        !          7369: <P>
        !          7370: or:</P>
        !          7371: <PRE>
        !          7372: RULES
        !          7373:     ...
        !          7374:     Formula :
        !          7375:        Use FormulaT;
        !          7376: </PRE>
        !          7377: </BLOCKQUOTE>
        !          7378: </DIV>
        !          7379: 
        !          7380: <DIV class="subsection">
        !          7381: <H3><A name="remove">The <TT>Remove</TT> rule</A></H3>
        !          7382: 
        !          7383: <P>
        !          7384: The <TT>Remove</TT> rule indicates that nothing should be generated, in the
        !          7385: translated document, for the content of the element to which the rule applies.
        !          7386: The content of that element is simply ignored by the translator.  This does
        !          7387: not prevent the generation of text for the element itself, using the
        !          7388: <TT>Create</TT> or <TT>Include</TT> rules, for example.</P>
        !          7389: <P>
        !          7390: The <TT>Remove</TT> rule is simply written with the <TT>Remove</TT> keyword.
        !          7391: It is terminated, like all rules, by a semicolon.</P>
        !          7392: <PRE>
        !          7393:                'Remove' ';'
        !          7394: </PRE>
        !          7395: </DIV>
        !          7396: 
        !          7397: <DIV class="subsection">
        !          7398: <H3><A name="notrans">The <TT>NoTranslation</TT> rule</A></H3>
        !          7399: 
        !          7400: <P>
        !          7401: The <TT>NoTranslation</TT> rule indicates to the translator that it must not
        !          7402: translate the content of the leaves of the element to which it applies. In
        !          7403: contrast to the <TT>Remove</TT> rule, it does not suppress the content of the
        !          7404: element, but it inhibits the translation of character strings, symbols, and
        !          7405: graphical elements contained in the element.  These are retrieved so that
        !          7406: after the translation of the document, the rules of the <A
        !          7407: href="#texttrans"><TT>TEXTTRANSLATE</TT>, <TT>SYMBTRANSLATE</TT> and
        !          7408: <TT>GRAPHTRANSLATE</TT> sections</A> will not be applied to them.</P>
        !          7409: <P>
        !          7410: The <TT>NoTranslation</TT> rule is written with the <TT>NoTranslation</TT>
        !          7411: keyword followed by a semicolon.</P>
        !          7412: <PRE>
        !          7413:                'NoTranslation' ';'
        !          7414: </PRE>
        !          7415: </DIV>
        !          7416: 
        !          7417: <DIV class="subsection">
        !          7418: <H3><A name="nolinebreak">The <TT>NoLineBreak</TT> rule</A></H3>
        !          7419: 
        !          7420: <P>
        !          7421: The <TT>NoLineBreak</TT> rule indicates to the translator that it must not
        !          7422: generate additional line breaks in the output produced for the element to
        !          7423: which it applies.  This is as if it was an <A href="#linelength">instruction
        !          7424: <TT>LINELENGTH 0;</TT></A> at the beginning of the translation schema, but
        !          7425: only for the current element.</P>
        !          7426: <P>
        !          7427: The <TT>NoLineBreak</TT> rule is written with the <TT>NoLineBreak</TT> keyword
        !          7428: followed by a semicolon.</P>
        !          7429: <PRE>
        !          7430:                'NoLineBreak' ';'
        !          7431: </PRE>
        !          7432: </DIV>
        !          7433: 
        !          7434: <DIV class="subsection">
        !          7435: <H3><A name="changemainfile">The <TT>ChangeMainFile</TT> rule</A></H3>
        !          7436: 
        !          7437: <P>
        !          7438: When the translation program starts, it opens a main output file, whose name
        !          7439: is given as a parameter of the program. All <A href="#create"><TT>Create</TT>
        !          7440: rules</A> without explicit indication of the output file write sequentially in
        !          7441: this file. When a <TT>ChangeMainFile</TT> rule is executed, the main output
        !          7442: file is closed and it is replaced by a new one, whose name is specified in the
        !          7443: <TT>ChangeMainFile</TT> rule. The <TT>Create</TT> rules without indication of
        !          7444: the output file that are then executed write in this new file. Several
        !          7445: <TT>ChangeMainFile</TT> rules can be executed during the same translation, for
        !          7446: dividing the main output into several files.</P>
        !          7447: <P>
        !          7448: This rule is written with the <TT>ChangeMainFile</TT> keyword followed by the
        !          7449: name of a variable that specify the name of the new main file. The keyword
        !          7450: <TT>Before</TT> or <TT>After</TT> can be placed at the end of the rule to
        !          7451: specify whether the operation should be performed before or after translation
        !          7452: of the rule's element (the default is before). This rule, like all translation
        !          7453: rules, is terminated by a semicolon.</P>
        !          7454: <PRE>
        !          7455:                'ChangeMainFile' VarID [ Position ] ';'
        !          7456: </PRE>
        !          7457: <BLOCKQUOTE class="example">
        !          7458: <P>
        !          7459: <STRONG>Example:</STRONG></P>
        !          7460: <P>
        !          7461: To generate the translation of each section in a different file,the following
        !          7462: rule can be associated with type <TT>Section</TT>.That rule uses the <A
        !          7463: href="#varoutputfile"><TT>VarOutpuFile</TT> variable</A>defined above.</P>
        !          7464: <PRE>
        !          7465:      Section:
        !          7466:          ChangeMainFile VarOutpuFile Before;
        !          7467: </PRE>
        !          7468: <P>
        !          7469: If <TT>output.txt</TT>is the name of the output file specified whenstarting
        !          7470: the translation program, translated sections are writtenin files
        !          7471: <TT>output1.txt</TT>, <TT>output2.txt</TT>, etc.</P>
        !          7472: </BLOCKQUOTE>
        !          7473: </DIV>
        !          7474: 
        !          7475: <DIV class="subsection">
        !          7476: <H3><A name="setandadd">The <TT>Set</TT> and <TT>Add</TT> rules</A></H3>
        !          7477: 
        !          7478: <P>
        !          7479: The <TT>Set</TT> and <TT>Add</TT> rules are used for modifying the value of
        !          7480: counters that have no <A href="#counters">counting function</A>.  Only this
        !          7481: type of counter can be used in the <TT>Set</TT> and <TT>Add</TT> rules.</P>
        !          7482: <P>
        !          7483: Both rules have the same syntax: after the keyword <TT>Set</TT> or
        !          7484: <TT>Add</TT> appear the counter name and the value to assign to the counter
        !          7485: (<TT>Set</TT> rule) or the value to be added to the counter (<TT>Add</TT>
        !          7486: rule). The keyword <TT>Before</TT> or <TT>After</TT> can follo9w that value to
        !          7487: indicate when the rule must be applied: before or after the element's content
        !          7488: is translated. By default, <TT>Before</TT> is assumed. A semicolon terminates
        !          7489: the rule.</P>
        !          7490: <PRE>
        !          7491:                'Set' CounterID InitValue [ Position ] ';' /
        !          7492:                'Add' CounterID Increment [ Position ] ';'
        !          7493: </PRE>
        !          7494: </DIV>
        !          7495: 
        !          7496: <DIV class="subsection">
        !          7497: <H3><A name="order">Rule application order</A></H3>
        !          7498: 
        !          7499: <P>
        !          7500: The translator translates the elements which comprise the document in the
        !          7501: order induced by the tree structure, except when the <TT>Get</TT> rule is used
        !          7502: to change the order of translation.  For each element, the translator first
        !          7503: applies the rules specified for the element's type that must be applied before
        !          7504: translation of the element's content (rules ending with the <TT>Before</TT>
        !          7505: keyword or which have no position keyword).  If several rules meet these
        !          7506: criteria, the translator applies them in the order in where they appear in the
        !          7507: translation schema.</P>
        !          7508: <P>
        !          7509: It then applies all <A href="#transattr">rules for the attributes</A> which
        !          7510: the element has and which must be applied before the translation of the
        !          7511: element's content (rules ending with the <TT>Before</TT> keyword or which have
        !          7512: no position keyword).  For one attribute value, the translator applies the
        !          7513: rules in the order in which they are defined in the translation schema.</P>
        !          7514: <P>
        !          7515: The same procedure is followed with translation rules for specific
        !          7516: presentations.</P>
        !          7517: <P>
        !          7518: Next, the element's content is translated, as long as a <TT>Remove</TT> rule
        !          7519: does not apply.</P>
        !          7520: <P>
        !          7521: In the next step, the translator applies rules for the specific presentation
        !          7522: of the element that are to be applied after translation of the content (rules
        !          7523: which end with the <TT>After</TT> keyword).  The rules for each type of
        !          7524: presentation rule or each value are applied in the order in which the
        !          7525: translation appear in the schema.</P>
        !          7526: <P>
        !          7527: Then, the same procedure is followed for translation rules for attributes of
        !          7528: the element.</P>
        !          7529: <P>
        !          7530: Finally, the translator applies rules for the element which must be applied
        !          7531: after translation of the element's content.  These rules are applied in the
        !          7532: order that they appear in the translation schema.  When the translation of an
        !          7533: element is done, the translator procedes to translate the following
        !          7534: element.</P>
        !          7535: <P>
        !          7536: This order can be changed with the <TT>Attributes</TT> and
        !          7537: <TT>Presentation</TT> options of the <A href="#create"><TT>Create</TT>
        !          7538: rule</A>.</P>
        !          7539: </DIV>
        !          7540: 
        !          7541: <DIV class="subsection">
        !          7542: <H3><A name="transattr">Translation of logical attributes</A></H3>
        !          7543: 
        !          7544: <P>
        !          7545: After the rules for the element types, the translation schema defines rules
        !          7546: for attribute values.  This section begins with the <TT>ATTRIBUTES</TT>
        !          7547: keyword and is composed of a sequence of rule blocks each preceded by an
        !          7548: attribute name and an optional value or value range.</P>
        !          7549: <P>
        !          7550: If the attribute's name appears alone before the rule block, the rule are
        !          7551: applied to all element which have the attribute, no matter what value the
        !          7552: attribute has.  In this case, the attribute name is followed by a colon before
        !          7553: the beginning of the rule block.</P>
        !          7554: <P>
        !          7555: The attribute's name can be followed by the name of an element type between
        !          7556: parentheses.  This says, as in presentation schemas, that the rule block which
        !          7557: follows applies not to the element which has the attribute, but to its
        !          7558: descendants of the type indicated between the parentheses.</P>
        !          7559: <P>
        !          7560: If values are given after the attribute name (or after the name of the element
        !          7561: type), the rules are applied only when the attribute has the indicated values.
        !          7562: The same attribute can appear several times, with different values and
        !          7563: different translation rules.  Attribute values are indicated in the same way
        !          7564: as in <A href="#transcond">conditions</A> and are followed by a colon before
        !          7565: the block of rules.</P>
        !          7566: <P>
        !          7567: The rule block associated with an attribute is either a simple rule or a
        !          7568: sequence of rules delimited by the <TT>BEGIN</TT> and <TT>END</TT> keywords.
        !          7569: Note that rules associated with attribute values cannot be conditional.</P>
        !          7570: <P>
        !          7571: Translation rules are not required for all attributes (or their values)
        !          7572: defined in a structure schema.  Only those attributes for which a particular
        !          7573: action must be performed by the translator must have such rules.  The rules
        !          7574: that can be used are those described above, from <A
        !          7575: href="#create"><TT>Create</TT></A> to <A
        !          7576: href="#notrans"><TT>NoTranslation</TT></A>.</P>
        !          7577: <PRE>
        !          7578:      AttrSeq       = TransAttr &lt; TransAttr > .
        !          7579:      TransAttr     = AttrID [ '(' ElemID ')' ] 
        !          7580:                      [ RelatAttr ] ':' RuleSeq .
        !          7581:      AttrID        = NAME .
        !          7582:      ElemID        = NAME .
        !          7583: </PRE>
        !          7584: <BLOCKQUOTE class="example">
        !          7585: <P>
        !          7586: <STRONG>Example:</STRONG></P>
        !          7587: <P>
        !          7588: The structure defined the ``Language'' attribute which can take thevalues
        !          7589: ``French'' and ``English''.  To have the French parts of theoriginal document
        !          7590: removed and prevent the translation of the leavesof the English parts, the
        !          7591: following rules would be used:</P>
        !          7592: <PRE>
        !          7593: ATTRIBUTES
        !          7594:    Language=French :
        !          7595:       Remove;
        !          7596:    Language=English :
        !          7597:       NoTranslation;
        !          7598: </PRE>
        !          7599: </BLOCKQUOTE>
        !          7600: </DIV>
        !          7601: 
        !          7602: <DIV class="subsection">
        !          7603: <H3><A name="prestrans">Translation of specific presentations</A></H3>
        !          7604: 
        !          7605: <P>
        !          7606: After the rules for attributes, the translation schema defines rules for the
        !          7607: specific presentation.  This section begins with the <TT>PRESENTATION</TT>
        !          7608: keyword and is composed of a sequence of translation rule blocks each preceded
        !          7609: by a presentation rule name, optionally accompanied by a part which depends on
        !          7610: the particular presentation rule.</P>
        !          7611: <P>
        !          7612: Each of these translation rule blocks is applied when the translator operates
        !          7613: on an element which has a specific presentation rule of the type indicated at
        !          7614: the head of the block.  Depending on the type of the specific presentation
        !          7615: rule, it is possible to specify values of the presentation rule for which the
        !          7616: translation rule block should be applied.</P>
        !          7617: <P>
        !          7618: There are three categories of the presentation rules:</P>
        !          7619: <UL>
        !          7620: <LI>rules taking numeric values: <TT>Size</TT>,
        !          7621: <TT>Indent</TT>,<TT>LineSpacing</TT>, <TT>LineWeight</TT>,
        !          7622: <LI>rules whose values are taken from a predefined list (i.e. whose typeis an
        !          7623: enumeration): <TT>Adjust</TT>, <TT>Justify</TT>, <TT>Hyphenate,/TT>,
        !          7624: <TT>Style</TT>, <TT>Font</TT>, <TT>UnderLine</TT>, <TT>Thickness</TT>,
        !          7625: <TT>LineStyle</TT>,</TT>
        !          7626: <LI>rules whose value is a name: <TT>FillPattern</TT>,
        !          7627: <TT>Background</TT>,<TT>Foreground</TT>.
        !          7628: </UL>
        !          7629: <P>
        !          7630: For presentation rules of the first category, the values which provoke
        !          7631: application of the translation rules are indicated in the same manner as for
        !          7632: <A href="#relattr">numeric attributes</A>.  This can be either a unique value
        !          7633: or range of values.  For a unique value, the value (an integer) is simply
        !          7634: preceded by an equals sign.  Value ranges can be specified in one of three
        !          7635: ways:</P>
        !          7636: <UL>
        !          7637: <LI>all values less than a given value (this value is preceded by a``less
        !          7638: than'' sign (<TT>&lt;</TT>),
        !          7639: <LI>all values greater than a given value (this value is preceded by
        !          7640: a``greater than'' sign (<TT>></TT>),
        !          7641: <LI>all values falling in an interval, bounds included.  The rangeof values is
        !          7642: then specified <TT>IN [</TT>Minimum <TT>..</TT>Maximum<TT>]</TT>,where Minimum
        !          7643: and Maximum are integers.
        !          7644: </UL>
        !          7645: <P>
        !          7646: All numeric values can be negative, in which case the integer ispreceded by a
        !          7647: minus sign.  All values must be given in typographerspoints.</P>
        !          7648: <P>
        !          7649: For presentation rules whose values are taken from a predefined list, the
        !          7650: value which provokes application of the translation rules is simply indicated
        !          7651: by the equals sign followed by the name of the value.</P>
        !          7652: <P>
        !          7653: For presentation rules whose values are names, the value which provokes the
        !          7654: application of translation rules is simply indicated by the equals sign
        !          7655: followed by the name of the value.  The names of the fill patterns (the
        !          7656: <TT>FillPattern</TT> rule) and of the colors (the <TT>Foreground</TT> and
        !          7657: <TT>Background</TT> rules) used in Thot are the same as in the P language.</P>
        !          7658: <PRE>
        !          7659:      PresSeq        = PresTrans &lt; PresTrans > .
        !          7660:      PresTrans      = PresRule ':' RuleSeq .
        !          7661:      PresRule       = 'Size' [ PresRelation ] /
        !          7662:                       'Indent' [ PresRelation ] /
        !          7663:                       'LineSpacing' [ PresRelation ] /
        !          7664:                       'Adjust' [ '=' AdjustVal ] /
        !          7665:                       'Justify' [ '=' BoolVal ] /
        !          7666:                       'Hyphenate' [ '=' BoolVal ] /
        !          7667:                       'Style' [ '=' StyleVal ] /
        !          7668:                       'Font' [ '=' FontVal ] /
        !          7669:                       'UnderLine' [ '=' UnderLineVal ] /
        !          7670:                       'Thickness' [ '=' ThicknessVal ] /
        !          7671:                       'LineStyle' [ '=' LineStyleVal ] /
        !          7672:                       'LineWeight' [ PresRelation ] /
        !          7673:                       'FillPattern' [ '=' Pattern ] /
        !          7674:                       'Background' [ '=' Color ] /
        !          7675:                       'Foreground' [ '=' Color ] .
        !          7676: 
        !          7677:      PresRelation   = '=' PresValue /
        !          7678:                       '>' [ '-' ] PresMinimum /
        !          7679:                       '&lt;' [ '-' ] PresMaximum /
        !          7680:                       'IN' '[' [ '-' ] PresIntervalMin '..'
        !          7681:                               [ '-' ] PresIntervalMax ']' .
        !          7682:      AdjustVal      = 'Left' / 'Right' / 'VMiddle' / 
        !          7683:                       'LeftWithDots' .
        !          7684:      BoolVal        = 'Yes' / 'No' .
        !          7685:      StyleVal       = 'Bold' / 'Italics' / 'Roman' /
        !          7686:                       'BoldItalics' / 'Oblique' /
        !          7687:                       'BoldOblique' .
        !          7688:      FontVal        = 'Times' / 'Helvetica' / 'Courier' .
        !          7689:      UnderLineVal   = 'NoUnderline' / 'UnderLined' /
        !          7690:                       'OverLined' / 'CrossedOut' .
        !          7691:      ThicknessVal   = 'Thick' / 'Thin' .
        !          7692:      LineStyleVal   =  'Solid' / 'Dashed' / 'Dotted' .
        !          7693:      Pattern        = NAME .
        !          7694:      Color          = NAME .
        !          7695:      PresMinimum    = NUMBER .
        !          7696:      PresMaximum    = NUMBER .
        !          7697:      PresIntervalMin= NUMBER .
        !          7698:      PresIntervalMax= NUMBER .
        !          7699:      PresValue      = [ '-' ] PresVal .
        !          7700:      PresVal        = NUMBER .
        !          7701: </PRE>
        !          7702: <P>
        !          7703: The <A name="prestransl">translation rules associated with specific
        !          7704: presentation rules</A> can use the value of the specific presentation rule
        !          7705: that causes them to be applied.  This behavior is designated by the keyword
        !          7706: <TT>Value</TT>. For numerically-valued presentation rules, the numeric value
        !          7707: is produced.  For other presentation rules, the name of the value is
        !          7708: produced.</P>
        !          7709: <P>
        !          7710: It should be noted that modifications to the layout of the document's elements
        !          7711: that are made using the combination of the control key and a mouse button will
        !          7712: have no effect on the translation of the document.</P>
        !          7713: <BLOCKQUOTE class="example">
        !          7714: <P>
        !          7715: <STRONG>Example:</STRONG></P>
        !          7716: <P>
        !          7717: Suppose that it is desirable to use the same font sizes as in thespecific
        !          7718: presentation, but the font size must be between 10 and 18typographer's points.
        !          7719: If font size is set in the translated documentby the string
        !          7720: <TT>pointsize=n</TT>where <TT>n</TT>is the font size intypographer's points
        !          7721: then the following rules will suffice:</P>
        !          7722: <PRE>
        !          7723: PRESENTATION
        !          7724:    Size &lt; 10 :
        !          7725:         Create 'pointsize=10';
        !          7726:    Size in [10..18] :
        !          7727:         BEGIN
        !          7728:         Create 'pointsize=';
        !          7729:         Create Value;
        !          7730:         END;
        !          7731:    Size > 18 :
        !          7732:         Create 'pointsize=18';
        !          7733: </PRE>
        !          7734: </BLOCKQUOTE>
        !          7735: </DIV>
        !          7736: 
        !          7737: <DIV class="subsection">
        !          7738: <H3><A name="texttrans">Recoding of characters, symbols and graphics</A></H3>
        !          7739: 
        !          7740: <P>
        !          7741: The coding of characters, graphical elements and symbols as defined in Thot
        !          7742: does not necessarily correspond to what is required by an application to which
        !          7743: a Thot document must be exported.  Because of this the translator can recode
        !          7744: these terminal elements of the documents structure.  The last sections of a
        !          7745: translation schema are intended for this purpose, each specifying the recoding
        !          7746: rules for one type of terminal element.</P>
        !          7747: <P>
        !          7748: The recoding rules for character strings are grouped by alphabets. There is a
        !          7749: group of rules for each alphabet of the Thot document that must be translated.
        !          7750: Each such group of rules begins with the <TT>TEXTTRANSLATE</TT> keyword,
        !          7751: followed by the specification of the alphabet to translate and the recoding
        !          7752: rules, between the <TT>BEGIN</TT> and <TT>END</TT> keywords unless there is
        !          7753: only one recoding rule for the alphabet. The specification of the alphabet is
        !          7754: not required: by default it is assumed to the Latin alphabet (the ISO Latin-1
        !          7755: character set).</P>
        !          7756: <P>
        !          7757: Each recoding rule is formed by a source string between apostrophes and a
        !          7758: target string, also between apostrophes, the two strings being separated by
        !          7759: the arrow symbol (<TT>-></TT>), formed by the ``minus'' and ``greater than''
        !          7760: characters.  The rule is terminated by a semi-colon.</P>
        !          7761: <PRE>
        !          7762:      TextTransSeq = [ Alphabet ] TransSeq .
        !          7763:      Alphabet     = NAME .
        !          7764:      TransSeq     ='BEGIN' &lt; Translation > 'END' ';' /
        !          7765:                     Translation .
        !          7766:      Translation  = Source [ '->' Target ] ';' .
        !          7767:      Source       = STRING .
        !          7768:      Target       = STRING .
        !          7769: </PRE>
        !          7770: <P>
        !          7771: One such rule signifies that when the source string appears in a text leaf of
        !          7772: the document being translated, the translator must replace it, in the
        !          7773: translated document, with the target string.  The source string and the target
        !          7774: string can have different lengths and the target string can be empty.  In this
        !          7775: last case, the translator simply suppresses every occurrence of the source
        !          7776: string in the translated document.</P>
        !          7777: <P>
        !          7778: For a given alphabet, the order of the rules is not important and has no
        !          7779: significance because the T language compiler reorders the rules in ways that
        !          7780: speed up the translator's work.  The total number of recoding rules is limited
        !          7781: by the compiler as is the maximum length of the source and target strings.</P>
        !          7782: <P>
        !          7783: The recoding rules for symbols and graphical elements are written in the same
        !          7784: manner as the recoding rules for character strings.  They are preceded,
        !          7785: respectively, by the <TT>SYMBTRANSLATE</TT> and <TT>GRAPHTRANSLATE</TT> and so
        !          7786: not require a specification of the alphabet. Their source string is limited to
        !          7787: one character, since, in Thot, each symbol and each graphical element is
        !          7788: represented by a single character.  The symbol and graphical element codes are
        !          7789: defined along with the <A href="#charcoding">non-standard character
        !          7790: codes</A>.</P>
        !          7791: <BLOCKQUOTE class="example">
        !          7792: <P>
        !          7793: <STRONG>Example:</STRONG></P>
        !          7794: <P>
        !          7795: In a translation schema producing documents destined for use with
        !          7796: theL<SUP>A</SUP>T<SUB><BIG>E</BIG></SUB>X formatter, the Latin
        !          7797: characters``&eacute;'' (octal code 351 in Thot) and ``&egrave;'' (octal code
        !          7798: 350in Thot)  must be converted to their representation
        !          7799: inL<SUP>A</SUP>T<SUB><BIG>E</BIG></SUB>X:</P>
        !          7800: <PRE>
        !          7801: TEXTTRANSLATE        Latin
        !          7802:      BEGIN
        !          7803:      '\350' -> '\`{e}';    { e grave }
        !          7804:      '\351' -> '\''{e}';   { e acute }
        !          7805:      END;
        !          7806: </PRE>
        !          7807: </BLOCKQUOTE>
        !          7808: </DIV>
        !          7809: </DIV>
        !          7810: <HR>
        !          7811: </DIV>
        !          7812: 
        !          7813: <DIV class="chapter">
        !          7814: <H1>Language grammars</H1>
        !          7815: 
        !          7816: <P>
        !          7817: This chapter gives the complete grammars of the languages of Thot. The
        !          7818: grammars were presented and described in the preceding chapters, which also
        !          7819: specify the semantics of the languages.  This section gives only the
        !          7820: syntax.</P>
        !          7821: 
        !          7822: <DIV class="section">
        !          7823: <H2>The M meta-language</H2>
        !          7824: 
        !          7825: <P>
        !          7826: The language grammars are all expressed in the same formalism, the M
        !          7827: meta-language, which is defined in this section.</P>
        !          7828: <PRE>
        !          7829: { Any text between braces is a comment. }
        !          7830: Grammar      = Rule &lt; Rule > 'END' .
        !          7831:                { The &lt; and > signs indicate zero }
        !          7832:                { or more repetitions. }
        !          7833:                { END marks the end of the grammar. }
        !          7834: Rule         = Ident '=' RightPart '.' .
        !          7835:                { The period indicates the end of a rule }
        !          7836: RightPart    = RtTerminal / RtIntermed .
        !          7837:                { The slash indicates a choice }
        !          7838: RtTerminal   ='NAME' / 'STRING' / 'NUMBER' .
        !          7839:                { Right part of a terminal rule }
        !          7840: RtIntermed   = Possibility &lt; '/' Possibility > .
        !          7841:                { Right part of an intermediate rule }
        !          7842: Possibility  = ElemOpt &lt; ElemOpt > .
        !          7843: ElemOpt      = Element / '[' Element &lt; Element > ']' /
        !          7844:               '&lt;' Element &lt; Element > '>'  .
        !          7845:                { Brackets delimit optional parts }
        !          7846: Element      = Ident / KeyWord .
        !          7847: Ident        = NAME .
        !          7848:                { Identifier, sequence of characters
        !          7849: KeyWord      = STRING .
        !          7850:                { Character string delimited by apostrophes }
        !          7851: END
        !          7852: </PRE>
        !          7853: </DIV>
        !          7854: 
        !          7855: <DIV class="section">
        !          7856: <H2>The S language</H2>
        !          7857: 
        !          7858: <P>
        !          7859: The S language is used to write structure schemas, which contain the generic
        !          7860: logical structures of document and object classes.  It is described here in
        !          7861: the M meta-language.</P>
        !          7862: <PRE>
        !          7863: StructSchema   = 'STRUCTURE' [ 'EXTENSION' ] ElemID ';'
        !          7864:                  'DEFPRES' PresID ';'
        !          7865:                [ 'ATTR' AttrSeq ]
        !          7866:                [ 'PARAM' RulesSeq ]
        !          7867:                [ 'STRUCT' RulesSeq ]
        !          7868:                [ 'EXTENS' ExtensRuleSeq ]
        !          7869:                [ 'ASSOC' RulesSeq ]
        !          7870:                [ 'UNITS' RulesSeq ]
        !          7871:                [ 'EXPORT' SkeletonSeq ]
        !          7872:                [ 'EXCEPT' ExceptSeq ]
        !          7873:                  'END' .
        !          7874: 
        !          7875: ElemID         = NAME .
        !          7876: PresID         = NAME .
        !          7877: 
        !          7878: AttrSeq        = Attribute &lt; Attribute > .
        !          7879: Attribute      = AttrID '=' AttrType ';' .
        !          7880: AttrType       = 'INTEGER' / 'TEXT' /
        !          7881:                  'REFERENCE' '(' RefType ')' /
        !          7882:                  ValueSeq .
        !          7883: RefType        = 'ANY' /
        !          7884:                  [ FirstSec ] ElemID [ ExtStruct ] .
        !          7885: ValueSeq       = AttrVal &lt; ',' AttrVal > .
        !          7886: AttrID         = NAME .
        !          7887: FirstSec       = 'First' / 'Second' .
        !          7888: ExtStruct      = '(' ElemID ')' .
        !          7889: AttrVal        = NAME .
        !          7890: 
        !          7891: RulesSeq       = Rule &lt; Rule > .
        !          7892: Rule           = ElemID [ LocAttrSeq ] '='
        !          7893:                  DefWithAttr ';' .
        !          7894: LocAttrSeq     = '(' 'ATTR' LocalAttr
        !          7895:                       &lt; ';' LocalAttr > ')' .
        !          7896: LocalAttr      = [ '!' ] AttrID [ '=' AttrType ] .
        !          7897: DefWithAttr    = Definition
        !          7898:                  [ '+' '(' ExtensionSeq ')' ]
        !          7899:                  [ '-' '(' RestrictSeq ')' ]
        !          7900:                  [ 'WITH' FixedAttrSeq ] .
        !          7901: ExtensionSeq   = ExtensionElem &lt; ',' ExtensionElem > .
        !          7902: ExtensionElem  = ElemID / 'TEXT' / 'GRAPHICS' /
        !          7903:                  'SYMBOL' / 'PICTURE' .
        !          7904: RestrictSeq    = RestrictElem &lt; ',' RestrictElem > .
        !          7905: RestrictElem   = ElemID / 'TEXT' / 'GRAPHICS' /
        !          7906:                  'SYMBOL' / 'PICTURE' .
        !          7907: FixedAttrSeq   = FixedAttr &lt; ',' FixedAttr > .
        !          7908: FixedAttr      = AttrID [ FixedOrModifVal ] .
        !          7909: FixedOrModifVal= [ '?' ] '=' FixedValue .
        !          7910: FixedValue     = [ '-' ] NumValue / TextValue / AttrVal .
        !          7911: NumValue       = NUMBER .
        !          7912: TextValue      = STRING .
        !          7913: 
        !          7914: Definition     = BaseType [ LocAttrSeq ] / Constr /
        !          7915:                  Element .
        !          7916: BaseType       = 'TEXT' / 'GRAPHICS' / 'SYMBOL' /
        !          7917:                  'PICTURE' / 'UNIT' / 'NATURE' .
        !          7918: Element        = ElemID [ ExtOrDef ] .
        !          7919: ExtOrDef       = 'EXTERN' / 'INCLUDED' /
        !          7920:                  [ LocAttrSeq ] '=' Definition .
        !          7921: 
        !          7922: Constr         = 'LIST' [ '[' min '..' max ']' ] 'OF'
        !          7923:                         '(' DefWithAttr ')' /
        !          7924:                  'BEGIN' DefOptSeq 'END' /
        !          7925:                  'AGGREGATE' DefOptSeq 'END' /
        !          7926:                  'CASE' 'OF' DefSeq 'END' /
        !          7927:                  'REFERENCE' '(' RefType ')' /
        !          7928:                  'PAIR' .
        !          7929: 
        !          7930: min            = Integer / '*' .
        !          7931: max            = Integer / '*' .
        !          7932: Integer        = NUMBER .
        !          7933: 
        !          7934: DefOptSeq      = DefOpt ';' &lt; DefOpt ';' > .
        !          7935: DefOpt         = [ '?' ] DefWithAttr .
        !          7936: 
        !          7937: DefSeq         = DefWithAttr ';' &lt; DefWithAttr ';' > .
        !          7938: 
        !          7939: SkeletonSeq    = SkeletonElem &lt; ',' SkeletonElem > ';' .
        !          7940: SkeletonElem   = ElemID [ 'WITH' Contents ] .
        !          7941: Contents       = 'Nothing' / ElemID [ ExtStruct ] .
        !          7942: 
        !          7943: ExceptSeq      = Except ';' &lt; Except ';' > .
        !          7944: Except         = [ 'EXTERN' ] [ FirstSec ] ExcTypeOrAttr ':'
        !          7945:                  ExcValSeq .
        !          7946: ExcTypeOrAttr  = ElemID / AttrID .
        !          7947: ExcValSeq      = ExcValue &lt; ',' ExcValue > .
        !          7948: ExcValue       = 'NoCut' / 'NoCreate' /
        !          7949:                  'NoHMove' / 'NoVMove' / 'NoMove' /
        !          7950:                  'NoHResize' / 'NoVResize' / 'NoResize' /
        !          7951:                  'NewWidth' / 'NewHeight' /
        !          7952:                  'NewHPos' / 'NewVPos' /
        !          7953:                  'Invisible' / 'NoSelect' /
        !          7954:                  'Hidden' / 'ActiveRef' /
        !          7955:                  'ImportLine' / 'ImportParagraph' /
        !          7956:                  'NoPaginate' / 'HighlightChildren' /
        !          7957:                  'ExtendedSelection' .
        !          7958: 
        !          7959: ExtensRuleSeq  = ExtensRule ';' &lt; ExtensRule ';' > .
        !          7960: ExtensRule     = RootOrElem [ LocAttrSeq ]
        !          7961:                  [ '+' '(' ExtensionSeq ')' ]
        !          7962:                  [ '-' '(' RestrictSeq ')' ]
        !          7963:                  [ 'WITH' FixedAttrSeq ] .
        !          7964: RootOrElem     = 'Root' / ElemID .
        !          7965: 
        !          7966: END
        !          7967: </PRE>
        !          7968: </DIV>
        !          7969: 
        !          7970: <DIV class="section">
        !          7971: <H2>The P language</H2>
        !          7972: 
        !          7973: <P>
        !          7974: The P language is used to write presentation schemas, which define the
        !          7975: graphical presentation rules to be applied to different classes of documents
        !          7976: and objects.  It is described here in the M meta-language.</P>
        !          7977: <PRE>
        !          7978: PresSchema      = 'PRESENTATION' ElemID ';'
        !          7979:                 [ 'VIEWS' ViewSeq ]
        !          7980:                 [ 'PRINT' PrintViewSeq ]
        !          7981:                 [ 'COUNTERS' CounterSeq ]
        !          7982:                 [ 'CONST' ConstSeq ]
        !          7983:                 [ 'VAR' VarSeq ]
        !          7984:                 [ 'DEFAULT' ViewRuleSeq ]
        !          7985:                 [ 'BOXES' BoxSeq ]
        !          7986:                 [ 'RULES' PresentSeq ]
        !          7987:                 [ 'ATTRIBUTES' PresAttrSeq ]
        !          7988:                 [ 'TRANSMIT' TransmitSeq ]
        !          7989:                   'END' .
        !          7990: 
        !          7991: ElemID          = NAME .
        !          7992: 
        !          7993: ViewSeq         = ViewDeclaration
        !          7994:                   &lt; ',' ViewDeclaration > ';' .
        !          7995: ViewDeclaration = ViewID [ 'EXPORT' ] .
        !          7996: ViewID          = NAME .
        !          7997: 
        !          7998: PrintViewSeq    = PrintView &lt; ',' PrintView > ';' .
        !          7999: PrintView       = ViewID / ElemID .
        !          8000: 
        !          8001: CounterSeq      = Counter &lt; Counter > .
        !          8002: Counter         = CounterID ':' CounterFunc ';' .
        !          8003: CounterID       = NAME .
        !          8004: CounterFunc     = 'RANK' 'OF' TypeOrPage [ SLevelAsc ]
        !          8005:                   [ 'INIT' AttrID ] [ 'REINIT' AttrID ] /
        !          8006:                   SetFunction &lt; SetFunction >
        !          8007:                   AddFunction &lt; AddFunction >
        !          8008:                   [ 'INIT' AttrID ] /
        !          8009:                   'RLEVEL' 'OF' ElemID .
        !          8010: SLevelAsc       = [ '-' ] LevelAsc .
        !          8011: LevelAsc        = NUMBER .
        !          8012: SetFunction     = 'SET' CounterValue 'ON' TypeOrPage .
        !          8013: AddFunction     = 'ADD' CounterValue 'ON' TypeOrPage .
        !          8014: TypeOrPage      = 'Page' [ '(' ViewID ')' ] /
        !          8015:                   [ '*' ] ElemID .
        !          8016: CounterValue    = NUMBER .
        !          8017: 
        !          8018: ConstSeq        = Const &lt; Const > .
        !          8019: Const           = ConstID '=' ConstType ConstValue ';' .
        !          8020: ConstID         = NAME .
        !          8021: ConstType       = 'Text' [ Alphabet ] / 'Symbol' /
        !          8022:                   'Graphics' / 'Picture' .
        !          8023: ConstValue      = STRING .
        !          8024: Alphabet        = NAME .
        !          8025: 
        !          8026: VarSeq          = Variable &lt; Variable > .
        !          8027: Variable        = VarID ':' FunctionSeq ';' .
        !          8028: VarID           = NAME .
        !          8029: FunctionSeq     = Function &lt; Function > .
        !          8030: Function        = 'DATE' / 'FDATE' /
        !          8031:                   'DocName' / 'DirName' /
        !          8032:                   'ElemName' / 'AttributeName' /
        !          8033:                   ConstID / ConstType ConstValue /
        !          8034:                   AttrID /
        !          8035:                   'VALUE' '(' PageAttrCtr ','
        !          8036:                   CounterStyle ')' .
        !          8037: PageAttrCtr     = 'PageNumber' [ '(' ViewID ')' ] /
        !          8038:                   [ MinMax ] CounterID / AttrID .
        !          8039: CounterStyle    = 'Arabic' / 'LRoman' / 'URoman' /
        !          8040:                   'Uppercase' / 'Lowercase' .
        !          8041: MinMax          = 'MaxRangeVal' / 'MinRangeVal' .
        !          8042: 
        !          8043: BoxSeq          = Box &lt; Box > .
        !          8044: Box             = 'FORWARD' BoxID ';' /
        !          8045:                   BoxID ':' ViewRuleSeq .
        !          8046: BoxID           = NAME .
        !          8047: 
        !          8048: PresentSeq      = Present &lt; Present > .
        !          8049: Present         = [ '*' ] [ FirstSec ] ElemID ':'
        !          8050:                   ViewRuleSeq .
        !          8051: FirstSec        = 'First' / 'Second' .
        !          8052: 
        !          8053: PresAttrSeq     = PresAttr &lt; PresAttr > .
        !          8054: PresAttr        = AttrID [ '(' [ FirstSec ] ElemID ')' ] 
        !          8055:                   [ AttrRelation ] ':' ViewRuleSeq .
        !          8056: AttrID          = NAME .
        !          8057: AttrRelation    = '=' AttrVal /
        !          8058:                   '>' [ '-' ] MinValue /
        !          8059:                   '&lt;' [ '-' ] MaxValue /
        !          8060:                   'IN' '[' [ '-' ] LowerBound '..' 
        !          8061:                   [ '-' ] UpperBound ']' /
        !          8062:                   'GREATER' AttrID /
        !          8063:                   'EQUAL' AttrID /
        !          8064:                   'LESS' AttrID .
        !          8065: AttrVal         = [ '-' ] EqualNum / EqualText / AttrValue .
        !          8066: MinValue        = NUMBER .
        !          8067: MaxValue        = NUMBER .
        !          8068: LowerBound      = NUMBER .
        !          8069: UpperBound      = NUMBER.
        !          8070: EqualNum        = NUMBER .
        !          8071: EqualText       = STRING .
        !          8072: AttrValue       = NAME .
        !          8073: 
        !          8074: ViewRuleSeq     = 'BEGIN' &lt; RulesAndCond > &lt; ViewRules >
        !          8075:                   'END' ';' /
        !          8076:                   ViewRules / CondRules / Rule .
        !          8077: RulesAndCond    = CondRules / Rule .
        !          8078: ViewRules       = 'IN' ViewID CondRuleSeq .
        !          8079: CondRuleSeq     = 'BEGIN' &lt; RulesAndCond > 'END' ';' /
        !          8080:                   CondRules / Rule .
        !          8081: CondRules       = CondRule &lt; CondRule >
        !          8082:                   [ 'Otherwise' RuleSeq ] .
        !          8083: CondRule        = 'IF' ConditionSeq RuleSeq .
        !          8084: RulesSeq        = 'BEGIN' Rule &lt; Rule > 'END' ';' / Rule .
        !          8085: 
        !          8086: ConditionSeq   = Condition &lt; 'AND' Condition > .
        !          8087: Condition      = [ 'NOT' ] [ 'Target' ] ConditionElem .
        !          8088: ConditionElem  = 'First' / 'Last' /
        !          8089:                  [ 'Immediately' ] 'Within' [ NumParent ]
        !          8090:                                     ElemID [ ExtStruct ] /
        !          8091:                   ElemID /
        !          8092:                  'Referred' / 'FirstRef' / 'LastRef' /
        !          8093:                  'ExternalRef' / 'InternalRef' / 'CopyRef' /
        !          8094:                  'AnyAttributes' / 'FirstAttr' / 'LastAttr' /
        !          8095:                  'UserPage' / 'StartPage' / 'ComputedPage' /
        !          8096:                  'Empty' /
        !          8097:                  '(' [ MinMax ] CounterName CounterCond ')' /
        !          8098:                  CondPage '(' CounterID ')' .
        !          8099: NumParent      = [ GreaterLess ] NParent .
        !          8100: GreaterLess    = '>' / '&lt;' .
        !          8101: NParent        = NUMBER.
        !          8102: CounterCond    = '&lt;' MaxCtrVal / '>' MinCtrVal /
        !          8103:                  '=' EqCtrVal / 
        !          8104:                  'IN' '[' ['-'] MinCtrBound '..' 
        !          8105:                  ['-'] MaxCtrBound ']' .
        !          8106: PageCond       = 'Even' / 'Odd' / 'One' .
        !          8107: MaxCtrVal      = NUMBER .
        !          8108: MinCtrVal      = NUMBER .
        !          8109: EqCtrVal       = NUMBER .
        !          8110: MaxCtrBound    = NUMBER .
        !          8111: MinCtrBound    = NUMBER .
        !          8112: 
        !          8113: Rule            = PresParam ';' / PresFunc ';' .
        !          8114: PresParam       = 'VertRef' ':' HorizPosition /
        !          8115:                   'HorizRef' ':' VertPosition /
        !          8116:                   'VertPos' ':' VPos /
        !          8117:                   'HorizPos' ':' HPos /
        !          8118:                   'Height' ':' Extent /
        !          8119:                   'Width' ':' Extent /
        !          8120:                   'VertOverflow' ':' Boolean /
        !          8121:                   'HorizOverflow' ':' Boolean /
        !          8122:                   'LineSpacing' ':' DistOrInherit /
        !          8123:                   'Indent' ':' DistOrInherit /
        !          8124:                   'Adjust' ':' AlignOrInherit /
        !          8125:                   'Justify' ':' BoolInherit /
        !          8126:                   'Hyphenate' ':' BoolInherit /
        !          8127:                   'PageBreak' ':' Boolean /
        !          8128:                   'LineBreak' ':' Boolean /
        !          8129:                   'InLine' ':' Boolean /
        !          8130:                   'NoBreak1' ':' AbsDist /
        !          8131:                   'NoBreak2' ':' AbsDist /
        !          8132:                   'Gather' ':' Boolean /
        !          8133:                   'Visibility' ':' NumberInherit /
        !          8134:                   'Size'  ':' SizeInherit /
        !          8135:                   'Font' ':' NameInherit /
        !          8136:                   'Style' ':' StyleInherit /
        !          8137:                   'Underline' ':' UnderLineInherit /
        !          8138:                   'Thickness' ':' ThicknessInherit /
        !          8139:                   'Depth' ':' NumberInherit /
        !          8140:                   'LineStyle' ':' LineStyleInherit /
        !          8141:                   'LineWeight' ':' DistOrInherit /
        !          8142:                   'FillPattern' ':' NameInherit /
        !          8143:                   'Background' ':' NameInherit /
        !          8144:                   'Foreground' ':' NameInherit .
        !          8145:                   'Content' ':' VarConst .
        !          8146: PresFunc        = Creation '(' BoxID ')' /
        !          8147:                   'Line' /
        !          8148:                   'NoLine' /
        !          8149:                   'Page' '(' BoxID ')' /
        !          8150:                   'Copy' '(' BoxTypeToCopy ')' .
        !          8151: 
        !          8152: BoxTypeToCopy   = BoxID [ ExtStruct ] /
        !          8153:                    ElemID [ ExtStruct ] .
        !          8154: ExtStruct       = '(' ElemID ')' .
        !          8155: 
        !          8156: Distance        = [ Sign ] AbsDist .
        !          8157: Sign            = '+' / '-' .
        !          8158: AbsDist         = IntegerOrAttr [ '.' DecimalPart ]
        !          8159:                   [ Unit ] .
        !          8160: IntegerOrAttr   = IntegerPart / AttrID .
        !          8161: IntegerPart     = NUMBER .
        !          8162: DecimalPart     = NUMBER .
        !          8163: Unit            = 'em' / 'ex' / 'cm' / 'mm' / 'in' / 'pt' /
        !          8164:                   'pc' / 'px' / '%' .
        !          8165: 
        !          8166: HPos            = 'nil' / VertAxis '=' HorizPosition 
        !          8167:                   [ 'UserSpecified' ] .
        !          8168: VPos            = 'nil' / HorizAxis '=' VertPosition 
        !          8169:                   [ 'UserSpecified' ] .
        !          8170: VertAxis        = 'Left' / 'VMiddle' / 'VRef' / 'Right' .
        !          8171: HorizAxis       = 'Top' / 'HMiddle' / 'HRef' / 'Bottom' .
        !          8172: 
        !          8173: VertPosition   = Reference '.' HorizAxis [ Distance ] .
        !          8174: HorizPosition  = Reference '.' VertAxis [ Distance ] .
        !          8175: Reference      = 'Enclosing' [ BoxTypeNot ] /
        !          8176:                  'Enclosed' [ BoxTypeNot ] /
        !          8177:                  'Previous' [ BoxTypeNot ] /
        !          8178:                  'Next' [ BoxTypeNot ] /
        !          8179:                  'Referred' [ BoxTypeNot ] /
        !          8180:                  'Creator' /
        !          8181:                  'Root' /
        !          8182:                  '*' /
        !          8183:                  BoxOrType .
        !          8184: BoxOrType      = BoxID /
        !          8185:                  [ '*' ] [ FirstSec ] ElemID /
        !          8186:                  'AnyElem' / 'AnyBox' .
        !          8187: BoxTypeNot     = [ 'NOT' ] BoxOrType .
        !          8188: 
        !          8189: Extent         = Reference '.' HeightWidth
        !          8190:                  [ Relation ] [ 'Min' ] /
        !          8191:                  AbsDist [ 'UserSpecified' ] [ 'Min' ] /
        !          8192:                  HPos / VPos .
        !          8193: HeightWidth    = 'Height' / 'Width' .
        !          8194: Relation       = '*' ExtentAttr '%' / Distance .
        !          8195: ExtentAttr     = ExtentVal / AttrID .
        !          8196: ExtentVal      = NUMBER .
        !          8197: 
        !          8198: Inheritance    = Kinship  InheritedValue .
        !          8199: Kinship        = 'Enclosing' / 'GrandFather'/ 'Enclosed' /
        !          8200:                  'Previous' / 'Creator' .
        !          8201: InheritedValue = '+' PosIntAttr [ 'Max' maximumA ] /
        !          8202:                  '-' NegIntAttr [ 'Min' minimumA ] /
        !          8203:                  '=' .
        !          8204: PosIntAttr     = PosInt / AttrID .
        !          8205: PosInt         = NUMBER .
        !          8206: NegIntAttr     = NegInt / AttrID .
        !          8207: NegInt         = NUMBER .
        !          8208: maximumA       = maximum / AttrID .
        !          8209: maximum        = NUMBER .
        !          8210: minimumA       = minimum / AttrID .
        !          8211: minimum        = NUMBER .
        !          8212: 
        !          8213: AlignOrInherit = Kinship '=' / Alignment .
        !          8214: Alignment      = 'Left' / 'Right' / 'VMiddle' /
        !          8215:                  'LeftWithDots' .
        !          8216: 
        !          8217: DistOrInherit  = Kinship InheritedDist / Distance .
        !          8218: InheritedDist  = '=' / '+' AbsDist / '-' AbsDist .
        !          8219: 
        !          8220: BoolInherit    = Boolean / Kinship '=' .
        !          8221: Boolean        = 'Yes' / 'No' .
        !          8222: 
        !          8223: NumberInherit  = Integer / AttrID / Inheritance .
        !          8224: Integer        = NUMBER .
        !          8225: 
        !          8226: LineStyleInherit= Kinship '=' / 'Solid' / 'Dashed' /
        !          8227:                   'Dotted' .
        !          8228: 
        !          8229: SizeInherit    = SizeAttr [ 'pt' ] / Kinship InheritedSize .
        !          8230: InheritedSize  = '+' SizeAttr [ 'pt' ]
        !          8231:                      [ 'Max' MaxSizeAttr ] /
        !          8232:                  '-' SizeAttr [ 'pt' ]
        !          8233:                      [ 'Min' MinSizeAttr ] /
        !          8234:                  '=' .
        !          8235: SizeAttr       = Size / AttrID .
        !          8236: Size           = NUMBER .
        !          8237: MaxSizeAttr    = MaxSize / AttrID .
        !          8238: MaxSize        = NUMBER .
        !          8239: MinSizeAttr    = MinSize / AttrID .
        !          8240: MinSize        = NUMBER .
        !          8241: 
        !          8242: NameInherit    = Kinship '=' / FontName .
        !          8243: FontName       = NAME .
        !          8244: StyleInherit   = Kinship '=' /
        !          8245:                  'Roman' / 'Bold' / 'Italics' / 
        !          8246:                  'BoldItalics' / 'Oblique' / 'BoldOblique' .
        !          8247: UnderLineInherit= Kinship '=' /
        !          8248:                  'NoUnderline' / 'Underlined' / 
        !          8249:                  'Overlined' / 'CrossedOut' .
        !          8250: ThicknessInherit= Kinship '=' / 'Thick' / 'Thin' .
        !          8251: 
        !          8252: VarConst       = ConstID / ConstType ConstValue /
        !          8253:                  VarID / '(' FunctionSeq ')' /
        !          8254:                  ElemID .
        !          8255: 
        !          8256: Creation       = Create [ 'Repeated' ] .
        !          8257: Create         = 'CreateFirst' / 'CreateLast' /
        !          8258:                  'CreateBefore' / 'CreateAfter' /
        !          8259:                  'CreateEnclosing' .
        !          8260: 
        !          8261: TransmitSeq    = Transmit &lt; Transmit > .
        !          8262: Transmit       = TypeOrCounter 'To' ExternAttr
        !          8263:                  '(' ElemID ')' ';' .
        !          8264: TypeOrCounter  = CounterID / ElemID .
        !          8265: ExternAttr     = NAME .
        !          8266: 
        !          8267: END
        !          8268: </PRE>
        !          8269: </DIV>
        !          8270: 
        !          8271: <DIV class="section">
        !          8272: <H2>The T language</H2>
        !          8273: 
        !          8274: <PRE>
        !          8275: TransSchema   = 'TRANSLATION' ElemID ';'
        !          8276:               [ 'LINELENGTH' LineLength ';' ]
        !          8277:               [ 'LINEEND' CHARACTER ';' ]
        !          8278:               [ 'LINEENDINSERT' STRING ';' ]
        !          8279:               [ 'BUFFERS' BufferSeq ]
        !          8280:               [ 'COUNTERS' CounterSeq ]
        !          8281:               [ 'CONST' ConstSeq ]
        !          8282:               [ 'VAR' VariableSeq ]
        !          8283:                 'RULES' ElemSeq
        !          8284:               [ 'ATTRIBUTES' AttrSeq ]
        !          8285:               [ 'PRESENTATION' PresSeq ]
        !          8286:               &lt; 'TEXTTRANSLATE' TextTransSeq >
        !          8287:               [ 'SYMBTRANSLATE' TransSeq ]
        !          8288:               [ 'GRAPHTRANSLATE' TransSeq ]
        !          8289:                 'END' .
        !          8290: 
        !          8291: LineLength    = NUMBER .
        !          8292: 
        !          8293: BufferSeq     = Buffer &lt; Buffer > .
        !          8294: Buffer        = BufferID [ '(' 'Picture' ')' ] ';' .
        !          8295: BufferID      = NAME .
        !          8296: 
        !          8297: CounterSeq    = Counter &lt; Counter > .
        !          8298: Counter       = CounterID [ ':' CounterFunc ] ';' .
        !          8299: CounterID     = NAME .
        !          8300: CounterFunc   = 'Rank' 'of' ElemID [ SLevelAsc ]
        !          8301:                 [ 'Init' AttrID ] /
        !          8302:                 'Rlevel' 'of' ElemID /
        !          8303:                 'Set' InitValue 'On' ElemID
        !          8304:                       'Add' Increment 'On' ElemID
        !          8305:                       [ 'Init' AttrID ] .
        !          8306: SLevelAsc     = [ '-' ] LevelAsc .
        !          8307: LevelAsc      =  NUMBER .
        !          8308: InitValue     = NUMBER .
        !          8309: Increment     = NUMBER .
        !          8310: ElemID        = NAME .
        !          8311: AttrID        = NAME .
        !          8312: 
        !          8313: ConstSeq      = Const &lt; Const > .
        !          8314: Const         = ConstID '=' ConstValue ';' .
        !          8315: ConstID       = NAME .
        !          8316: ConstValue    = STRING .
        !          8317: 
        !          8318: VariableSeq   = Variable &lt; Variable > .
        !          8319: Variable      = VarID ':' Function &lt; Function > ';' .
        !          8320: VarID         = NAME .
        !          8321: Function      = 'Value' '(' CounterID [ ':' Length ]
        !          8322:                           [ ',' CounterStyle ]  ')' /
        !          8323:                 'FileDir' / 'FileName' / 'Extension' /
        !          8324:                 'DocumentName' / 'DocumentDir' /
        !          8325:                 ConstID / CharString / 
        !          8326:                 BufferID / AttrID .
        !          8327: Length        = NUMBER .
        !          8328: CounterStyle=   'Arabic' / 'LRoman' / 'URoman' /
        !          8329:                 'Uppercase' / 'Lowercase' .
        !          8330: CharString    = STRING .
        !          8331: 
        !          8332: ElemSeq       = TransType &lt; TransType > .
        !          8333: TransType     = [ FirstSec ] ElemID ':' RuleSeq .
        !          8334: FirstSec      = 'First' / 'Second' .
        !          8335: RuleSeq       = Rule / 'BEGIN' &lt; Rule > 'END' ';' .
        !          8336: Rule          = SimpleRule / ConditionBlock .
        !          8337: ConditionBlock= 'IF' ConditionSeq SimpleRuleSeq .
        !          8338: SimpleRuleSeq = 'BEGIN' &lt; SimpleRule > 'END' ';' / 
        !          8339:                 SimpleRule .
        !          8340: 
        !          8341: ConditionSeq  = Condition [ 'AND' Condition ] .
        !          8342: Condition     = [ 'NOT' ] [ 'Target' ] Cond .
        !          8343: Cond          = CondElem / CondAscend .
        !          8344: CondElem      = 'FirstRef' / 'LastRef' /
        !          8345:                 'ExternalRef' /
        !          8346:                 'Defined' /
        !          8347:                 'Alphabet' '=' Alphabet /
        !          8348:                 'ComputedPage' / 'StartPage' / 
        !          8349:                 'UserPage' / 'ReminderPage' /
        !          8350:                 'Empty' /
        !          8351:                 'FirstAttr' / 'LastAttr' .
        !          8352: CondAscend    = [ Ascend ] CondOnAscend .
        !          8353: Ascend        = '*' / 'Parent' / 'Ancestor' LevelOrType .
        !          8354: LevelOrType   = CondRelLevel / ElemID [ ExtStruct ] .
        !          8355: CondRelLevel  = NUMBER .
        !          8356: CondOnAscend  = 'First' / 'Last' /
        !          8357:                 'Referred' / 
        !          8358:                 [ 'Immediately' ] 'Within' [ NumParent ]
        !          8359:                                   ElemID [ ExtStruct ] /
        !          8360:                 'Attributes' /
        !          8361:                 AttrID [ RelatAttr ] /
        !          8362:                 'Presentation' /
        !          8363:                 PresRule /
        !          8364:                 'Comment' .                  
        !          8365: NumParent     = [ GreaterLess ] NParent .
        !          8366: GreaterLess   = '>' / '&lt;' .
        !          8367: NParent       = NUMBER.
        !          8368: Alphabet      = NAME .
        !          8369: RelatAttr     = '=' Value /
        !          8370:                  '>' [ '-' ] Minimum /
        !          8371:                  '&lt;' [ '-' ] Maximum /
        !          8372:                  'IN' '[' [ '-' ] MinInterval '..'
        !          8373:                           [ '-' ] MaxInterval ']' .
        !          8374: Value         = [ '-' ] IntegerVal / TextVal / AttrValue .
        !          8375: Minimum       = NUMBER .
        !          8376: Maximum       = NUMBER .
        !          8377: MinInterval   = NUMBER .
        !          8378: MaxInterval   = NUMBER .
        !          8379: IntegerVal    = NUMBER .
        !          8380: TextVal       = STRING .
        !          8381: AttrValue     = NAME .
        !          8382: 
        !          8383: SimpleRule    = 'Create' [ 'IN' VarID ] Object
        !          8384:                        [ Position ] ';' /
        !          8385:                 'Write' Object [ Position ] ';' /
        !          8386:                 'Read' BufferID [ Position ] ';' /
        !          8387:                 'Include' File [ Position ] ';' /
        !          8388:                 'Get' [ RelPosition ] ElemID 
        !          8389:                       [ ExtStruct ] 
        !          8390:                       [ Position ] ';' /
        !          8391:                 'Copy' [ RelPosition ] ElemID 
        !          8392:                        [ ExtStruct ] 
        !          8393:                        [ Position ] ';' /
        !          8394:                 'Use' TrSchema [ 'For' ElemID ] ';' /
        !          8395:                 'Remove' ';' /
        !          8396:                 'NoTranslation' ';' /
        !          8397:                 'NoLineBreak' ';' /
        !          8398:                 'ChangeMainFile' VarID [ Position ] ';' /
        !          8399:                 'Set' CounterID InitValue
        !          8400:                       [ Position ] ';' /
        !          8401:                 'Add' CounterID Increment
        !          8402:                       [ Position ] ';' .
        !          8403: 
        !          8404: Object        = ConstID / CharString /
        !          8405:                 BufferID /
        !          8406:                 VarID /
        !          8407:                 '(' Function &lt; Function > ')' /
        !          8408:                  AttrID /
        !          8409:                 'Value' /
        !          8410:                 'Content' /
        !          8411:                 'Comment' / 
        !          8412:                 'Attributes' /
        !          8413:                 'Presentation' /
        !          8414:                 'RefId' /
        !          8415:                 'PairId' /
        !          8416:                 'FileDir' / 'FileName' / 'Extension' /
        !          8417:                 'DocumentName' / 'DocumentDir' /
        !          8418:                 [ 'Referred' ] ReferredObject .
        !          8419: Position      = 'After' / 'Before' .
        !          8420: 
        !          8421: ReferredObject = VarID /
        !          8422:                  ElemID [ ExtStruct ] /
        !          8423:                  'RefId' /
        !          8424:                  'DocumentName' / 'DocumentDir' .                
        !          8425: 
        !          8426: File           = FileName / BufferID .
        !          8427: FileName       = STRING .
        !          8428: 
        !          8429: RelPosition    = 'Included' / 'Referred' .
        !          8430: ExtStruct      = '(' ElemID ')' .
        !          8431: 
        !          8432: TrSchema       = NAME .
        !          8433: 
        !          8434: AttrSeq        = TransAttr &lt; TransAttr > .
        !          8435: TransAttr      = AttrID [ '(' ElemID ')' ] 
        !          8436:                  [ RelatAttr ] ':' RuleSeq .
        !          8437: 
        !          8438: PresSeq        = PresTrans &lt; PresTrans > .
        !          8439: PresTrans      = PresRule ':' RuleSeq .
        !          8440: PresRule       = 'Size' [ PresRelation ] /
        !          8441:                  'Indent' [ PresRelation ] /
        !          8442:                  'LineSpacing' [ PresRelation ] /
        !          8443:                  'Adjust' [ '=' AdjustVal ] /
        !          8444:                  'Justify' [ '=' BoolVal ] /
        !          8445:                  'Hyphenate' [ '=' BoolVal ] /
        !          8446:                  'Style' [ '=' StyleVal ] /
        !          8447:                  'Font' [ '=' FontVal ] /
        !          8448:                  'UnderLine' [ '=' UnderLineVal ] /
        !          8449:                  'Thickness' [ '=' ThicknessVal ] /
        !          8450:                  'LineStyle' [ '=' LineStyleVal ] /
        !          8451:                  'LineWeight' [ PresRelation ] /
        !          8452:                  'FillPattern' [ '=' Pattern ] /
        !          8453:                  'Background' [ '=' Color ] /
        !          8454:                  'Foreground' [ '=' Color ] .
        !          8455: 
        !          8456: PresRelation   = '=' PresValue /
        !          8457:                  '>' [ '-' ] PresMinimum /
        !          8458:                  '&lt;' [ '-' ] PresMaximum /
        !          8459:                  'IN' '[' [ '-' ] PresIntervalMin '..'
        !          8460:                           [ '-' ] PresIntervalMax ']' .
        !          8461: AdjustVal      = 'Left' / 'Right' / 'VMiddle' / 
        !          8462:                  'LeftWithDots' .
        !          8463: BoolVal        = 'Yes' / 'No' .
        !          8464: StyleVal       = 'Bold' / 'Italics' / 'Roman' /
        !          8465:                  'BoldItalics' / 'Oblique' /
        !          8466:                  'BoldOblique' .
        !          8467: FontVal        = 'Times' / 'Helvetica' / 'Courier' .
        !          8468: UnderLineVal   = 'NoUnderline' / 'UnderLined' /
        !          8469:                  'OverLined' / 'CrossedOut' .
        !          8470: ThicknessVal   = 'Thick' / 'Thin' .
        !          8471: LineStyleVal   = 'Solid' / 'Dashed' / 'Dotted' .
        !          8472: Pattern        = NAME .
        !          8473: Color          = NAME .
        !          8474: PresMinimum    = NUMBER .
        !          8475: PresMaximum    = NUMBER .
        !          8476: PresIntervalMin= NUMBER .
        !          8477: PresIntervalMax= NUMBER .
        !          8478: PresValue      = [ '-' ] PresVal .
        !          8479: PresVal        = NUMBER .
        !          8480: 
        !          8481: TextTransSeq   = [ Alphabet ] TransSeq .
        !          8482: Alphabet       = NAME .
        !          8483: TransSeq       = 'BEGIN' &lt; Translation > 'END' ';' /
        !          8484:                  Translation .
        !          8485: Translation    = Source [ '->' Target ] ';' .
        !          8486: Source         = STRING .
        !          8487: Target         = STRING .
        !          8488: </PRE>
        !          8489: </DIV>
        !          8490: <HR>
        !          8491: </DIV>
        !          8492: 
        !          8493: <DIV class="chapter">
        !          8494: <H1><A name="charcoding">Character coding</A></H1>
        !          8495: 
        !          8496: 
        !          8497: <DIV class="section">
        !          8498: <H2>Characters</H2>
        !          8499: 
        !          8500: <P>
        !          8501: The characters of the Latin alphabet follow the encoding defined in the ISO
        !          8502: 8859-1 (ISO Latin 1) standard.  The characters of the Greek alphabet follow
        !          8503: the encoding defined by Adobe for its Symbol font (Adobe FontSpecific).</P>
        !          8504: <P>
        !          8505: Characters whose octal code is greater than 0200 are written in the form of
        !          8506: their octal code preceded by a backslash character (``\'').  For example, the
        !          8507: French word R&eacute;sum&eacute; is written <TT>R\351sum\351</TT>.</P>
        !          8508: <P>
        !          8509: To the ISO 8859-1 encoding six characters with the following codes have been
        !          8510: added:<BR><TT>212</TT>: line break<BR><TT>240</TT>: sticky
        !          8511: space<BR><TT>201</TT>: thin space<BR><TT>202</TT>: en space<BR></P>
        !          8512: <P>
        !          8513: The <TT>212</TT> character is a ``line break'' character which forces a line
        !          8514: break.  The <TT>240</TT> character is a ``sticky space'', which cannot be
        !          8515: replaced by a line break.</P>
        !          8516: </DIV>
        !          8517: 
        !          8518: <DIV class="section">
        !          8519: <H2><A name="symbolcoding">Symbols</A></H2>
        !          8520: 
        !          8521: <P>
        !          8522: The table below gives the codes for the symbols of Thot.  Symbols can be used
        !          8523: in presentation schemas constants and in transcoding rules of translation
        !          8524: schemas.  Each symbol is represented by a single character.</P>
        !          8525: <UL>
        !          8526: <LI><TT>r</TT>: a radical
        !          8527: <LI><TT>i</TT>: a simple integral
        !          8528: <LI><TT>c</TT>: a curvilinear integral
        !          8529: <LI><TT>d</TT>: a double integral
        !          8530: <LI><TT>t</TT>: a triple integral
        !          8531: <LI><TT>S</TT>: the summation symbol
        !          8532: <LI><TT>P</TT>: the product symbol
        !          8533: <LI><TT>U</TT>: the union symbol
        !          8534: <LI><TT>I</TT>: the intersection symbol
        !          8535: <LI><TT>></TT>: a right arrow
        !          8536: <LI><TT>&lt;</TT>: a left arrow
        !          8537: <LI><TT>^</TT>:  an up arrow
        !          8538: <LI><TT>V</TT>: a down arrow
        !          8539: <LI><TT>(</TT>: an opening parenthesis
        !          8540: <LI><TT>)</TT>: a closing parenthesis
        !          8541: <LI><TT>{</TT>: an opening brace
        !          8542: <LI><TT>}</TT>: a closing brace
        !          8543: <LI><TT>[</TT>: an opening bracket
        !          8544: <LI><TT>]</TT>: a closing bracket
        !          8545: </UL>
        !          8546: </DIV>
        !          8547: 
        !          8548: <DIV class="section">
        !          8549: <H2>Graphical elements</H2>
        !          8550: 
        !          8551: <P>
        !          8552: The table below gives the codes for the graphical elements of Thot. These
        !          8553: elements can be used in presentation schemas constants and in transcoding
        !          8554: rules of translation schemas.  Each graphical element is represented by a
        !          8555: single character.</P>
        !          8556: <UL>
        !          8557: <LI><TT>c</TT>: an ellipse inscribed in the box
        !          8558: <LI><TT>R</TT>: a rectangle which is the shape of the box
        !          8559: <LI><TT>C</TT>: a rectangle with rounded corners
        !          8560: <LI><TT>t</TT>: a horizontal line along the upper side of the box
        !          8561: <LI><TT>h</TT>: a horizontal line as wide as the box and placed in its middle
        !          8562: <LI><TT>b</TT>: a horizontal line along the lower side of the box
        !          8563: <LI><TT>></TT>: a right arrow as long as the box's width and in its middle
        !          8564: <LI><TT>></TT>: a left arrow as long as the box's width and in its middle
        !          8565: <LI><TT>l</TT>: a vertical line on the left side of the box
        !          8566: <LI><TT>v</TT>: a vertical line as tall as the box and placed in its middle
        !          8567: <LI><TT>r</TT>: a vertical line on the right side of the box
        !          8568: <LI><TT>^</TT>: an up arrow as tall as the box and in its middle
        !          8569: <LI><TT>V</TT>: a down arrow as tall as the box and in its middle
        !          8570: <LI><TT>/</TT>: The southwest/northeast diagonal of the box
        !          8571: <LI><TT>\</TT>: the northwest/southeast diagonal of the box
        !          8572: <LI><TT>O</TT>: The northwest/southeast diagonal of the box with anarrowhead
        !          8573: at the top
        !          8574: <LI><TT>e</TT>: The northwest/southeast diagonal of the box with anarrowhead
        !          8575: at the bottom
        !          8576: <LI><TT>E</TT>: The southwest/northeast diagonal of the box with anarrowhead
        !          8577: at the top
        !          8578: <LI><TT>o</TT>: The southwest/northeast diagonal of the box with anarrowhead
        !          8579: at the bottom
        !          8580: <LI><TT>space</TT>: a transparent element
        !          8581: <LI><TT>P</TT>: a rectangle with round corners and a horizontal barat the top
        !          8582: <LI><TT>Q</TT>: an ellipse with a horizontal bar at the top
        !          8583: <LI><TT>L</TT>: a lozenge
        !          8584: <LI><TT>W</TT>: the upper right corner
        !          8585: <LI><TT>X</TT>: the lower right corner
        !          8586: <LI><TT>Y</TT>: the lower left corner
        !          8587: <LI><TT>Z</TT>: the upper left corner
        !          8588: <LI><TT>p</TT>: a polygon
        !          8589: <LI><TT>S</TT>: an open broken line
        !          8590: <LI><TT>N</TT>: an open broken line with an arrow head at start
        !          8591: <LI><TT>U</TT>: an open broken line with an arrow head at the end
        !          8592: <LI><TT>M</TT>: an open broken line with two arrow heads
        !          8593: <LI><TT>s</TT>: a closed curve
        !          8594: <LI><TT>B</TT>: an open curve
        !          8595: <LI><TT>F</TT>: an open curve with an arrow head at start
        !          8596: <LI><TT>A</TT>: an open curve with an arrow head at the end
        !          8597: <LI><TT>D</TT>: an open curve with two arrow heads
        !          8598: </UL>
        !          8599: </DIV>
        !          8600: </DIV>
        !          8601: </BODY>
        !          8602: </HTML>

Webmaster