The GELLMU ArchiveSectional Units in <abbr >GELL<hy0 />MU</abbr > (still at draft stage)1IntroductionSU-12Labeling and ReferencingSU-23Anchoring and Long Section TitlesSU-3Sec.4FourthSU-4Sec.5Another sectionSU-56SequencingSU-6Division ASpecial Sectional UnitsSU-7A.1First SubdivisionSU-7.1A.2Second SubdivisionSU-7.27A NonSpecial SectionSU-88General Usage for Sectional UnitsSU-98.1The content modelSU-9.18.2The Like Form of General UsageSU-9.2
1IntroductionIn classical one writes simply sectionSometitleforasection to begin a new section While this markup specifically delineates the section title, understands that a section has begun The section command has an option whose content is an alternate title for the table of contents, and the starred form of the command suppresses an otherwise automatic section numberWith SGML the classical approach is something along the following lines: sectionsectiontitleSometitleforasectionsectiontitleparaAparagraphparaAnotherparagraphsection Basic GELLMU markup corresponding to this would be:Or one could use: SectionsectiontitleSomeparaApara instead of using the environmentlike beginend construction beginsectionsectiontitleSometitleforasectionparaAparagraphparaAnotherparagraphendSection If, moreover, the markup is to be conforming XML markup, then each para tag would need explicit closure with paraThe main point here is that the open and close tags for a section in a classical SGML document type encompass the whole contents of a section, and separate markup is required for the section title.In fact, classical SGML document types are often even more elaborate than this.The didactic SGML document type under regular GELLMU seeks to model classical as closely as possible in order to provide a bridge for authors from to SGML (and, indeed, XML) For this reason a command section similar to the classical command that delineates a section title is provided in the didactic SGML document type At the same time this document type has a whole section container Section (upper case S) that in the simplest case consists of a shead container for its title (or header) followed by any number of paragraphs The XML form of the didactic document type supports only this latter tag, which means that the translation script that converts SGML to XML has an unambiguous way of performing the conversion from section to Section provided that the author's source leads to an SGML instance which is validCaveats: No document type definition under SGML is actually a complete language definition A document type definition describes a document markup structurally; in particular, it does not provide definition for legal field valuesWhile the GELLMU syntactic translator is now considered as alpha software, the document type and the accompanying translators, which constitute the didactic production system are developmental These materials have some support for obsolete practice and also contain sketch sections that are not fully robust under the didactic document type
2Labeling and ReferencingThe next sections demonstrate various ways of making sections They also demonstrate how sections interact with labels, references, and the GELLMU table of contents. The handling of sectional unit numbers, labels, references, and tables of contents is built into GELLMU at the point of XML generation in order to provide consistency across all ultimate output formats where such consistency is possible.The markup for the first section of this document was simply the classical like sectionIntroduction There are various combinations of sectional markup that may be usedThe markup for the present section is: sectionsheadLabelingandReferencing In the didactic GELLMU production system this is equivalent at the point of XML generation to the more like markup sectionThis sentence contains a label, marked up with the usage labelfirst, that is invisible and not part of the section header While it is the first authorprovided label in this document and the first label in the source file, it is not the first label in the XML version of the document since the translator from SGML to XML in the didactic production system writes a label automatically in every shead At any inline location in the document the label may be referenced by using the markup reffirst, and with this simple usage its value is first, i.e., the identifier of the sectional unit in which the label is locatedThe didactic production system also provides visible key label and reference commands klabel and kref For example, a kref reference to the last section is last, which is provided with the markup kreflast In a printonly format there might be little difference between writing kreflast and simply writing the key last But in a hypertext format kref may be used to generate an anchor
3Anchor References and the Handling of Section Titles when the Section Title is Long Enough to Require a Linebreak Under Most FormattingsThis section is opened with the like usage: sectionAnchoringandLongSectionTitleslabellongtitleAnchorReferencesandtheHandlingofSectionTitleswhentheSectionTitleisLongEnoughtoRequireaLinebreakUnderMostFormattingsThe purpose of the option string, as with is to provide a shorter section title for listing in the table of contentsHere is an ordinary ref reference back to section first This sentence contains an anchor (with anch) back to iref="first"section first If, as is the case here, the anchor uses an iref rather than an href, with the markup anchireffirstsectionreffirst, then the anchor might be unnoticeable in a printonly formatting while active in an online formatting This href="first"anchor, using the markup anchhreffirstanchor, which is for general web references, might produce a footnote in a printonly formattingThe option of an anchor, which is not an attribute option but rather becomes the element anchref in XML (while the anchor's argument its presented content becomes anchv), is expected to contain whitespace separated strings of the form name="value"The value strings may contain simple markup such as, for example, tld; to provide robust multiple output processing of whereas an attribute option may not contain markup where name is one of the following: fref A footnote reference Value is a string that becomes the content of an automatically created footnote to the text in anchv This usage is deprecated; use footnote instead href A web reference as with href in HTML That is, value is a URI It could be of the form labelkey where labelkey is the name of a label key that could just as well be used with iref For this the needs to be escaped, i.e., marked up as In a nonhypertext formatting the URI may be presented as a note or footnote associated with the text in anchv Href Same as href except that the author wishes to suppress any note or footnote presentation of the URI For example, the URI might be obviously deducible from the anchv content iref An internal reference; value must be a label key arising from label or klabel Note also that there is a command urlanch (probably should have been urianch), taking a single argument, used for URIs, which is intended to have the same effect as a newcommand with one argument for creating a web anchor with the URI as presented content
Sec.4A Fourth SectionThis section is introduced with the markup beginSectionFourthSeclabelbegin1AFourthSection (this time an upper case S) followed at its terminus by endSection It makes use of the first two of the three options for Section (and for Subsection, , section, subsection, ) The options, in order, are sopt, sprefix, and sunit They are explained in iref="last"section last below
Sec.5Another SectionFor this section the markup style of the previous section is used except that the options are replaced by commands bearing their explicit names The section opening construction is beginSectionsoptAnothersectionsprefixSecsheadlabelbegin2AnotherSection followed at its terminus by endSection
6SequencingAlthough one could provide SGML modeling for s counters, it would not be very much along the lines of main track XML document typesSequencing may be handled under the GELLMU didactic artice document type using labels and references Toward this end one makes use of three SGML attributes that are provided with the label tag: seriesThe value is the name of a sequenced family of labels A label may belong to at most one family, but there may be multiple labels at the same location There is no default value of seriesserseqThe value is the sequence number of the label in its series if a series is defined It is meaningless if no series is specified for the labelrefkeyThe name of a label key from which to spawn an automatically generated value for the attribute serseq of the current labelEvery label has a reference value that is normally accessed with the ref command This results in the creation, when the XML version is generated, of an XML entity reference with name based on the reference's key argument, that matches a CDATA entity definition at the top of the XML document The use of indirection provided by this entity technique means that it is immaterial whether the reference is forward or backwardThe evalref command gives access to the literal value of a reference without indirection, and places that value as a literal in the XML version of an article Thus, evalref is the name of a tag only in the SGML version An evalref invocation will be succesful only with a backward reference This is extremely useful for managing nondefault numbering of sectional units For ordinary label references its use is undesirable even though it is possible for backward referencesThe reference value of a label is determined as follows: Basic reference values are positive integers Upper and lower case alphabetic values and upper and lower case roman numeral values may be obtained by applying the series command (not to be confused with the series attribute for the label command) with the type attribute set to one of A, a, I, or i to a basic reference value If the label is assigned to a label series and is given a refkey attribute, then the reference value of the label is the reference value of the label referenced by the key that is the value of the refkey (This mechanism is used to restart the sequencing of the sectional unit id's at the end of this document.) Else if the label is assigned to a label series and the author supplies an explicit literal numeric value for the serseq attribute, then the value of serseq is its referenced value (Markup in particular, evalref cannot be used in defining an attribute value.) Else if the label is assigned to a label series, the reference value of the label is the next (positive integer) value for a label in that series (This mechanism is used to control the sectional id of the last section of this document It may also be used to run parallel interleaved sequences of sectional units, such as, for example, questions and answers, within a document.) Else the reference value of the label is the sectional unit id of the smallest sectional unit containing the label Here is where a label, which is invisible, is planted with the markup labelconmark so as to record the sectional unit id for the current section It evaluates to the sectional unit value, in this case 6 If that label were placed in a series, it would pick up as value the next value in the sequence associated with the series So a second label is planted with the markup labelseriesnsecrefkeyconmarkA key will be automatically assigned. to prime a new label series with the value (KEY-1) of the current sectional unit id for later use in continuing the current sequence of sectional unit id's
Division ASpecial Sectional UnitsThis sectional unit, which is parallel to toplevel sections, is specially sequenced by hand The markup for opening this unit is: section[][Division ][A]Special ... In regular GELLMU a like first option in which the first character is : is a sequence of SGML attribute specifications It is important to realize that attributes cannot contain markup In regular GELLMU, where one is allowing characters such as , , , and to serve as markup (because of their classical overloadingThis simply means that the actual meaning of the character depends on its context), only alphanumeric characters are safe in attribute values when entered this way For the most common situations, such as, for example, what might be the href attribute of anchIf one really needs an arbitrary CDATA attributes for, say, anch, this can be done using the SGML internal declaration subset, a like option can be provided like options handle what might be regarded as plain inline markupOne could also use for this a very similar syntax with Section, i.e., beginSection ... endSectionMake note of the secret phrase: name="indiv"valid markup A.1First SubdivisionA.2Second Subdivision
7A NonSpecial SectionTo avoid having to feed section numbers manually in the following or else spawning them from a label series, the opening of this section manually sets the section unit id
8General Usage for Sectional UnitsThis describes the content model in the didatic GELLMU document type for the whole sectional units Section, Subsection, as fully tagged 8.1The content modelThe content model for sectional units is: ((sopt)?,(sprefix)?,(sunit)?,(shead),(UnitContent)) where: UnitContent refers to the subsections, loose paragraphs, and other general content that is allowed inside a section shead is the required It may be left empty, but it must be present section header or title sopt is an optional title for use in the table of contents The presence of sopt does not cause a table of contents to be produced automatically For that one uses tableofcontents Moreover, the presence of sopt should have no effect upon a manually constructed TableOfContents. sprefix is optional markup for text that is to precede the sectional unit sequence notation For example, if the sectional unit sequence is B and sprefix is the markup string Appendix (ending with a blank space), then the visible indicator for the sectional unit, when consistent with the setting of secnumdepth, is Appendix B both at the beginning of the section and in the table of contents Or if the sequence is 3 and the sprefix is A, then the visible indicator is A3 sunit is an optional setting for the sectional unit sequence The GELLMU didactic document type has an attribute sid for the sectional units Section, Subsection, that is optional (and rare for author usage) in the SGML version but required in the XML version The translator from SGML to XML computes it in the standard way For example subsubsection 1 of subsection 3 in section 2 acquires the sid 2.3.1 It is expected that formatters will use this value for the visible sectional unit indicator, preceded, as previously described, by any sprefix, unless the user provides sunit While sunit is intended to override the visible indicator, it is not provided to override the sid attribute itself which a formatter should see as describing logical structure 8.2The Like Form of General UsageCorresponding like argumentoption syntax can be used, as previously indicated, in GELLMU source with section, subsection, If, however, argumentoption syntax is used, one must be mindful of the ordering of the options, and use empty option brackets, as necessary, to indicate the position in the sequence of an option with content For example, a sole option is understood as sopt, the version of the sectional unit title to be used in the table of contents To provide only sprefix with argumentoption syntax one precedes the bracket sequence for sprefix with an empty pair [] of option bracketsThe didactic GELLMU production system does not offer a way to furnish a formally empty string for actual use with the table of contents That is, the markup sopt furnishes an empty string which, in turn, signals no sopt For most purposes a visibly empty contents line may be achieved by inserting a blank space as the alternate title with the markup sopt Beyond that the document type should be extended with the provision of an empty element emptystring to indicate the empty string. for sopt