From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- support/gellmu/README | 441 ++++ support/gellmu/doc/gcompst.png | Bin 0 -> 21698 bytes support/gellmu/doc/glman.html | 3583 ++++++++++++++++++++++++++++++++ support/gellmu/doc/glman.pdf | Bin 0 -> 386650 bytes support/gellmu/doc/glman.xhtml | 3648 +++++++++++++++++++++++++++++++++ support/gellmu/doc/glmy.png | Bin 0 -> 4573 bytes support/gellmu/doc/userdoc.html | 1216 +++++++++++ support/gellmu/doc/userdoc.pdf | Bin 0 -> 210475 bytes support/gellmu/doc/userdoc.xhtml | 1402 +++++++++++++ support/gellmu/webstyle/gellmuart.css | 1876 +++++++++++++++++ support/gellmu/webstyle/mxh.css | 433 ++++ 11 files changed, 12599 insertions(+) create mode 100644 support/gellmu/README create mode 100644 support/gellmu/doc/gcompst.png create mode 100644 support/gellmu/doc/glman.html create mode 100644 support/gellmu/doc/glman.pdf create mode 100644 support/gellmu/doc/glman.xhtml create mode 100644 support/gellmu/doc/glmy.png create mode 100644 support/gellmu/doc/userdoc.html create mode 100644 support/gellmu/doc/userdoc.pdf create mode 100644 support/gellmu/doc/userdoc.xhtml create mode 100644 support/gellmu/webstyle/gellmuart.css create mode 100644 support/gellmu/webstyle/mxh.css (limited to 'support/gellmu') diff --git a/support/gellmu/README b/support/gellmu/README new file mode 100644 index 0000000000..b4eb734d9a --- /dev/null +++ b/support/gellmu/README @@ -0,0 +1,441 @@ + + GELLMU version 0.8 + + William F. Hammond + Department of Mathematics & Statistics + University at Albany + Albany, NY 12222 (USA) + + +CHANGES IN VERSION 0.8.4 (5 July 2007) + +--- + +"Regular" GELLMU: + +About 30 new commands have been added, mostly mathematical, including +more arrows, more dots, as well as "\prime" and "\backprime" +(emulating the corresponding AMS LaTeX names). Also "itimes" +(invisible times) and "icomma" (invisible comma) join "aF" (invisible +applyFunction) for optional use as weak semantic hints. + +The handling of mathematical prime accents has been completely revised +in order that the XHTML+MathML formatting will work better with the +(largely undocumented) handling of the corresponding unicode data +points in the web browsers that support MathML. In only a few cases, +however, will legacy source files require change. In this connection, +there is now an explicit rule for distinguishing in _regular_ GELLMU +source between uses of the character "'" as (a) apostrophe (\apos) +and (b) right-single-quote (\rsq): it's an apostrophe if and only if +it is followed by a "word-character" (as determined according to the +sense of that term for regular expression handling in GNU Emacs). +Sequences of two, three or four "'" characters become \rdq, \rtq, +or \rqq, respectively, unless, with the first of these the string +"''" is found to balance a previous string "``" in which case the +markup \quophrase{} is still generated. (Moreover, matching pairs of +"`" and "'" still generate \squophrase{} when that is enabled by +certain manners of calling the syntactic translator.) + +The handling of limits for sums, integrals, and products has been +revised beginning with a document type definition revision which +should be compatible with old source files that passed correctly +through the production stream. Although processing toward the LaTeX +and XHTML+MathML formats had been "working", there were errors in the +classic HTML handling of these limits resulting from the fact that the +SGML/XML content models for \sum, \int, and \prod had been inadequate. + +By default links, internal and external, found in \text{} in math mode +are now set using xlink rather than using an XML namespace switch to +enable HTML anchors. This is tied to the environmental variable +GELLMU_XLink. Also the previous limited handling of bold and italic +style in \text{} in math mode has also been revised to treatment that, +though less elegant, avoids namespace switching. + +When XHTML+MathML output is produced, but regardless of the +availabilty of "dtd" validation, the production stream provides a +"child-count" checker for certain MathML elements. It is intended +that this particular step, like the XML conformance check, will work +without reference to any formal document type definition. +Consequently, the use of classical HTML named entity references has +been eliminated. + +Width specification for tabular p-cells is now supported in HTML and +XHTML using CSS style attributes. + +There have been some miscellaneous revisions of the limited +representation of mathematics in the classic HTML formatting, and +there have been numerous bug fixes and minor improvements in all of +the various components of the "regular" production stream. + +--- + +Syntactic translator: + +Improved diagnostics for handling mismatched arguments in \newcommand +invocations. + +For the context of "regular" GELLMU: (1) elaborated handling of prime +accents and (2) stronger efforts to diagnose unbalanced '$' characters +for toggling in and out of inline math zones. + +Correction of a bug related to the signaling of an error when an +opening balancing character cannot be matched and elimination of the +unwanted double announcement of line numbers with many error messages. + +-- + +Documentation: + +There have been updates to both The Gellmu Manual and the Introductory +User Guide to Regular GELLMU. + +---------------------------------------------------------------------- + +CHANGES IN VERSION 0.8.3 (23 Oct 2006) + +IMPORTANT change necessitated by change in Firefox and other Mozilla +browsers: + +This update is mandatory for those who wish their XHTML+MathML outputs +to function properly in Mozilla. Because of a mid-September 2006 +change in Mozilla with the handling of equations and arrays of +equations, previously generated XHTML+MathML outputs will need to be +rebuilt. + +This release also has reduced use of XML namespace switching in the +XHTML+MathML outputs for the sake of greater compatibilty with +browsers that do not recognize it. + +The XML side door: + +The largest change in this update release concerns "Regular GELLMU" +(the didactic production system described in the GELLMU Manual). The +standard translation pipeline leading from LaTeX-like source through +SGML and XML document types to (1) LaTeX source (hence DVI and PDF +outputs), (2) classical HTML output with pseudo-TeX math, and (3) +XHTML with MathML output has been modified to capture along the way a +variant of the XML document type that is reusable as XML source. +Subsequent pipeline processing proceeds from that point with end +results equivalent to those in earlier releases. + +The new variant of the XML document type may be regarded as a +full-featured author level XML document type. It is usable and +modifiable by authors who choose to write XML syntax rather than the +LaTeX-like equivalent. + +The new author level variant of the XML document type is a suitable +target for translation from other XML document types, and therefore, +could provide an alternative way to format other document types for +PDF, HTML, and XHTML+MathML. + +Beyond that document instances under the new author level variant of +the XML document type should usually be "stand-alone" instances that +are suitable for semi-formatted viewing through the web with CSS +styling. They cannot be fully formatted because, for example, +numbering has not been inserted, and cross-references have not been +resolved. + +A consequence of having the XML side door is that the automatically +formatted LaTeX files will tend to have very long lines. + +Driver Scripts: + +For the regular GELLMU main track use the driver script "mmkg" to +build from regular GELLMU source. One should use the new driver +script "mmkgfromx" to build from XML source under the document type +defined in the DTD file "xml/axgellmu.dtd". (This DTD file lives +under the UTF-8 text encoding though presently only one little-used +element name is non-ASCII, and that name admits Latin-1 +representation.) + +Windows XP Support: + +In the case of a recently acquired (August 2006) ``notebook'' class +computer with ``Windows XP, Home Edition'', it was found after (1) +installing Cygwin, (2) then installing Cygwin packages for GNU Emacs, +Perl, Tcsh, TeX and LaTeX, OpenSP/OpenJade, and Expat (for the +important and basic "xmlwf" utility), and (3) making sure that all of +the appropriate executables are in one's command path (within Cygwin), +that the GELLMU tarball drops easily into "/usr/local/gellmu" (Cygwin +filesystem hierarchy), and the Linux driver scripts may be used. + +The bin/win32 directory in the distribution remains untouched since +2001 for lack of a volunteer interested in updating the batch files. +For that approach to be sensible one wants to acquire the free +software items mentioned above for regular installation in Windows +(apart from Cygwin -- but all of these things co-exist peacefully when +found in both worlds as far as this author knows). + +---------------------------------------------------------------------- + +Early 2006 + +IMPORTANT ISSUE for MathML output + +The newer versions of Perl are somewhat incompatible with less new +versions regarding the UTF-8 content-encoding. This can create +problems with parsing math zones while generating XHTML+MathML output. +One of the aspects of this issue is that the meaning of "use UTF-8" +has changed (as advertised by advance warnings). The specific concern +is with splitting a UTF-8 string into the array of its characters. + +It seems to be the case with Perl 5.6 that "use UTF-8" is adequate for +Gellmu's parsing, while with Perl 5.8.1 and later one wants both "use +UTF-8" and "use encoding". There seems to be no "encoding" available +by default in 5.6. Consequently, this release of gellmu provides a +dummy library "encoding.pm" that is intended for use when there is no +separate "encoding" package installed with Perl 5.6. With the newer +Perl versions simply move the small dummy "encoding.pm" out of (or to +another name in) the "perllib" directory in the Gellmu tree. + +---------------------------------------------------------------------- + +CHANGES IN VERSION 0.8.2.3 (25 May 2006) + +1. Bug fix. Intermediate XML file that is not standalone is so + labeled. + +2. Modified XHTML+MathML to use − as minus sign. + +3. Bug fix. Display style was not in force for "equation" and + "eqnarray" in XHTML+MathML + +4. Modified handling of "text" (for incidental text inside math + zones) so that the presence or absence, but not its extent, of + initial or trailing whitespace is significant in HTML and + XHTML+MathML formattings. Also fixed whitespace handling for + "bmod" and "pmod". Modified the LaTeX formatting so that "text" + is set as LaTeX's "text" instead of as "mbox". + +---------------------------------------------------------------------- + +CHANGES IN VERSION 0.8.2 (28 Feb 2006) + +1. Tables and Tabular now have functioning p cells. Only "par", + not "parb", should be used to introduce a new paragraph in + a tabular p-cell. For a forced linebreak inside a p-cell use + the named form \brk rather than "\\", which may only be used + to begin a new row. + +2. Horizontal alignment in tables and tabular now function in + HTML, as do horizontal rules (via hline in tabular or trule + in table) and vertical rules (via '|' in table or tabular + argument). Much of the new functionality with tables in HTML + is based on assuming web browsers have CSS2 support. + +3. Added support for the attribute "style" of "assertion", which + plays the role of \theoremstyle in LaTeX. If "style" is unset, + the assertion is set in italics, while if "style" has the value + "definition", the assertion is set upright. + +4. Bug. Finally decided to rely on CSS for HTML/XHTML handling + of assertion style. + +5. Bug. Used the "bm" package in LaTeX formatting (and CSS in + XHTML+MathML) to correct the appearance of "mathbf". + +6. The elements "par" and "parb" are no longer allowed inside "emph". + The element "par" now requires explicit closing in source. + +7. Use of the elements "mbox", "regch", and "text", is now restricted + to math zones. + +8. Minor changes will be needed in order for some old documents to be + used with new DTDs. + +9. Numerous bug fixes. + +---------------------------------------------------------------------- + +CHANGES IN VERSION 0.8.0.7 (01 Feb 2005) + +1. Bug/Change. Coding for the element "text" inside math elements + in "mathprep.pl" had assumed that "text" had no sub-elements + (consistent with the content model of MathML's "mtext"). + The author is debating with himself as to whether this is too + restrictive. Meanwhile that code has been changed. + +2. Change. Added AMSMath names "ltimes", "rtimes", and "mp" to + the "article" document type. + +3. Bug/Change. Pushed handling of the element "sref" out to end + formatters (parallel to handling of "ref") so as to use the + ".xlb" database. + +4. Change. Added handling in HTML and LaTeX formatters of "eqntag". + +5. Change. Positive labelwidth in LaTeX formatting of "menu" + and "Menu". + + +CHANGES IN VERSION 0.8.0.6 (01 Dec 2004) + +1. Bug fix. The script "mathprep.pl" was failing to write 'mchld=""' +when a container had no actual content, thereby causing "htmlgart.pl" +to exit with an error message. + +2. Bug fix. The parameter entity "%opline" was nonsensically +allowing "%fmath" content. Its model was tightend and a new version +"%mopline" using "math|tmath" instead of "%fmath" was created for use +with "itemlabel" and "op0". + +3. Bug fix. The shell script "bin/linux/lmkg" was revised to prevent +failure with some versions of "/bin/sh". + +4. Change. The HTML "dl" written by "htmlgart.pl" for formatting +"assertion" was revised to have "class" attribute "assertion" so +that CSS-controlled margins can be customized. + +5. Change. The CSS stylesheet "webstyle/mxh.css" was changed to zero +left and right margins for "dl.assertion" and to inhibit linebreaking +inside all "math" containers, inline as well as block. + +6. Bug fix. Comments were inhibited (for validation) at the top +level of "thebibliography". + +7. Change. Provided a GMT timezone option for the banner datestamp +in HTML output. + +---------------------------------------------------------------------- + +CHANGES IN VERSION 0.8.0.5 (10 Oct 2004) + +1. Bug fix. A small regressive bug in the LaTeX output stream from +version 0.8 caused line separation to be doubled for verblists +(corresponding to an enhanced form of LaTeX's verbatim) and addrs (for +surface mail addresses other than those in the preamble). + +2. Bug fix. Binomial coefficients were not being fenced in the +XHTML+MathML output. + +3. Bug fix. In LaTeX output there was unwanted space between +"\otimes" and any subscript attached to it. Changed unconditional +output for "" from "\otimes{}" to "\otimes " (not sure if +this is adequate). Similar changes for "times", "oplus", "cup", +"cap", "circ", and "wedge". (There is no parallel issue on this if a +unicode point for "otimes" appears in UTF-8 source, but then there +might be other issues in the UTF-8 category for latex.) + +4. Change. Comments in XHTML output that were present for +development purposes have been removed. + +5. Change. In the XHTML+MathML output only streamlined UMSS +materials are now being used when content MathML is not being written +(as is the case now). There is a user switch with the environmental +variable "GELLMU_NoUMSS" to turn off the use of UMSS materials (not +recommended apart from kiosk situations). For information about the +UMSS materials see http://www.w3.org/Math/XSL/. + +6. Change. The distribution directory called "css" has been replaced +by "webstyle", which now contains copies of the W3C UMSS materials as +well as "mxh.css". For the XHTML+MathML and classical HTML outputs +the default value for the web style directory name (containing both +xsl and css sheets) is now "../webstyle". The only override for this +is now via the environmental variable "GELLMU_StyleDir" (which may be +coded in a driver script such as "mmkg"). Take account of HTML "base" +directives, if used, when configuring "GELLMU_StyleDir" + +---------------------------------------------------------------------- + +CHANGES IN VERSION 0.8.0.4 (29 Sep 2004) + +These changes affect "regular" GELLMU, mainly in relation to +the new XHTML+MathML output. + +1. Bug fix. The handling of "\not" for XHTML+MathML in version 0.8 +suffered from a serious oversight. It has been completely revised +beginning with a change in the content model from empty to non-empty, +with content the operator under negation, possibly following "\," or +"\ ". An old source with, for example, the markup "a \not\,| b" will +still be good. + +2. Bug fix. There was a serious adverse interaction between the use of +'_' and '^' for range content with sums, products, and integrals and +other use in connection with XHTML+MathML output. + +3. Several old GELLMU sources have been found that failed processing +because of validation errors. While some of these were simply author +errors, others have led to small loosenings in the SGML and XML +document type definitions. + +4. SGML and XML files made from old sources that validate under old +DTDs may not validate under current DTDs. The DTDs from the 0.7.4 +release (July 2001) have been added to the current release in the +directory "dtd-old" for those who might need them. One change that +will trip a significant number of old documents is that loose inline +text is no longer allowed with "abstract" (nor in "legalnotice"). For +this in most cases the regular GELLMU source document may be updated +simply by beginning the abstract with a blank line. + +5. There has been further progress in writing the User Guide +(doc/userdoc). It is a work in progress. There have been requests +for a glossary of commands. That is in the works, but the plan +involves a literate formal document type definition. Meanwhile one +may search the DTDs "gellmu.dtd" (the Latin1 version or "ugellmu.dtd", +the UTF-8 version) for markup vocabulary. + +---------------------------------------------------------------------- + +NEW IN VERSION 0.8 (2 Sep 2004) + +The part of the project called "Regular GELLMU", which is a bridge +from LaTeX authoring to XML authoring in generalized LaTeX-like +markup, now has an output stream in the modern XML form of HTML +extended for mathematical content by the World Wide Web Consortium's +MathML. + +If an article has mathematical content, build it with "mmkg". + +If an article has no math, build it with "lmkg". (If it does have +mathematical content, it will still build, but there will be no output +stream in XHTML + MathML. The classical HTML output will contain +ASCII pseudo-TeX.) + +HTML with MathML is obtained from a regular GELLMU article by calling +the Perl program htmlgart.pl with argument "-mathml". Without that +argument the program writes classical HTML using ASCII pseudo-TeX for +mathematical content. Classical HTML is still useful in terminal +windows and with the shrinking number of graphic screen web browsers +for which there is no support for MathML without cost. If +htmlgart.pl is called with the argument "-xhtml", then it writes the +XML form of HTML using ASCII pseudo-TeX for mathematical content. + +"doc/userdoc" is a beginning at providing an introduction for users. +Please let me know what else should be explained there. + +At this time there has been no updating of the native command line +scripts for the win32 platform because the author no longer has +reasonable access to that platform. If a win32 platform user acquires +"Cygwin" with Emacs, Perl, TeX, and OpenSP, then it should be easy to +adapt the current Linux scripts for use. + +---------------------------------------------------------------------- + +ABOUT GELLMU + +GELLMU is an acronym for "Generalized Extensible LaTeX-Like MarkUp", +which is the author's concept for using LaTeX-like markup to write +consciously for SGML document types such as HTML, DocBook, TEI, or +GELLMU's own didactic LaTeX-like article. + +It evolved from earlier thought about delineation of a coherent subset +of LaTeX commands with the property that if a LaTeX document used only +those commands then it could be translated with full reliability to +other formats including HTML so that documents could be prepared both +for print and for the web from a single source. + +Essential information is in the manual, which may be found in the +distribution tree as "doc/glman" + +Both of these forms of the manual were prepared from a source file + + doc/glman.glm + +that is LaTeX-like markup for the didatic "article" SGML document +type. + +Additional information is available at the GELLMU web site: + + http://www.albany.edu/~hammond/gellmu/ + + diff --git a/support/gellmu/doc/gcompst.png b/support/gellmu/doc/gcompst.png new file mode 100644 index 0000000000..c9036d4962 Binary files /dev/null and b/support/gellmu/doc/gcompst.png differ diff --git a/support/gellmu/doc/glman.html b/support/gellmu/doc/glman.html new file mode 100644 index 0000000000..d8efbce24c --- /dev/null +++ b/support/gellmu/doc/glman.html @@ -0,0 +1,3583 @@ + + + + + + + + + +The GELLMU Manual + + +

The GELLMU Manual

+

Version 0.8.4 Release, July 2007

+

William F. Hammond

+

+Dept. of Mathematics & Statistics
University at Albany
Albany, New York 12222 (USA)

+

Email: hammond@math.albany.edu

+

Revision of July 5, 2007

+
Copyright © 2001–2007 William F. Hammond
+

ABSTRACT

+
+ +

This is the manual for Generalized Extensible LaTeX-Like +Markup (GELLMU). The central focus in the GELLMU project is to tie +LaTeX to the worlds of SGML and XML by providing LaTeX-like markup +for writing documents under SGML and XML vocabularies (formally +known as document types).

+ +

The Manual explains the distinction between basic and +advanced use, provides a description of regular +GELLMU as an instance of advanced GELLMU, and discusses +the use of the didactic production system, which is the project's suite of +processors for working with regular GELLMU.

+ +

The Manual also deals with the metacommands available when +writing GELLMU markup. One of these metacommands is the project's +emulation of LaTeX's newcommand, which makes it possible to +have macros taking multiple arguments while writing for an SGML or +XML vocabulary. +

+
+
+

Table of Contents

+
+
1  Introduction... * +
+2  Basic GELLMU... * +
+3  Metacommands... * +
+3.1  \documenttype... * +
+3.2  \newcommand... * +
+3.3  \begin{} … \end{}... * +
+3.4  \macro and \Macro... * +
+3.5  Macro-Level Fronting of SGML Element Names... * +
+4  Advanced GELLMU... * +
+4.1  Illustrations.... * +
+4.2  Multiple Argument/Option Syntax... * +
+4.3  Limitation in Regard to XML... * +
+5  The Didactic Document Type... * +
+5.1  Suggestions and Caveats... * +
+5.2  Markup Fundamentals... * +
+5.2.1  Explicitly named commands.... * +
+5.2.2  Certain single characters.... * +
+5.2.3  Certain strings... * +
+5.3  Large Structure... * +
+5.4  Sectioning... * +
+5.5  Labels, References, and Anchors... * +
+5.5.1  Labels and Sequencing... * +
+5.5.2  Anchors... * +
+5.5.3  Example Emulating a LaTeX Counter... * +
+5.6  General Usage for Sectional Units... * +
+5.6.1  The Content Model... * +
+5.6.2  The LaTeX-Like Form of General Usage... * +
+5.7  verbatim, verblist, and +manmac... * +
+5.8  Accents... * +
+5.9  Tabular Environment Emulation... * +
+5.10  Graphic Inclusions... * +
+6  Mathematics in article... * +
+6.1  General... * +
+6.2  Assertions... * +
+6.2.1  Examples... * +
+6.2.2  Usage for assertion... * +
+6.3  Equations and Equation Arrays... * +
+6.4  The \mathsym Metacommand... * +
+7  The Didactic Production System... * +
+7.1  Permission... * +
+7.2  Materials... * +
+7.3  Other Required Software... * +
+7.4  Using the syntactic translator... * +
+7.4.1  Operation in Batch Mode... * +
+7.4.2  Interactive Operation... * +
+7.4.3  Interrupting the Syntactic +Translator... * +
+7.5  Using the didactic production system... * +
+7.5.1  Staged Design... * +
+7.5.2  Default Staging... * +
+7.5.3  Parsing with nsgmls... * +
+7.5.4  Processing with sgmlspl... * +
+7.5.5  Environmental Variables... * +
+Appendix A  The GELLMU Archive... * +
+Appendix B  Release Notes... * +
+B.1  Comments on the Syntactic Translator... * +
+B.2  Comments on the Didactic Production System... * +
+B.2.1  Internationalization... * +
+B.2.2  Document Type Definitions... * +
+B.2.3  Translation to XML... * +
+B.2.4  Translation to HTML... * +
+B.2.5  Translation to LaTeX... * +
+B.2.6  Future Plans... * +
+
+ +
+

1.  Introduction

+ +

GELLMU is an acronym for “Generalized Extensible +LaTeX-Like MarkUp”, which is the author's concept for using LaTeX-like +markup to write consciously for SGML document types such as HTML, +DocBook, TEI, or GELLMU's own didactic LaTeX-like document +type called article.

+ +

It evolved from earlier thought about delineation of a coherent subset +of LaTeX commands with the property that if a LaTeX document used +only those commands then it could be translated with full reliability +to other formats including HTML so that documents could be prepared +both for print and for the web from a single source.

+ +

Problems with this early thought during the years 1996–1997 included +the fact that there did not seem to be a community of LaTeX users +willing to focus on a narrow vocabulary and the fact then of a legacy +practice that mixed LaTeX commands freely with non-LaTeX TeX +commands.

+ +

The present idea was crystalized in the summer of 1998 while the author +was looking at Ulrich Vieth's LaTeX markup for the TeX Directory +System (TDS) specification from the TeX User Group +(TUG), which now is physically realized in TUG's +TeXLive series of TeX-related software distributions on +CDrom. The HTML version of that specification was derived +through an intermediate ad hoc translation from LaTeX to +Texinfo, the language of the GNU Documentation System, +which is a robust hypertex system pre-dating HTML driven by TeX +the Program.

+ +

In thinking about generalizing Vieth's ad hoc translation, which used +GNU Emacs Lisp (Elisp), one of the most widely available +free cross-platform programming languages +for which there is a free robust engine, the same engine that +underlies the interactive editing interface of Emacs, the author +realized that the structure of Texinfo is very much like that of an +authoring level SGML document type. From that idea it was a small +step to decide that one might profitably write Elisp code to use LaTeX-like +markup for the conscious writing of a new LaTeX-like article document +type.

+ +

The idea, which by itself saves keystrokes, gains significant power +with the emulation of LaTeX's newcommand. Although SGML +markup offers both subdocument inclusions and macro substitutions +using the notion of entity, there is no SGML-standard macro +facility that takes arguments. Moreover, GELLMU's newcommand, +which is, unlike LaTeX's, a simple macro substitution facility, +also provides a base for experimenting with document type extensions +in a way that the SGML notion of entity does not since SGML +entities are invoked with a notation that is apart from that used to +markup with SGML elements, which are the objects corresponding +in the GELLMU scheme with LaTeX-like commands.

+ +

Software associated with the GELLMU project falls into two parts: +

+
    +
  1. The syntactic translator. This is a purely syntactic layer for converting + LaTeX-like markup in configurable ways to SGML markup. Its output may + be handled in standard SGML or XML systems.

    +
  2. +
  3. The didactic production system. This component is a sketch, which might usefully + serve as a base for further development, of an SGML production + system for an authoring environment that consists of +

    +
      +
    1. An SGML document type called article that is + accompanied by a corresponding XML document type. +

      +
    2. +
    3. A package of extensible translating utilities written + in the language Perl. +

      +
    4. +
    + + As its name suggests, these materials are didactic and + should be regarded as unfinished for production work.
  4. +
+

+ +

There are two overall concepts: basic mode and advanced +mode. The basic mode may be used to write consciously for any +standard document type such as HTML, DocBook, or TEI, +and the syntactic translator is for that mode the only software under this project that +might be relevant. The advanced mode incorporates a configurable +broader array of LaTeX-like markup features, mostly for brevity, in the syntactic translator. +This mode is fully developed only for use with a LaTeX-like document type +such as the didactic article document type that is part of the +didactic production system.

+ +

One may use any SGML or XML processing framework in working +with the article document type. The didactic production system includes what is +needed to produce both HTML and regular LaTeX forms of an +article instance. Consequently, one is able to produce both +DVI using the LaTeX format for TeX, the program, and PDF +using the LaTeX format for PDFTeX, the program. Moreover, one +may tune the PDF in various ways using small alterations of the +Perl code for translating the XML version of article +to regular LaTeX. +

+
+ +
+

2.  Basic GELLMU

+ +

Neither the basic nor the advanced mode involves in any way adoption +of the language of LaTeX. (But many command names under the didactic +article document type, mimic LaTeX command names.) There are +two fundamental ideas: +

+
    +
  1. A LaTeX-like command “\foo” corresponds + to an SGML element “<foo>”.

    +
  2. +
  3. The syntactic translator is almost entirely ignorant of vocabulary + and a name like foo need not have meaning in it although + it must have meaning in the document type for which one is + consciously writing.1

    +
  4. +
+

+To use the basic mode one must be familiar with the SGML document +type for which one is writing. Ordinary HTML is an example. Very +few of the features in the advanced markup not also part of the basic +markup2 +make any sense for use in the direct preparation of HTML with LaTeX-like +input.

+ +

GELLMU uses LaTeX special characters such as ‘\’, +‘{’, and ‘}’ along with LaTeX-like argument/option syntax, +where braces immediately following a command name indicate command +arguments and square brackets, i.e., ‘[’ and +‘]’, indicate command options. A command corresponds to +an SGML element, and in basic mode a command may have at most one +argument, the content of which corresponds to SGML element content, +and at most one option, the content of which corresponds to a list of +SGML attribute specifications. Thus for example, in basic mode for +HTML one may use the markup +

+
+\a[href="http://www.w3.org/"]{The World Wide Web Consortium}
+

+to form the HTML anchor: +

+
+<a href="http://www.w3.org/">The World Wide Web Consortium</a> +.
+

+(The formation of anchors with the didactic article document +type in advanced mode is slightly more complicated because the +characters ‘=’ and ‘/’, which may acquire special (and +“overloaded”) semantic significance in mathematical +contexts, are held for delayed evaluation as empty elements and +because the syntactic translator, which does not recognize command names, regards this +usage in advanced mode as multiple +argument/option syntax (section 4.2), which is not part of basic +mode.)

+ +

An example of the distinction between basic and advanced GELLMU is that +in advanced mode it is possible and easy to arrange to have a blank line, +as in LaTeX, represent the beginning of a paragraph. In basic mode +for HTML one +must3 +use “\p” to begin a paragraph, and for the XML version of +HTML one must also provide markup for the end of every paragraph, which +may be done in several ways.

+ +

For some of the details on using the basic markup with HTML see +Using the GELLMU Syntactic Translator to Write HTML. +It will be instructive to have the parallel source +markup available at the same time. +

+
+ +
+

3.  Metacommands

+ +

A metacommand is a LaTeX-like command that does not correspond to an +SGML element. Each metacommand is handled internally by the +syntactic translator. +

+ +
+

3.1.  \documenttype

+ +

A document prepared in GELLMU source usually begins with a +documenttype command. For example, +

+
+\documenttype{html}
+

+is used to begin a document prepared for the most common form +of classical HTML.

+ +

The syntactic translator has two public variables +gellmu-doctype-keylist and gellmu-doctype-info, +which are Elisp associative lists, that enable one to match XML +or SGML “<!DOCTYPE ... >” declarations with +LaTeX-like +

+
+\documenttype[my-optional-key]{my-doctype}
+

+commands, where my-optional-key is available to override a +default key for my-doctype. Thus, for example, +“\documenttype{html}” points to the default key for +“html”, which is “html-4.01” and which points to +the W3C HTML 4.01 Transitional document type, while +

+
+\documenttype[xhtml-1.0s]{html}
+

+indicates W3C XHTML 1.0 Strict.

+ +

A user may configure these variables without modifying the source +code for the GELLMU syntactic translator, but minimal knowledge of Elisp will +be required. A future release might provide a configuration file +for this purpose.

+ +

A second option for the documenttype metacommand, which must +follow the single required argument, is provided for writing an +internal declaration subset. The contents of an internal declaration +subset constructed this way may be any internal declaration subset +material. However, some care is required for entering characters +that are special. To ease the handling of special characters four +metacommands have been provided for use inside the internal declaration +subset: +

+
+
\attlist{...}
+
\element{...}
+
\entity{...}
+
\notation{...}
+
+

+For example, a user who wishes to be able in source to use +“&quo;” to reference the ASCII quotation mark +when writing consciously in basic mode for TEI.2 would begin +the source file with: +

+
+
+\documenttype{TEI.2}[
+
+\entity{quo "&#x22;"}
+
+]
+
+

+

+
+ +
+

3.2.  \newcommand

+ +

From a user's viewpoint this provides emulation of LaTeX's +newcommand. But it is a simple facility providing macro +substitution with arguments forward in a source file from the +point of its occurrence. It differs from the newcommand +facility in LaTeX in that it does not add the name +of a newcommand to any namespace. Instead, as the syntactic translator encounters +each newcommand definition, it performs the corresponding expansions +and then forgets the name.4

+ +

The general construction of a newcommand definition is +

+
+\newcommand{name}[nargs][first]{value}
+

+where name is the name of the newcommand, +nargs optionally specifies the number of its arguments, +first is an optionally-provided default value for the first +argument, and value denotes the value string.

+ +

In the value string the character ‘#’ is used to reference an +argument by the numeric value of its position. Thus, “#1” +refers to the first argument that is provided at an invocation of +the newcommand, “#2” the second, etc., and there is no limit +on the number of arguments. It is not required that nargs be +supplied in order to define and use a newcommand taking +arguments. However, for the sake of automatic error checking the +use of nargs is strongly recommended when the definition of +a newcommand taking arguments is entered.

+ +

Example. In writing HTML one might use +

+
+
+\newcommand{\href}[2][http://www.w3.org/]{\a[href="#1"]{#2}}
+
+

+for brevity in writing many HTML anchors. With this definition the +invocation +

+
+\href{http://www.myweb.mydomain/me.html}{my web page}
+

gives +rise to the HTML markup +

+
+<a href="http://www.myweb.mydomain/me.html">my web page</a>
+

+while the invocation +“\href{Web Central}” gives rise to +

+
+<a href="http://www.w3.org/">Web Central</a> .
+

+ +

Rules. +

+
    +
  1. The name of a newcommand may not be referenced in its +value string.5 +

    +
  2. +
  3. A newcommand may not be invoked before it is defined unless +the invocation occurs in the value string of another newcommand +definition in which case the definition of the latter may be first and +must be first if the invocation of the former in the definition +of the latter involves argument substitutions.

    +
  4. +
+

+ +

Failure to observe these rules may cause the syntactic translator to enter an infinite +recursive loop. If a user suspects this may have happened, then the +invocation of the syntactic translator should be interrupted (section 7.4.3). +

+
+ +
+

3.3.  \begin{} … \end{}

+ +

These provide emulation of LaTeX environment notation without +actually providing anything that is not otherwise available. Markup +which resembles that for a LaTeX environment simply resolves to an +SGML element. This usage may be convenient for SGML elements of +large scope such as, for example, the body of an HTML +document.

+ +

With advanced mode the special form +

+
+\begin{document} . . . \end{document}
+

+may be used to emulate the corresponding feature of LaTeX for a +document type, such as the didactic article document type, +that in the large consists of a preamble and a body. +

+
+ +
+

3.4.  \macro and \Macro

+ +

Use of these is discouraged in the absence of a need. One situation +that presents a need is name “fronting”: see the +discussion below in section 3.5. +Please note that in most situations one may use newcommand +without an argument for simple macro substitutions.

+ +

macro and Macro do very much the same thing except +for the order of expansions. Every macro is expanded forward +as encountered before any newcommand definition is expanded. Every +Macro is expanded forward after every newcommand +has been expanded.

+ +

There are four primary differences between macro and Macro, +on the one hand, and newcommand, on the other hand. +

+
    +
  1. Neither macro nor Macro can be used to define a +macro that takes arguments.

    +
  2. +
  3. The name of a newcommand must consist of word characters, +but there is no restriction on the characters, apart from unbalanced +brace characters (‘{’ and ‘}’), that may appear in +the name field of a macro or Macro metacommand.

    +
  4. +
  5. If the name of a macro or Macro does not begin +with the command sequence introducer, i.e., the character ‘\’, +then an invocation of that metacommand is given by every forward match +of its name. The use of such names is strongly discouraged because +document segments can then become opaque much too easily.

    +
  6. +
  7. A newcommand invocation, absent the use of a semi-colon +for termination, is only effective at the whole word level — with +word here denoting a maximal string of successive word +characters — whereas macro and Macro invocations are +effective regardless of word boundaries.

    +
  8. +
+

+ +

Elaboration on the last point: If x is the name of a +newcommand, then invocations are +only considered by the syntactic translator on the string “\x” when it is followed +by a non-word character. For example, if the locale is us-ascii, +then the word characters are the 52 upper and lower case letters +and the ten numerals. Therefore with newcommand, as with its +namesake in regular LaTeX, the use of “x” as a name will +not intercept the occasions of “\x” as an initial +substring of “\xy”. With either macro or +Macro such interception does take place. One may block it at +the point of an invocation with the markup “\x;”, and when +this is done, the terminating semi-colon is removed.

+ +

Human authors using either macro or Macro may find +unanticipated interactions between the three forms of macro +substitution.

+ +

Unbalanced brace characters, i.e., the characters ‘{’ and +‘}’, may not be used in the name field or the value field of +any form of macro metacommand. +

+
+ +
+

3.5.  Macro-Level Fronting of SGML Element Names

+ +

The word fronting as used here describes the practice of +modifying the meaning of an SGML element name by using one or +more of the macro facilities to generate usage of the same name as +an element combined with other markup using the syntax that would +otherwise correspond to basic use of the element.

+ +

Suppose, for example, one wants all paragraphs in HTML (marked +with \p in GELLMU source) to be placed in a (style) class called +custom.

+ +

Recommended procedure: Create a new unique name and then use +macro to front it. +

+
+
+\newcommand{\cp}[1][]{\p[class="custom"]{#1}}
+
+\macro{\p}{\cp}
+
+

+Each invocation of “\p{...}” will first be replaced by “\cp{...}” +because all macro definitions are expanded before any +newcommand definition is expanded. Subsequent expansion +of the newcommand will yield +

+
+\p[class="custom"]{...} .
+

+ +

This will not intercept the alternate, otherwise nearly equivalent, +markup given with \begin{p}\end{p} since newcommand +is based on simple macro substitution and does not operate at the +level of namespaces. +

+
+
+ +
+

4.  Advanced GELLMU

+ +

The idea with advanced GELLMU is that for SGML document +types sharing structural characteristics with LaTeX one might +wish to have the syntactic translator provide LaTeX-like markup syntax beyond the level +used with basic GELLMU and that these additional layers of syntax +should be configurable. The only substantial realization of this +program so far is the case of the GELLMU didactic document type called article. +The specifics of that realization are discussed in the following +section. +

+ +
+

4.1.  Illustrations.

+ +

One might want to be able to use blank lines, as in +LaTeX, for introducing new paragraphs in a document type that +provides paragraphs.

+ +

In some article-level document types each sectional unit has a unit +header providing markup for various, often optional, unit descriptors. +It is convenient to be able to use LaTeX-like multiple +argument/option syntax (section 4.2) for these.

+ +

If the document type provides authoring-level mathematical markup +beyond inclusions of the World Wide Web Consortium's +Mathematical Markup Language (MathML) +under its XML namespace +regime, then one might want to be able to use the ‘$’ character +to toggle in and out of inline math, and if the document provides +for math displays, then one might want to use, as in LaTeX, the +strings “\[” and “\]” as delimiters for +unstructured mathematical displays, and markup such as +

+
+\begin{equation} . . . \end{equation}
+

+for a single equation, and markup such as +

+
+\begin{eqnarray} . . . \end{eqnarray}
+

+for a list of equations.

+ +

It is important to emphasize, however, that by overall system design +the syntactic translator operates without substantial knowledge of vocabulary. While +it is true that if ‘$’ is to provide a toggle for an inline +element containing math, say, tmath, then the syntactic translator needs to have +that association made, but the association is provided as the +value of a configuration variable in the syntactic translator that can be changed +between documents so that the syntactic translator may be used with many document +types.

+ +

One way to make such configuration convenient is to use an array of +Elisp functions that are fronts with various variable configuration +packages for the basic function gellmu-trans in the syntactic translator. +

+ +

The general outline for advanced GELLMU with arbitrary document types +is not fully developed in the present release. Instead the project +has concentrated on the realization of these ideas for the project's +didactic article document type, which is the subject of the +next section.

+ +

As the syntactic translator stands now, basic mode is characterized in the syntactic translator by the +true setting for its Boolean variable gellmu-straight-sgml, +while the configuration used by default for the didactic document type (which +could be handled in basic mode with more verbose source markup) +has that variable set false and also the variable +gellmu-regular-sgml set false.

+ +

The term regular GELLMU refers to use of the +syntactic translator with the default configuration for the didactic document type. It involves nearly +maximal emulation of LaTeX-like markup; it implies both advanced mode +and the didactic document type (section 5) article. +

+
+ +
+

4.2.  Multiple Argument/Option Syntax

+ +

An essential point in the present design is that the whole system +is built from components, each of which has its own +function6. +Consistent with this design the syntactic translator operates with knowledge of syntax +but little or no knowledge of language.

+ +

Multiple argument/option syntax has been built into advanced mode as +part of the overall idea of providing, where sensible, LaTeX-like +features in a precise user markup interface for writing in document +types under SGML and XML.

+ +

What are the rules for converting the multiple argument/option syntax +in source markup into SGML? Direct conversion by the syntactic translator of this +type of usage into XML is not available because such conversion +requires some language knowledge and the program does not operate with +knowledge of language at that level7. +One obtains an XML version of a +document in the didactic production system by using a translator with +minimal knowledge of the command vocabulary to create the XML version +from an SGML version that is the immediate output of the syntactic translator.

+ +

In multiple argument/option syntax, which is much like that of +LaTeX, arguments and options follow command names. Arguments are +delimited by braces, i.e., ‘{’ and ‘}’ and options +by square brackets, i.e., ‘[’ and ‘]’. There +must be no white space between the arguments and options nor between +the command name and the first member of an argument/option sequence.

+ +

Each command with a multiple argument/option sequence is translated to +an open tag whose name is the name of the command. Each argument is +translated to an ag0 element and each option to an op0 +element. (Both ag0 and op0 lie in GELLMU's reserved +name space.) There are two exceptional cases. + +

+
    +
  1. The first argument or option is an option inside which the very +first character is a colon, i.e., ‘:’. This is the method +provided in advanced mode for the direct entry of an SGML attribute +sequence.8 +The entire contents of the option string, apart from the +leading ‘:’, which is discarded, are understood to be a +sequence of SGML attributes for the SGML element whose name is the +name of the command. There is no syntax check of the attribute +contents by the syntactic translator. Such an attribute option is not treated +as an op0 element. In particular, an attribute option is +correctly followed immediately by a semi-colon, i.e., the character +‘;’, if and only if the corresponding SGML element is a +defined-empty element under the SGML document type. Since SGML +attributes correspond to very little of classical LaTeX9, +attribute options are seldom used10 +in the didactic production system. One such use is for the GELLMU equivalent of latex's +equation* and eqnarray* environments, which is marked up +this way: +

    +
    +
    +\begin{equation}[:nonum="true"]
    +
    +e = mc^2
    +
    +\end{equation}
    +
    + +to produce: +
    +e  =  mc^{2} +
    + +
  2. +
  3. The first argument is the only argument and there are no options +apart from a possible attribute option. This case, which is extremely +common, is exceptional relative to argument/option handling +since the sole argument simply becomes element content without an +ag0 wrapper. +

    +
  4. +
+

+ +

When a command has a multiple argument/option sequence, the question +arises whether the ag0 and op0 elements that arise from +the arguments and options are the only content of the element +corresponding to the command. The syntax does not provide a way to +determine this. On the other hand, the SGML document type definition +does provide information that indicates whether other content is +possible. It is beyond the scope of the design of the syntactic translator for the +syntactic translator to read a document type definition. The syntactic translator does, however, +have a configurable list variable gellmu-autoclose-list +that contains the names of elements +for which no content beyond the elements arising from arguments and +options is possible. While it is not necessary that every such +command be entered in this list, when such a command not in the list +is not explicitly followed by an element closing command, it is +possible in some instances for an SGML parser to infer incorrectly +the location of end of the element. Thus, the didactic production system provides a +command anch for making anchors. The document type definition +provides for one option, a reference, and one argument, the anchored +text.11 +Because the syntactic translator does not consider the document type definition, +if one enters the markup +

+
+\anch[href="http://www.w3.org/"]{W3C} HQ ,
+

+unless the name anch is in the list12 +gellmu-autoclose-list, +an SGML parser will not have reason to close the anch until +it sees the space following the anchored text “W3C”, and so +that space will be considered insignificant white space with the result +that there will be no space between the anchored text and the following +“HQ”. +

+
+ +
+

4.3.  Limitation in Regard to XML

+ +

A final general comment about advanced mode is that the features it +can provide beyond basic mode when one is writing consciously for an +XML document type are somewhat limited. For example, blank lines +cannot easily be made adequate for paragraph markup with the XML form +of the didactic article document type. Although it is not a +specific limitation for future editions of the syntactic translator, the vision is that +use of advanced mode will be specifically for a somewhat rich SGML +version of a document type. +

+
+
+ +
+

5.  The Didactic Document Type

+ +

The didactic document type is the document type underlying what is called regular +GELLMU. It is the heart of the idea of GELLMU as a bridge for authors +from LaTeX to the world of XML. More specifically, the bridge is +from the world of a LaTeX article to a document type in the +world of XML, also called article, that has a structure and a +vocabulary similar to those of the LaTeX document class.13 +The techniques used in the didactic production system are extensible and can be carried over +to other types of documents than articles. It is important to note +that there are many features in regular LaTeX which have no analogue +so far in the development of this project. One might hope to get an +idea of the extent of coverage by reviewing the examples in the +project archive (appendix A).

+ +

When an author prepares a document as a LaTeX article, the +document is being marked up as data for a specific typesetting +program: Donald Knuth's program TeX running with the main LaTeX +facilities loaded.

+ +

When an author prepares a document as GELLMU source, the syntactic translator provides +a LaTeX-like markup interface, but its output is not data for a +specific typesetting program. Rather it is data for a broad class of +processors. This means that multiple output formats can be obtained +from a single source without the need for human intervention because +XML provides a framework that makes it relatively easy to create +reliable programs for translation from an XML document type to other +formats. It offers, moreover, the possibility of translation to +future formats free of any need for human intervention once +translators from the original document type to such formats are +written. The small price one pays for this advantage in moving from +LaTeX markup to GELLMU markup is that the author must learn a few +new things.14

+ +

There are two formal constructions of the didactic document type. The name of the +document type is article. The first construction is an SGML +version of article that provides features convenient for +authors that are not available under XML. The second is an XML +version. For most non-technical purposes the two constructions should +be regarded as equivalent.

+ +

The SGML construction of an article is derived from GELLMU +source markup for a document by using the syntactic translator. The didactic document +type is accompanied by a translator implemented under the Perl +language framework sgmlspl by David Megginson (see +the release notes in appendix B +for more information) for converting the SGML version of an +article to the XML version.

+ +

The description in this section of the manual deals primarily with +source level markup for the didactic document type and with how it is handled 15 +by the time the XML version of an article is generated. Secondarily +there is comment on how it is rendered in the chief output formats +of the didactic production system, which are PDF, classic HTML, and XHTML+MathML.

+ +

A quick glance at the flowchart (section 7.5.2) shows that the first +XML stage — author-level XML — may be viewed as a second entry +point to didactic production system processing. Some day this could become a reasonable +formatting route for translations from things like Texinfo, +DocBook, and, even perhaps, classical LaTeX itself via a +processor such as tex4ht. +

+ +
+

5.1.  Suggestions and Caveats

+ +

Although this is the manual for a software release, it is not a book. +A document of book size would be required for a full description of +the didactic production system.

+ +

Much of the markup vocabulary is copied from LaTeX. There are some +instances where there is some deviation from LaTeX usage, and many +of those instances are mentioned here.

+ +

Definitive information about the didactic document type may be derived by consulting the +document type definition. Because the didactic production system is conceived as a base for +future development there are sketches in the document type definition +that are not covered by the didactic processors. For example, +although there is sketched code for the analogues of LaTeX's +paragraph and subparagraph commands, which are sectional +in nature, that is found in the translation from SGML to XML, there is +no sketched code for these elements in the two formatters.

+ +

Another way to obtain information about the didactic production system is by studying +examples including this manual and the examples in the +project archive (appendix A). +

+
+ +
+

5.2.  Markup Fundamentals

+ +

There are several kinds of commands: +

+ +
+
5.2.1.  Explicitly named commands.
+ +

Apart from macro level +metacommands an explicitly named command begins with a maximal +string introduced by the character\followed by +word characters, including the numerals0’, ‘1’, +…, ‘9’. The notion of word character depends on +one's locale, a concept that is formalized in GNU Emacs. In the +ASCII character set the word characters are the 52 upper and +lower case letters and the 10 numerals. The first numeral, if +any, must not be ‘0 since such names are reserved for use by +the syntactic translator. Command names are case sensitive.

+ +

An explicitly named command is a container, corresponding to an +SGML element, if its name is immediately followed, without +intervening white space, by the character ‘{’. In that case +the delimited zone of containment normally ends with the subsequent +balancing character ‘}’. (LaTeX-like +multiple argument/option (section 4.2) chains deserve more +discussion; for now it will suffice to point out that the use of the +\anch command in this document for making “anchors” is an +example, and, of course, LaTeX's \frac command is another example. +For the present discussion these commands are considered to be +containers.)

+ +

An explicitly named command corresponds to an SGML +defined-empty element if its name is immediately followed, +without intervening white space, by the character ‘;’.

+ +

An explicitly named command corresponds to an SGML element closing +tag if its name is immediately followed, without intervening +white space, by the character ‘:’.

+ +

The name of an explicitly named command is terminated by a non-word +character. There is a small, possibly acceptable, level of syntactic +ambiguity unless the name terminator is one of ‘{’, +‘;’, ‘:’, or ‘[’.

+ +

In basic mode if the name terminator is ‘[’, then that +character introduces a list of SGML attribute specifications, each of +the form name="value", and the list must be +terminated by the character ‘]’. Then if the following +character is ‘{’, the named command is a container that ends +with the balancing ‘}’. Otherwise the following character +may be ‘;’ if the named command is a defined-empty element and +must be so in that case for direct editing of an XML document type.

+ +

In advanced mode if the name terminator is ‘[’, then that +character introduces a LaTeX-like command option — part of the +emulation of LaTeX's multiple argument/option syntax (section 4.2) +— unless it is immediately followed, without intervening white space, +by the character ‘:’, in which case the bracketed content is +a list of SGML attribute specifications. (The initial ‘:’, +which may be used optionally in basic mode, is discarded.)

+ +

In any other case there is some syntactical ambiguity. The syntactic translator will +produce a corresponding SGML open tag unless the logical variable +gellmu-xml-strict has been set.16 If +the usage is consistent with the structure of the document type, an +SGML parser will in many cases be able to handle the result +correctly. The result of this type of syntactic ambiguity in source +markup is not tolerated if one is editing directly for an XML document +type. The terminator can be a blank space, but, if so, the +blank space is likely to become invisible after SGML parsing much +in the way that in LaTeX the markup +

+
+\LaTeX document
+

+will be collapsed into the single word form “LaTeXdocument” +when typeset.17 +

+
+ +
+
5.2.2.  Certain single characters.
+ +

The characters +‘\’, ‘{’, ‘}’, ‘^’, +‘_’, ‘$’, ‘%’, and ‘~’ +have command meanings that are similar to their meanings in LaTeX. +The characters ‘;’ and ‘:’ are ordinary characters that +have special meaning at the end of a command name. The character +‘#’ is also a special character used, as with LaTeX, in +newcommand templates. In source for the didactic +article document type any non-alphanumeric ASCII +character may be escaped (referenced for itself) with a named command, +e.g. ‘~’ may be referenced for itself as \tld;. This +is necessary in order to provide delayed evaluation for +ultimate translation to one of many possible ultimate formats.

+ +

The following language meanings apply to both basic and advanced +markup: +

+
    +
  1. \”: Command introducer.
    Escape in basic mode: \\ . This escape is + incorrect in advanced mode since this notation has a different + meaning — forced linebreak — in LaTeX itself. For the + didactic article + document type the escape is \bsl; . For other document + types one may resort to an entity reference + if adverse to providing a corresponding + defined-empty element or if one lacks control of the document type. +

    +
  2. +
  3. {”: Command argument opener.
    Escape: \{ or \lbr; . +

    +
  4. +
  5. }”: Command argument closer.
    Escape: \} or \rbr; . +

    +
  6. +
  7. [”: Command option opener.
    Escape: \lsb; (usually not necessary18). +

    +
  8. +
  9. ]”: Command option closer.
    Escape: \rsb; . +

    +
  10. +
  11. ;”: Command terminator for defined-empty tags.
    Escape: \scl; . + Usually an ordinary character. + Its use as a command terminator is invisible and may be + omitted optionally in some contexts. This syntax is analogous to + the use of ‘;’ as an entity reference terminator in SGML. +

    +
  12. +
  13. :”: Command terminator for close tags.
    Escape: \cln; . + Otherwise an ordinary character. + Its use as a command terminator is invisible. +

    +
  14. +
  15. %”: Comment introducer, in force to end of line.
    Escape: \% or \pct; . +

    +
  16. +
  17. #”: Argument marker in newcommand definitions.
    Escape: \# or \hsh; . + In the definition of a newcommand “#1” indicates the first + invocation argument, “#2” the second invocation argument, etc. + (There is no limit on the number of arguments.) +

    +
  18. +
+

+ +

The following language meanings apply to advanced markup with +allusion to the didactic article document type. +

+
    +
  1. ~”: Non-breaking interword space.
    Escape: \tld;.19
    Equivalent: \nbs;, cf. &nbsp; in HTML. +

    +
  2. +
  3. ^”: Superscript command.
    Escape: \crt; .
    Equivalent: \sup or, in math, \msup . +

    +
  4. +
  5. _”: Subscript command.
    Escape: \_ or \und; .
    Equivalent: \sub or, in math, \msub . +

    +
  6. +
  7. &”: Dual use: tabular cells and entity introducer.
    Escape: \& or \amp; .
    &’ introduces an entity reference if it is followed + by anything other than white space. It is used, as in LaTeX, as + a tabular cell delineator when it is followed by white space. +

    +
  8. +
  9. $”: Toggle inline math mode.
    Escape: \$ or \dol; .
    Equivalent: “\tmath{ . . . }”.
    Nearly equivalent: “\( . . . \)” +or “\math{ . . . }”.20 +

    +
  10. +
+

+

+
+ +
+
5.2.3.  Certain strings
+ +

These are strings of plain text with markup significance in the didactic document type that +are part of markup in LaTeX. +

+
    +
  1. --
    Short dash as used with a range + of numbers, e.g., 1–2.
    Equivalent: \rdash; . +

    +
  2. +
  3. ---
    Long dash as used for + punctuation, e.g., a dash — like this.
    Equivalent: \pdash; . +

    +
  4. +

  5. Blank interword space.
    Equivalent: \spc; . +

    +
  6. +
  7. \,
    Small horizontal space.
    Equivalent: \hsp; . +

    +
  8. +
  9. \\
    Forced line break.
    \\” may be used at the end of a line of + input for a forced line break. In a tabular environment + (with the didactic article document type, as in + LaTeX) it begins a new tabular row. Any other use is + deprecated, and will result in translation to the defined-empty + element bsl corresponding to the ASCII character + ‘\’ with a warning from the syntactic translator.
    Equivalents: \brk; for a + line break outside of a tabular environment.21 +

    +
  10. +
  11. Blank line.
    Begin new paragraph command.
    Equivalent: \parb . Nearly equivalent: \par . +

    +
  12. +
  13. ``
    Left (double) quotation mark.
    Equivalent: \ldq; . +

    +
  14. +
  15. ''
    Right (double) quotation mark.
    Equivalent: \rdq; . +

    +
  16. +
  17. \(
    Begin math mode command.
    Equivalent: \begin{math} . +

    +
  18. +
  19. \)
    End math mode command.
    Equivalent: \end{math} . +

    +
  20. +
  21. \[
    Begin displaymath mode command.
    Equivalent: \begin{displaymath} . +

    +
  22. +
  23. \]
    End displaymath mode command.
    Equivalent: \end{displaymath} . +

    +
  24. +
  25. .  ”, “?  ”, “!  
    End-of-sentence marks.
    Equivalent: \eos;, \eoq;, \eoe; .
    A period followed either by two blank spaces or by a newline + is recorded as an end of sentence. There is similar provision + for the question mark and the exclamation point. These tagged + forms may be used explicitly for the corresponding punctuation + inside math displays to distinguish punctuation from + mathematical use of the punctuation symbols. Explicit markup + for a comma is “\cma;”.22 + +

    +
  26. +
+

+

+
+
+ +
+

5.3.  Large Structure

+ +

Overall an article consists of a preamble followed by +a body. As noted previously (section 3.3) advanced mode +provides a special form of usage +

+
+\begin{document} . . . \end{document}
+

+with the paired metacommands begin and end that with an +article delimit its body. This is enabled with the +gellmu-trans call for the syntactic translator, and, consistent with regular +LaTeX usage the preamble is present without explicit tagging.

+ +

The only required markup in a preamble is a title, and it +is formally correct for its content to be empty. The SGML content +model for a body is somewhat loose, but is usually understood +to consist of sections and may contain ordinary paragraphs +(par, which must be marked up explicitly, or parb, +which is begun with a blank line). Although a body may be entirely +empty (likely not useful) or may consist only of par and +parb elements, all inline text must be within one of these +basic paragraph containers.

+ +

For example this formally correct textless document is handled without +noise by the didactic production system: +

+
+
+\documenttype{article}
+
+\title{}
+
+\begin{document}\end{document}
+
+

+while the following document with text outside of a paragraph fails +initial validation in the didactic production system: +

+
+
+\documenttype{article}
+
+\title{}
+
+\begin{document}
+
+x
+
+\end{document}
+
+

+The error may be corrected by placing a blank line before the +character ‘x’.

+ +

The content model for preamble is tighter than that for +body. This makes it possible to have a greater level of +error-checking than would otherwise be possible. For example, a +preamble must have exactly one title although it is not +specified where in the preamble a title might be. There may be at +most one of each of the elements surtitle, subtitle, and +date. Although newcommand, which is a metacommand, does +not affect the document type definition and may be used at different +locations in the preamble, the small number of actual elements that +may be multiply used in the preamble, such as mathsym (which is +partly a metacommand) must be located together. +

+
+ +
+

5.4.  Sectioning

+ +

In classical LaTeX one writes simply +

+
+\section{Some title for a section}
+

+to begin a new section. While this markup specifically delineates +the section title, LaTeX 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 number.

+ +

With SGML the classical approach is something along the following +lines: +

+
+
+<section><sectiontitle>Some title for a section</sectiontitle>
+
+<para> A paragraph.
+
+<para> Another paragraph.
+
+     . . .
+
+</section>
+
+

+Basic GELLMU markup corresponding to this would +be:23 +

+
+
+\begin{section}\sectiontitle{Some title for a section}
+
+\para A paragraph.
+
+\para Another paragraph.
+
+    . . .
+
+\end{section}
+
+

+If, moreover, the markup is to be well-formed XML markup, then each +para tag would need explicit closure with </para>.

+ +

The 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.24

+ +

The didactic SGML document type under advanced GELLMU seeks to +model classical LaTeX as closely as possible in order to provide a +bridge for authors from LaTeX to SGML (and, indeed, XML). For +this reason a command section similar to the classical LaTeX +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 +valid25 +under the didactic document type. +

+
+ +
+

5.5.  Labels, References, and Anchors

+ +

A label command may be placed anywhere that text may be placed +in order to mark a location and associate a symbolic “key” +with that location. A ref command may be placed anywhere that +text may be placed to generate a visible allusion called its +reference value, for example a section number, to the location +associated with a label key. An anch command may be placed +anywhere that text may be placed to provide a hypertext reference +either by key to an internal location or by uniform resource +identifier (URI) to an external resource.

+ +

At this point the discussion will become descriptive of of the entire +didactic production system rather than simply of its document type. +

+ +
+
5.5.1.  Labels and Sequencing
+ +

The basic usage for label is +

+
+\label[:series=" +series-name +" serseq=" +number +" refkey=" +ref-key +"]{ +key +}
+

+where use of the attributes is optional and, moreover, the required +key may be empty, i.e., the markup \label{} is permitted. +The key must be a case-sensitive string that is +monocase unique.26 +The didactic production system will provide a unique automatically generated string value +for key if none is provided by the author; this can be useful +if a series name is specified as an attribute for the label.

+ +

An author should never reference a label key not provided by the +author, but the empty element popkey is intended for processing +evaluation as the last label key, automatic or not, preceding +its location.

+ +

Sequencing27 +may be handled under the GELLMU didactic article +document type using labels and references. Toward this end one +makes use of three SGML attributes that are provided with the +label tag: +

+
+
+series
+
The 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 series.
+serseq
+
The 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 label.
+refkey
+
The name of a label key from which to spawn an automatically + generated value for the attribute serseq of the current label.
+

+ +

Every 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 backward.

+ +

The 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 document type and in the author-level XML document +type but not in the elaborated XML document type. +An evalref invocation will be successful only with a backward +reference. This is extremely useful for managing non-default +numbering of sectional units. For ordinary label references its use +is undesirable even though it is possible for backward references.

+ +

The reference value of a label is determined as follows: +

+
    +
  1. 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) +to a basic reference value with type attribute of series +set to one of ‘A’, ‘a’, ‘I’, or ‘i’. +

    +
  2. +
  3. 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 re-start the +sequencing of the sectional unit id's at the end of this document.) +

    +
  4. +
  5. 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 +reference value. (Markup — in particular, evalref — +cannot be used in defining an attribute value.) +

    +
  6. +
  7. 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.) +

    +
  8. +
  9. Else the reference value of the label is the sectional unit +identifier, i.e., its sunit value rather than the logical +value in its attribute sid, of the smallest sectional +unit containing the label. These values may not be numeric. For +example the string “A.3.2” might be a sectional unit +identifier. The series command should not be used to express +type conversion of a reference value that might resolve as a sectional +unit identifier. +

    +
  10. +
+

+

+
+ +
+
5.5.2.  Anchors
+ +

The basic usage for anch is +

+
+\anch[ +reference specs +]{ +anchored text +}
+

+where the option, 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 white space separated strings of the form +name="value"28 +with name restricted to 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 is preferably and more easily used with iref. + (The ‘#’ needs to be escaped, i.e., marked up as + “\#”.) In a non hypertext 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. This + might be the case if, 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 klabel29.
+
+

+ 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. +

+
+ +
+
5.5.3.  Example Emulating a LaTeX Counter
+ +

Suppose that one wants to fashion an inline enumerated list at some +point in a document. An enumerate environment is a list +structure that, while it may occur in a paragraph, is not inline. The +idea is to give each item a label and fashion the inline list item +number by referencing that label. One writes a newcommand to ease +this.

+ +

The name of a LaTeX counter is emulated with the name of the +series attribute for one or more labels. Unless one wishes to +be able to reference the items apart from the immediate reference, one +need not provide a label key. The didactic production system will provide a default labelkey +and the command “\popkey”, which grabs the key of the last preceding +label, may be used to furnish the key for the immediate reference. +If one wants small Roman numerals, one wraps the “\ref” command +in a “\series” command. Since series requires an actual +number, one must use evalref instead of ref, which is +permitted so long as the reference follows the label. +Here's the markup: +

+
+
+\label[:series="foo" serseq="0"]{} % zero the counter named foo
+
+\newcommand{\ti}{%
+
+\label[:series="foo"]{}(\series[:type="i"]{\evalref{\popkey}})}
+
+Hilbert's three most important contributions to algebraic geometry
+
+are \ti~the basis theorem, \ti~the nullstellensatz, and \ti~the syzygy
+
+theorem.
+
+

+The rendering is this: + + + +Hilbert's three most important contributions to algebraic geometry +are (i) the basis theorem, (ii) the nullstellensatz, and (iii) the syzygy +theorem.

+ +

With the current didactic production system if one had used “\ref” instead of +“evalref”, the translator from author-level XML to elaborated +XML, which resolves references, would have issued a warning in the +scroll, but the build would have run to otherwise successful completion +by ignoring the presence of the series command. +

+
+
+ +
+

5.6.  General Usage for Sectional Units

+ +

This describes the content model in the GELLMU didactic document type +for the “whole” sectional units Section, +Subsection, … as fully tagged. +

+ +
+
5.6.1.  The Content Model
+ +

The 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 required30 + section header or title. +
+
sopt
+
is an optional title for use in the table of + contents31. +
+
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.
+
+

+

+
+ +
+
5.6.2.  The LaTeX-Like Form of General Usage
+ +

Corresponding LaTeX-like argument/option syntax can be used, as previously +indicated, in GELLMU source with section, subsection, +… . If, however, argument/option 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 argument/option syntax one +precedes the bracket sequence for sprefix with an empty pair +“[]” of option brackets32 +for sopt. +

+
+
+ +
+

5.7.  verbatim, verblist, and +manmac

+ +

The ordinary notion of “verbatim” is complicated in the +context of a document type that is intended for processing toward +multiple output formats. There is no special provision for verbatim +markup under basic GELLMU33, +but there are two layers, one simplistic and one sophisticated, in the +didactic production system with each layer having provision for both inline and block-level +verbatim markup.

+ +

The simplistic approach involves the provision of an inline element +verb and a block-level element verbatim in the didactic document type. +With these the author is responsible for entering special characters +in ways that are safe for input source notation, safe for syntactic translator +output, and safe for each output format that is envisioned.34 +In the simplistic layer the formatting program in the didactic production system for HTML +output renders verb as an HTML kbd element and +verbatim as an HTML pre element. In formatting for +regular LaTeX output each of these SGML elements is rendered +as its LaTeX namesake. Neither the pre element in HTML +nor the (basic) verbatim command in LaTeX is context-sensitive, +and typically are formatted with left margin justification.

+ +

The sophisticated layer in the syntactic translator for verbatim is enabled by +setting the variable gellmu-verbatim-clean true. If this is +the case, then a user should input verbatim material literally between +\begin{verbatim} and \end{verbatim} markers occupying whole lines +and the syntactic translator will convert each of the 33 non-alphanumeric printable +ASCII characters therein to the corresponding empty element in +the didactic document type, and render each line of the converted material as a list +item bearing the item name nln in a list element +verblist.35

+ +

Similar arrangements pertain to the sophisticated inline analogue +of verb, which is enabled in the syntactic translator by setting the variable +gellmu-manmac-bar-name to a non-empty string value that is +to become the name of the element, such as quostr, to contain +the content, which should be delimited in source by successive +‘|’ characters. By default the user must enter a +verbatim string in “safe” form, but may enter it, +apart from any occurrence of the character ‘|’, literally +if the variable gellmu-manmac-literal is true. The term +“manmac” is derived from an old plain TeX package for +writing documentation by that name in which the character ‘|’ +is used to delimit inline literal material for verbatim presentation. +Moreover, consistent with usage observed in LaTeX documentation +markup of the form +

+
+\name|literal-text|
+

+is translated by the syntactic translator to an element named as with simple +“|...|” having a setting for its attribute +with name the value of the string variable +gellmu-manmac-attribute, which for quostr in the didactic document type +would appropriately be its attribute inv.

+ +

Variable settings to provide for the use of literal input both for +verbatim as a metacommand front for the list element +verblist and manmac configuration for the element +quostr, as described, are default when the syntactic translator is begun with +the non-default function gellmu-latex-faq. This function also +sets the variable gellmu-squophrase-name, which otherwise +defaults to the empty string, to the value “squophrase”. +This causes the syntactic translator to attempt to interpret balancing +character pairs consisting of the character ‘`’ and the +character ‘'’ as delimiters for the element +squophrase, an alternate form along with quophrase, +for “quoted phrase”, with odd instances of the character +‘'’ set as the empty element apos, which represents +an apostrophe. +

+
+ +
+

5.8.  Accents

+ +

Traditional LaTeX markup employs accent commands for modifying +ASCII characters in order to produce non-ASCII +characters. On the other hand characters from 16 +“byte-planes” of Unicode are now available in HTML +and XML as ordinary characters, with treatment as the atoms of +ordinary strings of text not requiring any special attention or notice +from the viewpoint of markup. It may happen that this will affect +development in the LaTeX project, and it is, therefore, unclear what +the long term role might be of LaTeX's accent commands.

+ +

Nonetheless, the didactic document type provides element names corresponding to the +14 classical LaTeX accents although it does not provide classical +markup notations such as “\'”, +“\"”, “\~”, … inasmuch +as names are required in syntactic translator output.36 +The names for the accents may be seen by locating the word +“accent” in the didactic production system file gellmu.dtd and reading +the following 14 lines.

+ +

An author, particularly an author residing in an English language +locale, may introduce, for example, the character é in +several ways: +

+
    +
  1. by using an algorithmic accent command — in this case + \acute{e}: é.

    +
  2. +
  3. by direct Unicode-based entity reference Рin this case + &#xE9;: ̩.

    +
  4. +
  5. by simple direct entry of the Unicode point in a file + having the UTF-8 text encoding.

    +
  6. +
+

+Note that Unicode values are numbers represented in hexadecimal +notation (base 16); the digits are 0–9 and A–F. Thus, E9 is +233, and one could also use the entity reference &#233;.

+ +

While for the long term, the largely equivalent37 +second or third methods are superior, +there are caveats for their use in 2007: +

+
    +
  • One's LaTeX back end must have a suitably robust way + of handling Unicode, presumably via the inputenc + package or possibly via Omega/Lambda. +

    +
  • +
  • Even when fonts are available, some web browsers + seem only to handle Unicode via entity references.

    +
  • +
+

+ +

+
+ +
+

5.9.  Tabular Environment Emulation

+ +

At this point (2006-7) the didactic document type is able to accomodate emulation +of LaTeX's tabular environment with “l”, “c”, +“r”, and “p” column cell specifiers with, where +robust CSS support is available for HTML, “|” indicators +for vertical cell rules and “\hline” commands for horizontal +rules between rows. While multicol, and multirow are not +modeled, cells may contain other tabulars recursively.

+ +

A “p” column specifier optionally takes a decimal argument +that represents the fraction of available width to be made available +for the cells in that column. When is no fractional width specifier, +the default fractional width is {1}/{n+1} where n is the +total of number of columns.

+ +

What may be viewed as a shortcoming of the tabular emulation +is that in each tabular row the first cell must contain +some markup in order for the document to be structurally correct. +This arises from a rule associated with SGML document types +that might be overcome if GELLMU source were processed by a +monolithic program. Instead, however, it is an +assemby of separate components (appendix 7.5.2) in which the first stage +has knowledge of syntax but not of the markup vocabulary.

+ +

One thing to keep in mind with tabular is that in the current, +though probably not future, design of HTML tables are not allowed +in paragraph content. The didactic production system works hard to deal with this. In most +web browsers there will be a line break before an HTML table and +again after an HTML table. (One way to finesse that is to place a +table in a cell in a sur-table, which is abuse of markup.) This +author generally places a tabular inside a display, +which is the GELLMU object corresponding to LaTeX's center.

+ +

The document type does not offer “floating” objects, and, therefore, +the name table is not used as as in LaTeX.

+ +

The name table is used for emulation in regular GELLMU +source of HTML tables. A table, like a tabular, +takes a required argument consisting of column specifiers. +In the didactic production system at the point where an article is spun to the elaborated +XML version of article, there is no longer a distinction +between tabular and table.

+ +

There is also array, which, as in LaTeX, is the in-math +version of tabular, except that in GELLMU its emulation of +LaTeX's array survives translation to the XML version of +article. An array has only “l”, “r”, +and “c” cells.

+ +

Example: The markup for the table of DTD's +in Appendix B.2.2 is this: +

+
+
+\begin{display}
+
+\begin{tabular}{l|cc}
+
+~                       & Latin-1              & \abbr{UTF-8}          \\
+
+\hline
+
+First stage \abbr{SGML} &  \quostr{gellmu.dtd} &  \quostr{ugellmu.dtd} \\
+
+Author Level \abbr{XML} &  ~                   & \quostr{axgellmu.dtd} \\
+
+Elaborated \abbr{XML}   & \quostr{xgellmu.dtd} & \quostr{uxgellmu.dtd}
+
+\end{tabular}
+
+\end{display}
+
+

+Because the one horizontal divider and the one vertical divider rely +on CSS support in HTML, these dividers might not be seen in a web +browser with weak CSS support. +

+
+ +
+

5.10.  Graphic Inclusions

+ +

There is basic support for graphics inclusions suitable for the HTML +backend and the LaTeX backend with both DVI and PDF outputs. +The arrangements are not unlike those required for the use of +the includegraphics command provided by LaTeX's +graphicx package. This means that, apart from the didactic production system's chain +of processors, one needs to provide several different versions of a +given graphic object in order to accommodate the needs of the three +different output formats (HTML, PDF, and DVI). A reliable graphics +format converter such as that provided by ImageMagick +(http://www.imagemagick.org/) +or the netpbm utilities +(http://netpbm.sourceforge.net/) +and a broad TeX support environment similar to that provided by +TUG's TeXLive +are essential for work with included graphics.

+ +

For example, if one begins with an encapsulated PostScript image +glmy.eps made, say, with Metapost, then one might run +the commands +

+
+
+   epstopdf glmy.eps
+
+   convert glmy.pdf glmy.png
+
+

+before making PDF with pdflatex and PNG (for inclusion +in HTML). In this case the PDF version of the graphic should be +regarded as best for use with pdflatex, and so one wants to +have the PNG version out of view from pdflatex when +building the GELLMU source glman.glm for this document. +With the new mmkg drivers one may prepare a tiny file +glman.prx that is a list of names of image files, one file +per line, that should be out of view at the point in the pipeline when +pdflatex is active. Thus, a line in the file +glman.prx should contain the name glmy.png.

+ +

In glman.glm one has the +code: +

+
+
+\begin{quotation}
+
+   Sometimes a picture is worth a thousand words.
+
+   \display[:frame="1.1"]{\includegraphics[:scale="0.2"]{glmy}}
+
+\end{quotation}
+
+

+which yields: +

+ +

Sometimes a picture is worth a thousand words. +

+
+Image file: glmy.png +
+

+
+

+ +

In this markup one sees, first of all, two uses of SGML +attributes — frame and scale. Attribute +options are opened with “[:” rather than simply with +“[”. Whereas options generally may contain markup, +attribute options may not.

+ +

The meaning in this example of scale is that the width +of the graphic in DVI and PDF outputs will be the result +of multiplying the scale by LaTeX's value of +\textwidth.38 +The HTML formatter will link to the PNG without a width +specification. Thus, the brower window width of the graphic will be +the actual width of the PNG image unless, perhaps, it's too large for +the browser's window. The meaning of frame is that for print +outputs the graphic image will be surrounded by a LaTeX +framebox with diameter that is 1.1 times the diameter of the +display's content. In the current HTML formatter no use is +made of the numeric value of frame although a default frame is +constructed via an HTML attribute giving values for the CSS +properties border and padding. When image framing is +desired, another approach is to incorporate framing in the graphic +itself. +

+
+
+ +
+

6.  Mathematics in article

+ +
+

6.1.  General

+ +

There was previous mention of the basic mathematical container element +tmath in the discussion of single string (section 5.2.2) markup +and the math and displaymath elements in the discussion +of certain strings (section 5.2.3) of special markup +significance.

+ +

The markup used inside these containers is very similar to that +which is used in LaTeX although far from all of LaTeX's math +markup, as extended by the amsmath package, has any +analogue in the didactic production system.

+ +

There are a few things that deserve short mention: +

+
+
\sum, \int, and \prod
+
are all similar to +their LaTeX namesakes except that each requires explicit closure. +For example, + +
+\[ \sum_{0}^{\infty} \frac{x^k}{k!} \sum: \]
+ +produces +
+ SUM_{0}^{INFTY}[{x^{k}}/{k!} ]    . +
+
+
\regch, \mbox, and \text
+
The didactic document type provides regch, +for “regular character” that is a one character version +of mbox provided for separating from general +mbox matter the content to which a non-math +algorithmic accent (section 5.8), may +be applied. For example, +
+
+\newcommand{\Q}{\regch{\bold{Q}}}  % intended for use in math
+
+\newcommand{\galQ}{\mbox{Gal}(\ovbar{\Q}/\Q)}  % only in math
+
+$\galQ$\aos;
+
+ +produces + + +Gal(\={Q}/Q). + +

Both regch and mbox should be used only for symbols. +Note that “Gal” in the foregoing is a symbol. The command +\text is provided for the use of text phrases – usually conjunctive +in nature – inside math zones. For example, the markup +

+
+
+\[ \absval{x} = \lbalbr{\begin{array}{rl}
+
+             x & \text{\ if\ } x \geq 0 \\
+
+            -x & \text{\ if\ } x < 0
+
+            \end{array}} \]
+
+

+produces +

+
+  |x|   =  
{ + + + + +
 if  x  >=  0
-x if  x < 0
+
  +
+

+In this example note that the command name lbalbr stands for +“left balanced brace”. It corresponds to +the use of \left\{  ...  \right. in LaTeX39. +

+
+
\aos;, \aoc; \aoq;, and \aoe;
+
are the +named forms of the LaTeX space adjustment commands “\@.”, +“\@,”, “\@?”, and “\@!”, which +provide correct placement of inline punctuation immediately following +inline mathematical markup. There is now also default provision in the +didactic production system for the more LaTeX-like “\@” usage. Note that the +use of \@ is seldom necessary. +
+
+

+

+
+ +
+

6.2.  Assertions: Near Emulation of + LaTeX's Theorem-Like Environments

+ +
+
6.2.1.  Examples
+ +

The container element \assertion is used in the didactic document type for the +creation of its analogue under SGML of theorem-like environments. As +a first example of the near emulation of a LaTeX theorem-like +environment, here is markup to give LaTeX-like meaning to +“\begin{theorem}” and “\end{theorem}”. +

+
+
+\newcommand{\begin{thm}}[1][]{%
+
+\begin{assertion}[#1][theorem]{Theorem}[\evalref{\popkey}]}
+
+\newcommand{\end{thm}}{\end{assertion}}
+
+

+ + + +For a first instance it is invoked without supplying the optional first +argument, which is for a label key. +

+
+
+Theorem 1. +  The continued fraction expansion of a real number is finite +if and only if the real number is a rational number.
+

+This is just text to follow the statement of a theorem.

+ +

If we do the same thing again, the theorem number should go up by +1 since in the didactic production system this usage is equivalent to using the default +counter associated with a label series name theorem.40 +

+
+
+Theorem 2. +  The continued fraction expansion of a rational number is +eventually periodic if and only if the real number is an irrational +number that is the root of some quadratic polynomial with rational +coefficients.
+

+

+
+ +
+
6.2.2.  Usage for assertion
+ +

The general usage of assertion is the following: +

+
+
\begin{assertion}[key][series +]{name}[id]
+
  .  .  .
+
\end{assertion}
+
+

+The options key and series represent the same things as +the corresponding label (section 5.5.1) options. The id +option is for explicit customization of the visible identifier, e.g., +theorem number, as illustrated with one of the examples later in this +section. One may use the id option, which must follow +the name argument, without using either of the other options. But in +order to use the series option, a key option, which may +simply be empty, must be present.

+ +

There is also a fully named way to proceed: +

+
+
\begin{assertion}
+
\asstkey{. . .}\asstser{. . .}\asstname{. . .}\asstid{. . .}
+
  .  .  .
+
\end{assertion}
+
+

+Here order is important, but any of the options may simply be omitted. +For example, we may write +

+
+
+\newcommand{\begin{Thm}}[1]{%
+
+\begin{assertion}\asstser{#1}\asstname{Theorem}%
+
+\asstid{\sref;.\evalref{\popkey}}%
+
+}
+
+\newcommand{\end{Thm}}{\end{assertion}}
+
+\begin{Thm}{XXseries}
+
+If $[ n_1, n_2, \ldots ]$ is an infinite continued fraction, then
+
+its sequence of convergents always has a limit.
+
+\end{Thm}
+
+

+to obtain: + + + + + +

+
+
+Theorem 6.2.2.1. +  If [ n_{1}, n_{2}, … ] is an infinite continued fraction, then +its sequence of convergents always has a limit.
+

+Notice that the asstid argument is merging the reference value +for (the new) series XXseries with the visible id of the +current sectional unit. +

+
+
+ +
+

6.3.  Equations and Equation Arrays

+ +

The general usage for equation is the following: +

+
+
\begin{equation}[key][series]
+
  .  .  . 
+
\end{equation}
+
+

+The options key and series represent the same things as +the corresponding label (section 5.5.1) options. In order to use +the series option, a key option, which may simply be +empty, must be present. The use of “equation*” as a name for an +equation display that is not numbered is +not permitted, but one may instead use the nonum attribute +as follows: +

+
+\begin{equation}[:nonum="true"] . . . \end{equation} .
+

+ +

General usage for an equation array (name eqnarray) is: +

+
+
\begin{eqnarray}[key][series]
+
  .  .  . 
+
\end{eqnarray}
+
+

+where the content is an eqnabody consisting of eqnrow's, +each row may be terminated in LaTeX-like markup, as in LaTeX, with the +string “\\” and consists of three parts, corresponding to elements +eqnleft, eqncenter, and eqnright, that may +be separated in LaTeX-like markup with the character ‘&’.

+ +

Support for numbering in eqnarrays is only minimally developed +although there is suggestive sketching in the didactic document type that is not +supported in the formatters. By default the equations in equation +arrays are numbered consecutively throughout an article. This +behavior can be altered by using the series attribute of an +eqnarray. If that is done, then, as things have been sketched, +numbering applies to whole arrays rather than to the equations within +arrays. Numbering in an equation array may be suppressed by setting +its attribute nonum to the string “true”. +

+
+ +
+

6.4.  The \mathsym Metacommand

+ +

mathsym is a macro substitution metacommand that is +available in the didactic production system for enabling an author to declare that a macro +name represents a mathematical symbol. It is a formal way of +recording statements commonly made by authors in introducing notation.

+ +

Unlike regular metacommands, which may appear at any point in +GELLMU source, mathsym may only appear in the preamble +of an article, or, equivalently with defaults in the +syntactic translator, mathsym may only appear before the LaTeX-like +“\begin{document}”.

+ +

Its usage is: +

+
+\mathsym{ +symbol-name +}{ +symbol-rendering +}[symbol-meta-info +] .
+

+ +

Here symbol-name is an alphanumeric string (case-sensitive) +beginning with a letter. The second argument is the presentation +rendering of the symbol in GELLMU markup. It is like the definition +of a newcommand except that it may not involve +arguments.41 +The optional third argument symbol-meta-info is an +alpha-numeric string that might also include possibly a few other +string characters such as ‘/’, ‘-’, ‘,’, +‘.’, ‘*’, etc. Its exact structure depends on the +typing system. (No typing system is part of the didactic production system.) For example, +it might consist of (name, value) pairs for conveying meta-information +about the symbol.

+ +

The syntactic translator replaces each invocation of a given +mathsym with the specified rendering and writes for each +mathsym definition a corresponding element in the SGML output +whose content consists solely of the declared symbol name if there is +no meta information but otherwise consists of the symbol name followed +by a blank space and then whatever string of meta information is +provided in the optional argument. Additionally, each invocation is +wrapped in a rendering-inert Sym element whose key +attribute reveals the name given to the symbol at the point of +declaration (and by which the symbol is invoked). This makes it +possible for a downstream authoring platform processor that has +remembered the list of declared symbol names to match each invocation +of a declared symbol with its associated meta information, if any, +provided by the author in the symbol declaration.

+ +

A related feature in the didactic GELLMU document type is the +mlg tag for marking mathematical logical groups. This is +somewhat akin to the lgg tag for TeX-like logical groups, +traditionally created in TeX markup with braces that are not +attached to a command.42 +As with lgg there is no obvious evidence of an mlg tag +in a typeset rendering, but the presence of such a tag is intended as +a signal to downstream mathematical parsers that the contents of the +tag be given grouping priority as, say, with visible parentheses. +Furthermore, the mtype and mml attributes of the +mlg tag may be used to pass semantic information about the +tag's contents to a processor. +

+
+
+ +
+

7.  The Didactic Production System

+ +

The didactic production system is the suite of processors and technical support files +underlying what is called regular GELLMU. +

+ +
+

7.1.  Permission

+ +

The items of the didactic production system are copyrighted free software released +under the GNU General Public License. +

+
+ +
+

7.2.  Materials

+ +

The release contains everything originating with the author that is +currently used in “building” GELLMU documents.

+ +

It also contains a slightly modified version +of David Megginson's Perl module “SGMLS.pm” based on +another slightly modified version that was furnished to me by Dave +Holden in a very quick early 1999 response to my posted request for a +modification that handles the labels provided (optionally) by +nsgmls for SGML elements that are defined empty. A similar +slight modification was also supplied a few days later by Vassilii +Kachaturov and had been available at his web site.

+ +

Although the materials offered in this package aside from the syntactic translator +pertain only to the didactic document type and the didactic production system, it should be understood that +the larger design for GELLMU envisions other parties, on the one +hand, building in various ways to extend the functionality of the +didactic system, and, on the other hand, applying the methods of the +didactic system to other document types and other formatting programs +for those document types.

+ +

The basic items originating with the author, aside from the document +type definition files (section B.2.2) are: +

+
+
gellmu.el
+
the GELLMU syntactic translator, which makes SGML
+
xplaingart.pl
+
converts SGML to + author-level XML
+
xmlgart.pl
+
converts author-level XML + to elaborated XML
+
ltxgart.pl
+
translates elaborated XML + to LaTeX
+
htmlgart.pl
+
translates elaborated XML + to classical HTML and translates specially prepared XML to XHTML+MathML
+
mathcdata.pl
+
first of two special + preparations for translation toward XHTML+MathML
+
mathprep.pl
+
second of two special + preparations for translation toward XHTML+MathML
+
mval.pl
+
check for certain types of MathML errors
+
+

+ +

Since some users will only be interested in the syntactic translator, additional +description of these materials is found below in +“Using the didactic production system” (section 7.5) and in the +Release Notes (appendix B). +

+
+ +
+

7.3.  Other Required Software

+ +

To make use of the GELLMU syntactic translator a user must have or separately acquire +Emacs.43 +(“Windows” users should look at the special +FAQ.) Emacs is +commonly found on GNU/Linux systems and on *ix systems. It may be +found on other systems when provided by system managers.44

+ +

To make use of the didactic production system beyond the syntactic translator a user must have or acquire +the following items of free cross-platform software + +

+
    +
  • an ESIS +generating SGML parser such as found in the cross-platform package +SP by James Clark, +which has stood the test of years, or the newer variant +OpenSP, which +is internationalized, from the OpenJade Team. +

    +
  • +
  • Perl at CPAN. +

    +
  • +
  • a complete TeX system, for which one may look to + The TeX Users Group (TUG) or + The Comprehensive TeX Archive Network + (CTAN). +

    +
  • +
  • xmlwf — a basic utility that is part of the release of + James Clark's expat. +

    +
  • +
+

+

+
+ +
+

7.4.  Using the syntactic translator

+ +

This explains how to use the syntactic translator, which is the Emacs Lisp program +contained in the file gellmu.el. +

+ +
+
7.4.1.  Operation in Batch Mode
+ +

For linux and the other *ix a script like bin/linux/g2s will be +adequate if your working directory is the distribution directory45. +

+
+Usage: g2s  stem-name +  [ function-call ]
+

+For example, if “foo.glm” is the name of the source file, then +the first argument should be “foo”. The optional second +argument function-call is the name of the function in the Emacs +Lisp package “gellmu.el” that is to be used. The function +call defaults to “gellmu-trans”, which is the correct name for +LaTeX-like usage under the didactic document type (section 5).

+ +

There are also parallel scripts “g2h” and “g2x”.

+ +

g2s” will byte compile “gellmu.el” if +“gellmu.elc” is not present.

+ +

g2h” runs the function gellmu-html for the case +where the GELLMU file has been written directly for HTML. +The file ghtml.glm and the derived file ghtml.html +are examples.

+ +

g2x” runs the function gellmu-xml for the case +where the GELLMU file has been written directly for XML.

+ +

The directory “bin/win32” contains parallel, though more +complicated, batch files for use in a “DOS” command line +under “Windows”. +

+
+ +
+
7.4.2.  Interactive Operation
+ +

Open GNU Emacs interactively on the GELLMU source file. When +finished editing the source, save it but keep Emacs open. Then do +

+
+M-x load-file gellmu.el
+

+and +

+
+M-x gellmu-trans .
+

+ +

(It is better to have byte-compiled “gellmu.el” and if the +byte-compiled version “gellmu.elc” is in your Emacs +load-path, then +

+
+M-x load-library gellmu
+

+is faster.)

+ +

The SGML output should come up in a second buffer. Save that buffer +to save the output.

+ +

Make any corrections or changes in the GELLMU source buffer and re-run +

+
+M-x gellmu-trans .
+

+ +

As with batch operation the functions gellmu-html and +gellmu-xml, may be handled parallel to gellmu-trans.

+ +

There are a number of other functions besides these three for +obtaining syntactic translation from GELLMU source to SGML. Each of +these is, in fact, a front for calling gellmu-trans with +various combinations of variable settings. There are a great many +user configurable variables in the syntactic translator. Notable +among these for regular GELLMU (section 4.1) are (1) +gellmu-parb-nogo and (2) gellmu-autoclose-list. +See the variable documentation text, available interactively when the +GELLMU library is loaded in Emacs with the key combination +qquostrC-h C-h v, for more information. For a list of the names of +all user configurable variables see the variable documentation for +gellmu-public-vars.

+ +

For example, setting gellmu-verblist true causes a sequence of lines +beginning with the line “\begin{verbatim}” and ending +with the line “\end{verbatim}” to be considered +verbatim as in LaTeX, i.e., without requiring escaped forms +of special characters, and then to be set as a simple verblist, +which is in most circumstances superior to GELLMU's version of +pre-historic verbatim.46 +

+
+ +
+
7.4.3.  Interrupting the Syntactic +Translator
+ +

Interruption of the GELLMU syntactic translator will be necessary in the event that the +combined use of newcommand, macro, Macro, +and mathsym (advanced mode only) leads to infinite recursive +loops. Users should avoid the use of macro and Macro +unless such use is absolutely necessary since these metacommands +present greater looping risks.

+ +

Inasmuch as there are two ways to invoke the syntactic translator, there are two +different procedures for interrupting it should that be necessary. +

+
+
+Batch mode invocation
+
This is the case when GNU Emacs is launched +in batch processing mode to run the syntactic translator. To interrupt the syntactic translator in this +case one must interrupt the Emacs process. The author does not +know of any case when Emacs does not respond to standard interrupts. +For example, on linux systems pressing “Control-C” +when the process was launched from a shell provides a standard interrupt. +If the processed was launched in some other way, a normal “kill” +addressed to the process should have the same effect. +
+Interactive invocation
+
This is the case when the syntactic translator is launched +from within the GNU Emacs editing interface. Use the standard Emacs +function “quit”, accessed with the key “C-g” (Control-G) +to interrupt the syntactic translator. +
+

+

+
+
+ +
+

7.5.  Using the didactic production system

+ +
+
7.5.1.  Staged Design
+ +

The items in the didactic production system are components for use with staged processing. +The document type may be used with any SGML system. Of course, one +may not use a parser that is limited to XML with the SGML version of +the document type. Moreover, if one makes use of features in the +SGML version such as the positional argument and option elements, +then one might want to provide translation to the XML version of the +document type.

+ +

No particular processing system is required for the XML version of +the document type. For example, one might profitably write an +XSLT sheet for translation to some +other format and then submit the document and the XSLT sheet +to an XSLT engine such as xt, xsltproc, or +saxon. +

+
+ +
+
7.5.2.  Default Staging
+ +

The release includes bin/linux/lmkg and +bin/linux/mmkg as example driver scripts for running the +following sequence. (The bin/win32 directory contains +old driver scripts for the MS Windows command line that might someday +be worth updating.) The behavior of these driver scripts depends +on the way they are called though the specific of this are somewhat +different for lmkg than for mmkg. The older +lmkg scripts do not generate XHTML+MathML at this point they are +provided primarily for backward compatibility.

+ +

The mmkg scripts by default make XHTML+MathML but not if called by +a name, e.g., via a symbolic link, without the substring “mm”. +If an mmkg script is called with a name ending in the string +“froms” or “fromx”, then it will take as starting +point, respectively, an SGML, i.e., “.sgml”, or author-level +XML, i.e., “.xml”, version of the document. Thus, for +example, mmkgfromx might be used to operate on a document +that is an author-level XML translation from a non-GELLMU source.

+ +

Caution. These scripts, like all shell scripts, should be +examined for file system locations, system environmental variables, +and other platform-specific and location-specific issues. The user +who introduces a script on a platform should understand the script. +A user who does not understand a script should not attempt to +introduce it on a local platform.

+ +

Flow in the didactic production system is portrayed in the following diagram: +

+
+Image file: gcompst.png +
+

+ +

These are the stages in the didactic production system pipeline: + +

+
    +
  1. Prepare GELLMU source using a text editor. +

    +
  2. +
  3. Process the source with the syntactic translator to obtain an SGML document under + the didactic document type. +

    +
  4. +
  5. Use nsgmls to validate the SGML document and obtain an + ESIS for it as output. +

    +
  6. +
  7. Submit the SGML ESIS as input47 + to the Perl + program sgmlspl with the script xplaingart.pl + as file argument, obtaining an author-level XML document. +

    +
  8. +
  9. Use nsgmls to validate the author-level XML document + and then submit its ESIS as input to to sgmlspl + with the script xmlgart.pl, obtaining an elaborated + XML document. This document, which is accompanied by several + auxiliary files48, + has things such as sectional unit numbers and cross references + fully resolved so that there will be consistency in these across + the various output formats. +

    +
  10. +
  11. Use nsgmls to validate the elaborated XML document and + submit its ESIS as input multiply to sgmlspl: +

    +
      +
    1. with the script htmlgart.pl to obtain a + classical HTML document that then will be validated if an + HTML validation program is identified in the driver script. + +

      +
    2. +
    3. with the script ltxgart.pl + as file argument, obtaining a LaTeX document. The LaTeX + document is then built with latex to make a DVI + file and with pdflatex to make a PDF file. + +

      +
    4. +
    5. for a pipeline using successive runs of sgmlspl with + 3 scripts, mathcdata.pl, mathprep.pl, + and htmlgart.pl (called in a special way) to make + a XHTML+MathML file that is then checked for XML well-formedness + using xmlwf, checked for certain kinds of MathML + errors using sgmlspl with mval.pl, and + validated if a suitable validation program is + identified in the driver script. +

      +
    6. +
    + +
  12. +
+

+

+
+ +
+
7.5.3.  Parsing with nsgmls
+ +

The program nsgmls is part of the +SP package, which includes +extensive documentation. Those familiar with it will want to ignore +these hints.

+ +

Since for both the SGML and the XML versions of the didactic document type SP +requires non-default SGML declarations, it is recommended that the user +employ SGML catalogs, one for SGML and another for XML. +The file system location of a catalog is conveyed to nsgmls +as the value of its command line argument immediately following the +argument “-c”.

+ +

Each catalog should contain an SGMLDECL directive that is the +file system location of an SGML declaration. Aside from that a catalog +may contain a number of three string lines of either of the following +forms +

+
+
PUBLIC  formal-public-identifier  quoted-pathname
+
SYSTEM  quoted-system-identifier  quoted pathname
+
+

+where the quoted pathname, which may be relative to the location of the +catalog, should for this context in each case be that of a +DTD file.

+ +

It is recommended in each case that nsgmls be run with +arguments “-l” (for propagating line number references) and +“-oempty” (for flagging defined-empty elements). For +processing the XML version of the didactic document type one should additionally use +the argument “-wxml”.

+ +

Additionally, a user may wish to make locally-specific arrangements +for the handling of character sets. +

+
+ +
+
7.5.4.  Processing with sgmlspl
+ +

The program sgmlspl is part of David Megginson's +SGMLSPM package. Megginson's extensive documentation for it +may be found in the (December 1995) release found at +CPAN.49

+ +

One uses sgmlspl by calling the Perl program sgmlspl +with an ESIS as input and a script as argument. Additional +arguments become arguments for the script.

+ +

Although some operating systems provide a way for dealing with a Perl +program, which is stored in a text file, as an executable object, in +other cases one must explicitly call the Perl engine as a program with +an ESIS as input, the system name of sgmlspl as first +argument, and (the system name of) a script as second argument. In +both cases one will want to arrange, perhaps with an environmental +variable or perhaps with the “-I” argument to the Perl engine, +for the directory containing “SGMLS.pm” and its supporting +module “SGMLS/Output.pm” to be in its path array +@INC. +

+
+ +
+
7.5.5.  Environmental Variables
+ +

There are a number of environmental variables that affect processing +in the didactic production system. The names all begin with the string “GELLMU_”. +Of course, the names are case-sensitive.

+ +

Many of these variables are set in the distributed driver scripts. +When that is the case, the distributed driver scripts commonly check +for a previous setting (which may, therefore, be easily placed in a +fronting script that makes a setting and then just calls the +distributed driver).

+ +

Setting environmentals can be difficult in a non-Unix-like +operating system environment. This is one reason why the author +generally recommends that Windows users install GELLMU under +Cygwin. + +

+
+
GELLMU_Dir
+
The top of the directory tree where GELLMU is installed. +
+
GELLMU_StyleDir
+
URI or directory location of CSS and XSLT style + sheets that is used by the didactic production system in writing links in XML, + HTML and XHTML+MathML files. + The value usually has a different meaning under the eye of a + web server than in a local file system. A relative URI or + path is usually best. A value like “../webstyle” + can often be made to work both ways. +
+
GELLMU_CSSName
+
Name, relative if given relative syntax, to the value of + GELLMU_StyleDir, of the CSS stylesheet written by the + didactic production system in HTML and XHTML+MathML files. +
+
GELLMU_XhtmlSuffix
+
Suffix given to XHTML or XHTML+MathML files written + by htmlgart.pl. +
+
GELLMU_NoUMSS
+
Value 0 or 1: if 1, signals to htmlgart.pl + that it should not link to W3C's + UMSS XSLT + stylesheets. +
+
GELLMU_UTF8
+
Value 0 or 1: signals to sgmlspl scripts that + Perl's handling of the UTF-8 text encoding should be invoked. + The meaning is subtly different between Perl versions 5.6 + and 5.8. +
+
GELLMU_Encoding
+
String value for text encoding that is set by the + xplaingart.pl in writing author-level XML and by + xmlgart.pl in writing elaborated XML. (HTML, + XHTML, and XHTML+MathML are always written with the UTF-8 + encoding.) +
+
GELLMU_LaTeXUTF8
+
Value 0 or 1: signals to latex and + pdflatex to expect the UTF-8 encoded text in + their input. +
+
GELLMU_LaTeXStyle
+
Pathname for LaTeX stylesheets that latex + and pdflatex should use when such stylesheets are + not properly positioned for TeX system KPSE-based + location. (It's better to use a local or personal + TDS tree.) +
+
GELLMU_PAPER
+
String value for the paper used in printing; becomes an + option for the documentclass command in the output + LaTeX file. +
+
GELLMU_Memoir
+
Value 0 or 1: if 1, use the memoir, rather + than article, documentclass in the output LaTeX file. +
+
GELLMU_DefaultEmptyEqncenter
+
Experimental. String value + consisting of a small bit of LaTeX wrapped as a Perl + string to use in tweeking the LaTeX-rendered appearance of + a GELLMU eqnarray (which is rendered in LaTeX using + either align or aligned, depending on + numbering arrangments) in the case of an empty middle cell + (eqncenter). The current default value used in + ltxgart.pl is the string “ \qquad ”. Be + mindful of how such a string can be entered as a literal + string in Perl or as part of an on-the-fly environmental + setting from a command line shell. +
+
GELLMU_XLink
+
Value 0 or 1. How to handle links in MathML output + when writing XHTML+MathML. Such links, which are currently + illegal inside XHTML+MathML math zones, are confined to + \text{...} areas in GELLMU. If the value is 1, use + XLink; otherwise, switch into the HTML namespace and + write an HTML anchor. (Firefox handles both, + while more of the other browsers seem to choke on the + namespace switch than choke on the necessarily cumbersome + use of XLink.) +
+
GELLMU_OriginLabel
+
Name for an automatic label key, chiefly of occasional + value for HTML and XHTML+MathML outputs, that, when this + variable is present in the environment, places a link target, + with id the value of this variable, at the top of the document. +
+
+

+

+
+
+
+ +
+

Appendix A.  The GELLMU Archive

+ +

The GELLMU Archive is the web site +http://www.albany.edu/~hammond/gellmu/.

+ +

It is the source for late breaking information about GELLMU. +Among other things, it houses a largely uncommented +archive of examples. This is provided +in the belief that the study of examples is one of the quickest +ways to learn a markup language.

+ +

Of course, this document, which is furnished with the release, +is also an example.

+ +

Another item, also an example, that is housed in the archive +is The GELLMU FAQ. +

+
+ +
+

Appendix B.  Release Notes

+ +

This version of the manual was prepared for release 0.8.5 in +July 2007. The GELLMU materials (section 7.2) consist of: + +

+
    +
  1. The manual, which is this document. +

    +
  2. +
  3. The GELLMU syntactic translator, a Emacs Lisp program, which is the only +item of software required for those who simply wish to use GELLMU +markup for the conscious preparation of HTML documents or documents +under some other classical SGML or XML document type for which the +user is otherwise equipped. +

    +
  4. +
  5. The GELLMU didactic production system, which consists of +an SGML document type called article, an XML document type +also called article, and three separate collections of Perl +functions for the well-known Perl SGML processing framework +sgmlspl by David Megginson. +A very slightly modified version of Megginson's Perl library +SGMLSpm that provides a method for detecting defined-empty +SGML elements, as flagged in an SGML parse stream in ESIS +format, is included as part of the didactic production system. +Since it is by size 60% of the software content of the +Megginson package on CPAN, the rest of the +package, licensed under the GNU +General Public License +is distributed with the didactic production system as well, though without its +documentation. The distribution includes 7 scripts for use with +sgmlspl in the didactic production system pipeline. For more +on this see “Using the didactic production system” (section 7.5). +

    +
  6. +
+

+

+ +
+

B.1.  Comments on the Syntactic Translator

+ +

The GELLMU syntactic translator is more mature than the other components. The following +comments pertain to it. + +

+
+
internationalization
+
+ +

Internationalization has a considerable and evolving +level of support in Emacs. The concept is that an author resides in +a locale. When the author enters a character from a locale, it gives +rise in Emacs to a somewhat complicated multibyte entity that can have +“properties”. Particularly relevant variables in Emacs +are: coding-system-for-write and +buffer-file-coding-system. GELLMU provides the user +variable gellmu-sgml-default-coding, which should be properly +coordinated via driver script settings with one's SGML parser. +

+
+
inclusions
+
+ +

It is not actually a limitation that a GELLMU source file cannot +be included in another. The primary reason is that one should +make use of the inclusion mechanism of SGML. For that one needs +to define the included pieces as entities in the direct internal +subset 50 +of the source file and then reference each as an entity, e.g., +“&sect2;” at the appropriate location in the source +file where it is to be included. Because the inclusion happens +at the SGML level there are two points to observe: +

+
    +
  1. Macro information is local to each source file.

    +
  2. +
  3. The situation is optimal for the location of validation + errors provided that one's parser reports such errors by + filename and line number since the syntactic translator + provides line number alignment between source and generated + SGML.

    +
  4. +
+

+ +

A second reason is that source inclusion would disturb +line number alignment between source and SGML output. This +is important for the interpretation of SGML validation error +messages. Such validation is considered routine, and plays an +important role in detecting an author's mistakes. Some author errors +are diagnosed in the syntactic translator.

+ +

A third reason, which at the same time might be considered also +a disadvantage, is that all of GELLMU's macro facilities are +local to each source file. This adds both robustness and flexibility +at the price of the inconvenience of physical inclusion of common +macro definitions. +

+
+
variable management
+
+ +

This refers to the management of user variables in the syntactic +translator. These are Elisp variables. One who is familiar with +Elisp should be able to provide values in batch mode without +making changes in the Elisp source.51 +Setting values interactively in the Emacs editing interface can be +done easily using “M-x set-variable”.

+ +

With a future release it is likely that additionally a user resource +file for custom variable settings without the need for writing Elisp +code will be provided. +

+
+
Bugs
+
+ +

No serious existing problem is known in the GELLMU syntactic translator at the time of this +release. Of course, as stated in source code comments, there is no +warranty of any kind. Please report bugs to the author: +hammond@math.albany.edu. + +

+
    +
  • Reserved element names. +The GELLMU syntactic translator reserves for its own internal use all SGML or XML element +names in which the first numeric character in the range +“0–9” is the character “0”. +

    +
  • +
  • Limitation on braces in macros. +Unbalanced braces are not permitted in either the name or the value +field of any form of macro metacommand. +

    +
  • +
  • First cell limitation. +In the LaTeX-like emulation of an array or tabular +environment the first cell in each row must have something other than +whitespace. Of course, sometimes no content is wanted, and then +\empty (for nil markup, not to be confused with the mathematical +\emptyset) is one way to handle it, but this author usually uses +something that is mostly inconsequential like “~” or +“\,”. Another way to handle it is to invoke the names +of the SGML elements, i.e., \firstcell{} for tabular or +\firstacell{} for array. +

    +
  • +
  • Concept of advanced GELLMU immature. +Inasmuch as didactic article is the only document type for +which the idea of advanced GELLMU has been implemented, the general +concept of advanced GELLMU is not fully developed in the GELLMU syntactic translator. +Basic GELLMU is characterized in the GELLMU syntactic translator by the evaluation of +the Boolean variable gellmu-straight-sgml to “true”. +This automatically make the Boolean variable +gellmu-regular-sgml true. +Full LaTeX-like support for the didactic production system is realized only by both +of these Booleans being false. Thus, advanced GELLMU will +need to evolve in the space in between, probably after the +introduction of further such Boolean variables, some public and +some private. This technique will make it possible for the +code to continue performing as now when the variable +gellmu-straight-sgml, the flag for basic GELLMU, is true +and also when both of these flags are false. +

    +
  • +
  • Reserved strings. +The strings “<<” and “>>” have been reserved +as future notation for mathematical objects. Although it might seem +at first glance that this type of short hand has no place apart from +the fully LaTeX-like environment of the GELLMU syntactic translator in the context of the didactic production system, in +which they have not yet been used, it is actually not so clear that +one could not make sensible use of such notation in the context of +“XHTML plus MathML” under advanced GELLMU along with +other features such as blank lines for new paragraphs and many other +mathematical shortcuts. It awaits the further development of advanced +GELLMU, and reserving this notation is necessary to ensure backward +compatibility. +

    +

    Consequently, for example, entering “<<a>>” is +problematical, because only the first “<” or “>” +will be converted to something appropriate. In basic mode +“&lt;” and “&gt;” are one-step ways of +circumventing this when these entities are available, which is +guaranteed for any form of HTML as well as for any form of XML. In +the didactic production system one should use “\ltc;” and +“\gtc;”. For other cases the one-step circumvention is +to use entity references to the numeric character codes, e.g., in +ASCII “&#3C;” and “&#3E;”, and for +convenience these may be brought up as macros, perhaps +“\lt” and “\gt”. +

    +
  • +
+

+

+
+
+

+

+
+ +
+

B.2.  Comments on the Didactic Production System

+ +

The didactic production system is to be understood as a potential base for development. +As such it is not intended ever to offer everything that might +be imagined. The following comments pertain to it. +

+ +
+
B.2.1.  Internationalization
+ +

Internationalization has been a concern of the project. It is +possible, for example, to use the ISO-Latin-1 +character ‘é’ in the name of an element. The +didactic article document type offers, for example, an element +étale, which is a style, parallel to bold. +Use of the character ‘é’ as a raw word character +data with the didactic production system is less robust than the more careful +“\acute{e}52 +construction, which is desirable for translation of article +to formats that do not support latin1. For that matter, the +exact extent of LaTeX's support of latin1 is a bit tricky, and +the whole matter of internationalization is currently under +review in the LaTeX project.53 +

+
+ +
+
B.2.2.  Document Type Definitions
+ +

Currently the project has one SGML document type definition +and two XML document type definitions. Files under the +various document types are suffixed as follows: +

+
+ +
First stage SGML.sgml
Author Level XML.xml
Elaborated XML.exml
+
+

+ +

Additionally, in the three steps of processing to generate an +XHTML+MathML file from an elaborated XML file there are two intermediate +XML files generated, the first with suffix “.yml”, which +lives under the document type definition for an elaborated XML +document, and the second with suffix “.zml”, an XML file +for which there is no extant formal document type +definition.54

+ +

The author-level XML document type is formalized by the +DTD "axgellmu.dtd", while the elaborated XML document +type is formalized by a modification that is found in the DTD +"uxgellmu.dtd". (The latter was the only XML document type +used with the regular GELLMU production stream prior to +October, 2006.)

+ +

The document type represented by "uxgellmu.dtd" is now called the +elaborated XML document type.

+ +

The author-level XML document type is suitable as a translation +target from other markups. The elaborated XML document type +should not be used as a translation target other than from the +GELLMU author-level XML document type.

+ +

All document type definitions are available under the UTF-8 +text encoding. The two older document type definitions will continue +to exist for a while under the Latin-1 (ISO-8859-1) text +encoding. The text encoding of a so-called DTD file (not +quite the same thing as a document type definition) is significant +in regard to the names of SGML/XML entities and +elements rather than in regard to document instances which might +be processed. The names of the DTD files are: + +

+
+ +
 Latin-1UTF-8
First stage SGMLgellmu.dtdugellmu.dtd
Author Level XML axgellmu.dtd
Elaborated XMLxgellmu.dtduxgellmu.dtd
+
+

+

+
+ +
+
B.2.3.  Translation to XML
+ +

Presently the author-level XML files link to a CSS stylesheet that +provides primitive rendering. One could go further in this direction, +but the rendering of mathematics will be limited without more development +in that direction of CSS. +

+
+ +
+
B.2.4.  Translation to HTML
+
+
+Math in classic HTML
+
The classic HTML output does not use graphic images for mathematical +zones in the manner of programs like latex2html. Instead it +uses pseudo-TeX notation for math. +There are a +number of reasons: +
    +
  1. Well typeset mathematics is available in the modern form of + HTML that is more precisely called XHTML+MathML.

    +
  2. +
  3. Graphical images completely block accessibility in the + sense of the World Wide Web Consortium's + Web Accesibility Initiative.

    +
  4. +
  5. The present classical HTML output files may be deciphered + in terminal window browsers.

    +
  6. +
  7. The present classical HTML output files may be “dumped” to + plain text using a program such as lynx or w3m + for various sometimes useful purposes.

    +
  8. +
+ +
+Style.
+
HTML and XHTML+MathML made with the didactic production system now rely on CSS, even, for +some things, level 2 CSS. +
+
+ +
+
B.2.5.  Translation to LaTeX
+ +

This translator writes LaTeX2E. A number of packages, including +graphicx, amsmath, amssymb, amsfonts, +bm, url (not hyperref for the standard track +where the focus is on printed output), and inputenc for UTF-8 +(which may be needed even if the GELLMU source or, otherwise, the +author-level XML source is not UTF-8 encoded). +Apart from current font availability issues, the author would have +preferred to invoke the T1 font encoding.

+ +

Even though GELLMU source uses the names equation and +eqnarray, in the LaTeX formatting amsmath constructions +are used.

+ +

A small modification of this translator can be used to write +Adobe's Portable Document Format (PDF) with pages sized for screens +rather than for paper. +

+
+ +
+
B.2.6.  Future Plans
+ +

This is a very limited list. +

+
+
A literate document type definition.
+
+ +

Capable of spawning not only the 5 DTD's but type definitions +under other mechanisms such as, for example, RelaxNG. +

+
+
Mathematical Semantics
+
+ +

Provision for optional semantic tightening sufficient for authors +wishing to be able to export mathematical markup into computer algebra +systems. +

+
+
+

+

+
+
+
+
+

Footnotes

+
    +
  1. * The syntactic translator does, however, have some facilities for + classifying the names in a list in regard to common syntactic + behavior. See, in particular, the Elisp variables + gellmu-autoclose-list and gellmu-parb-hold, both + of which are not significant in basic GELLMU.
  2. +
  3. * With several minor exceptions, one related to the direct writing of +SGML attributes (which cannot contain markup and which do not have +many parallels in LaTeX) and another related to the way of escaping +the character ‘\’, everything about basic mode also +applies to advanced mode.
  4. +
  5. * There is a way, with the setting of several +variables for the syntactic translator in advanced mode, to have blank lines begin +new paragraphs in basic input for HTML
  6. +
  7. * This means that it is a relatively slow form of processing, but +the author believes that it is a good match for the intuitive +expectations of most LaTeX users.
  8. +
  9. * In a future release an alternative metacommand +called frontcommand may be provided which could be used, for +example, if one wishes to have a macro name of some kind match the +name of an actual SGML element.
  10. +
  11. * In the prototype production system based on +the didactic article document type the output from each +stage is available for examination and, where necessary, intervention. +However, such use of intervention is intended only for temporary +expedient use while a GELLMU system is being designed or enhanced. +As with LaTeX, enhancement is an ongoing process.
  12. +
  13. * In handling GELLMU source markup one could provide +a more elaborate processor that can be configured to know for each +such command the list of names for its positional arguments and +options. It was decided that this goes somewhat beyond syntactic +handling but that the question of whether a list of arguments and options +corresponds to sole content might be regarded as a syntactic matter.
  14. +
  15. * Its use is optionally permitted in basic mode as well.
  16. +
  17. * Indeed, LaTeX usage allows markup in options, but (element level) +markup is not permitted in SGML attributes. Note, however, that +in the didactic document type the SGML content model for an option is more restrictive +than that for an argument. Also in the didactic document type some options, such as +that for anch, which is described later in this section, are +practically required.
  18. +
  19. * To say seldom is not to say not. Two important +instances in the didactic production system are the series attribute for the +label command, which stands in, to the extent possible, for the +notion of counter in LaTeX, and the type attribute for +the series command, which provides emulation of counter +conversion from, say, number values to letter values.
  20. +
  21. * In the XML version of article the option becomes the element +anchref and the anchored text becomes the element anchv. +One may use these names directly in GELLMU source, but option/argument +notation is more familiar and more succinct.
  22. +
  23. * There was no list +of this type in early pre-release versions of the syntactic translator.
  24. +
  25. * The LaTeX concept of document class has only a loose correspondence +with the SGML concept of document type.
  26. +
  27. * It is not inconceivable that at some future point conscious writing +for some XML document types using LaTeX-like markup might be +subsumed in the LaTeX project, but in saying this, the author is +neither predicting it nor assessing the merits of the idea. He has no +affiliation with the LaTeX project other than as a user.
  28. +
  29. * Strict discussion of an SGML document type would not allow use of the +word handled. In this instance a coordinated pair of document +types is being described, one SGML and the other an XML translation. +For most purposes the SGML document type is the richer of the two. +However, because of its use of a handful of generic elements (in its +reserved namespace consisting of names that contain ‘0’ (zero) +as first numeric character) for modeling certain convenience features +of LaTeX, it is possible for a correct translation of a valid SGML +article to yield an XML version that fails validation because the +content models of the generic elements are necessarily loose.
  30. +
  31. * The variable +gellmu-xml-strict is by default unset in advanced mode.
  32. +
  33. * The correct LaTeX markup is “\LaTeX{} document”. In the didactic production system the +name of LaTeX is “latex”, which is a defined-empty +element, that for the SGML version of article may be marked up +safely either as “\latex;” or as “\latex{}”.
  34. +
  35. * In math ‘[’ sometimes needs to be escaped to prevent confusion +between its markup use and its ordinary use in an instance such as +the markup for Z[t]. The syntactic translator would need to know +vocabulary — at least the argument/option pattern for +mathbb — in order to elude the syntactic ambiguity.
  36. +
  37. *\~” is an example of a markup string that is defined in LaTeX (for +an accent) that is not defined in the didactic document type. A LaTeX user may recover +a prior markup habit of this type using newcommand possibly in +combination with macro. For more information see the +discussion of accents (section 5.8).
  38. +
  39. * It is possible to merge the inline math and tmath zones +at any level of processing beyond the syntactic translator. These are indeed the same +in LaTeX, but the syntactic translator resists the temptation here to +go beyond syntax and merge them. With the didactic article +document type the formatting to LaTeX inserts the LaTeX markup +“\,” for a small horizontal space before and after +math, but not before and after tmath.
  40. +
  41. * The syntactic translator simply outputs the SGML defined-empty element +brk0, which belongs to its reserved name space. The dual use of +brk0 involves some SGML chicanery that is resolved during translation +to the XML version of the article document type, +where tabular is converted to table and non-tabular use of +brk0 is converted to brk. See also the handling of +array, which is different even though the source markup, as in +LaTeX is similar.
  42. +
  43. * Alternate forms “\aos;”, “\aoq;”, “\aoe;” of sentence ending +punctuation are provided that may be used following inline mathematical +markup at the end of a sentence. Similarly, “\aoc;” is an alternate +form for a comma.
  44. +
  45. * Or one +could use: +
    +
    +\Section{\sectiontitle{Some...}
    +
    +\para A para...  . . .}
    +
    + +instead of using the environment-like +begin/end construction.
  46. +
  47. * In fact, classical SGML document types are often +even more elaborate than this.
  48. +
  49. * Caveats: +
    +
    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” values.
    +
    While 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.
    +
    +
  50. +
  51. * It is recommended that the characters in label key strings be +restricted to lower case ASCII letters, the digits 0–9, and +possibly the character ‘-’ or the character ‘.’ for +maximal inter-operability with current and future formattings. +For example, the ‘_’ is problematical in this context.
  52. +
  53. * Although one could provide SGML modeling for LaTeX's +counters, it would not be very much along the lines of main track +SGML or XML document types.
  54. +
  55. * 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.
  56. +
  57. * A klabel is a +“visible key” label.
  58. +
  59. * It may be left empty, but it must be present. +
  60. +
  61. * 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”.
  62. +
  63. * The didactic production system offers a way to furnish a formally empty string, which is an +empty element called empty in the document type for use in +places such as the the table of contents option of a sectional unit, +where it is not otherwise possible to distinguish after parsing whether +deliberately empty content was specified by the author. +That is, the markup “\sopt{}” furnishes an empty +string which, in turn, signals “no sopt”, while +“\sopt{\empty;}” indicates that empty content +was specified for sopt.
  64. +
  65. * When editing for HTML one may, of course use HTML's pre, +which stands for “pre-formatted text”
  66. +
  67. * With a sufficiently long list of output format candidates each of the +33 non-alphanumeric printable ASCII characters is unsafe. +However, one might use an external character-to-string conversion +program to prepare a large amount of verbatim material for inclusion +inside the simplistic verbatim command in GELLMU source.
  68. +
  69. * To export this procedure for general advanced mode usage, all +of the names used need to be made user-configurable.
  70. +
  71. * Familiar short forms +may be introduced by a user using the macro facility.
  72. +
  73. * For the +third method one's GELLMU driver script must provide appropriately +for the text encoding of the source file.
  74. +
  75. * This meaning of scale differs +from the meaning of scale with includegraphics under +LaTeX's graphicx package. New controls of this type +may be introduced in a future version.
  76. +
  77. * Note that the use of lbalbr in this instance is insufficiently +semantic for translation to content MathML while it is meaningful +for translation to presentation MathML. Adequate enhancement might +be had by providing mml="cases" (using a name from amsmath) +as an attribute for lbalbr with this example.
  78. +
  79. * There is also a default counter that is used when no label series name +is present. That counter simply is the position of the underlying +assertion in the list of all assertions.
  80. +
  81. * However, a declared math symbol may be invoked in +a newcommand that takes arguments.
  82. +
  83. * Such unattached braces in GELLMU markup lead to an lg0 tag in +the output of the syntactic translator that is translated to an +lgg tag in the XML version of the didactic document type.
  84. +
  85. * Version 20 or later should be adequate. Although the author began +this project using version 19, he is no longer able to run tests +with that version.
  86. +
  87. * It is an embarrassment of the business world in the years since 1985 +that many business computing installations do not provide general +purpose cross-platform programming systems despite the widespread +availability of excellent free robust systems such as Emacs (for +Lisp), gcc (for C), and Perl. This new phenomenon +apparently arises not so much from lack of organizational interest but +from the fact that the responsibility for maintenance cannot be passed +beyond the local system manager to a vendor.
  88. +
  89. * None of the enclosed scripts either for linux or for win32 should be used +without prior examination and verification for suitability.
  90. +
  91. * The main reasons that this version is not the default with a call to +gellmu-trans are: +
      +
    1. It breaks the paradigm under which a GELLMU command name is the +name of an SGML element.

      +
    2. +
    3. It breaks backward compatibility with earlier versions of the +syntactic translator, i.e., breaks older documents.

      +
    4. +
    5. It is felt that the user invoking verblist this way +should be aware of what is being done.

      +
    6. +
    + +Note that direct invocation of verblist requires escaping +special characters. Thus, using the function call +gellmu-verblist converts the name verbatim from a +command name to a meta-command name.
  92. +
  93. * Specifically, this mention of “input” refers to + what is called “standard input” in a command line + situation. There may be a challenge here on platforms that do + not provide a command line.
  94. +
  95. * Formally, two of these auxiliary files are considered part of the + elaborated XML document.
  96. +
  97. * At the time of this release +there was discussion in the UseNet newsgroup +news:comp.text.sgml about a proposed revision of +SGMLSPM by another party. The code for “SGMLS.pm” +included in this GELLMU release contains a very small modification +of Megginson's 1995 release.
  98. +
  99. * The direct internal subset is the content of the optional argument of +the documenttype metacommand that follows its required argument. +It should be noted in the didactic production system that the direct internal +subset cannot be propagated to the XML form of article +because it is digested by any standard SGML parser and, hence, +by any translation based on a standard parsing. Thus, +any pieces are merged in the XML form of an article although +the translator xmlgart might be modified to +construct an internal declaration subset there and provide +partitioning of the XML version among filesystem pieces based +on document structure.
  100. +
  101. * Please observe the rules of the LaTeX project regarding filenames +as well as the license rules of the GNU General Public License +if you wish to distribute a modified version of the Elisp +source. Alternatively, the author is always interested in learning +of suggestions for change.
  102. +
  103. * The corresponding usage in LaTeX would be “\'e”; +this could be brought into GELLMU source using \macro, +but it must be resolved to a name in the output of the GELLMU syntactic translator where +everything that is markup needs a name. Rather than using a +general container acute, the document type could have provided +a name for the specific character.
  104. +
  105. * Alternatively LaTeX source can be submitted to the program +lambda which is the LaTeX format for the program +omega that is now under development as a substitute for +Knuth's TeX, the program, with internationalization as a stated +goal.
  106. +
  107. * There is no formal document type definition +for a “.zml” file because such a file is endowed via XML +attributes with information about tree structure for +mathematical zones.
  108. +
+ + + diff --git a/support/gellmu/doc/glman.pdf b/support/gellmu/doc/glman.pdf new file mode 100644 index 0000000000..e0ad522518 Binary files /dev/null and b/support/gellmu/doc/glman.pdf differ diff --git a/support/gellmu/doc/glman.xhtml b/support/gellmu/doc/glman.xhtml new file mode 100644 index 0000000000..ba73f7fefa --- /dev/null +++ b/support/gellmu/doc/glman.xhtml @@ -0,0 +1,3648 @@ + + + + + + + + + + +The GELLMU Manual + + +

The GELLMU Manual

+

Version 0.8.4 Release, July 2007

+

William F. Hammond

+

+Dept. of Mathematics & Statistics
University at Albany
Albany, New York 12222 (USA)

+

Email: hammond@math.albany.edu

+

Revision of July 5, 2007

+
Copyright © 2001–2007 William F. Hammond
+

ABSTRACT

+
+ +

This is the manual for Generalized Extensible LaTeX-Like +Markup (GELLMU). The central focus in the GELLMU project is to tie +LaTeX to the worlds of SGML and XML by providing LaTeX-like markup +for writing documents under SGML and XML vocabularies (formally +known as document types).

+ +

The Manual explains the distinction between basic and +advanced use, provides a description of regular +GELLMU as an instance of advanced GELLMU, and discusses +the use of the didactic production system, which is the project's suite of +processors for working with regular GELLMU.

+ +

The Manual also deals with the metacommands available when +writing GELLMU markup. One of these metacommands is the project's +emulation of LaTeX's newcommand, which makes it possible to +have macros taking multiple arguments while writing for an SGML or +XML vocabulary. +

+
+
+

Table of Contents

+
+
1  Introduction... * +
+2  Basic GELLMU... * +
+3  Metacommands... * +
+3.1  \documenttype... * +
+3.2  \newcommand... * +
+3.3  \begin{} … \end{}... * +
+3.4  \macro and \Macro... * +
+3.5  Macro-Level Fronting of SGML Element Names... * +
+4  Advanced GELLMU... * +
+4.1  Illustrations.... * +
+4.2  Multiple Argument/Option Syntax... * +
+4.3  Limitation in Regard to XML... * +
+5  The Didactic Document Type... * +
+5.1  Suggestions and Caveats... * +
+5.2  Markup Fundamentals... * +
+5.2.1  Explicitly named commands.... * +
+5.2.2  Certain single characters.... * +
+5.2.3  Certain strings... * +
+5.3  Large Structure... * +
+5.4  Sectioning... * +
+5.5  Labels, References, and Anchors... * +
+5.5.1  Labels and Sequencing... * +
+5.5.2  Anchors... * +
+5.5.3  Example Emulating a LaTeX Counter... * +
+5.6  General Usage for Sectional Units... * +
+5.6.1  The Content Model... * +
+5.6.2  The LaTeX-Like Form of General Usage... * +
+5.7  verbatim, verblist, and +manmac... * +
+5.8  Accents... * +
+5.9  Tabular Environment Emulation... * +
+5.10  Graphic Inclusions... * +
+6  Mathematics in article... * +
+6.1  General... * +
+6.2  Assertions... * +
+6.2.1  Examples... * +
+6.2.2  Usage for assertion... * +
+6.3  Equations and Equation Arrays... * +
+6.4  The \mathsym Metacommand... * +
+7  The Didactic Production System... * +
+7.1  Permission... * +
+7.2  Materials... * +
+7.3  Other Required Software... * +
+7.4  Using the syntactic translator... * +
+7.4.1  Operation in Batch Mode... * +
+7.4.2  Interactive Operation... * +
+7.4.3  Interrupting the Syntactic +Translator... * +
+7.5  Using the didactic production system... * +
+7.5.1  Staged Design... * +
+7.5.2  Default Staging... * +
+7.5.3  Parsing with nsgmls... * +
+7.5.4  Processing with sgmlspl... * +
+7.5.5  Environmental Variables... * +
+Appendix A  The GELLMU Archive... * +
+Appendix B  Release Notes... * +
+B.1  Comments on the Syntactic Translator... * +
+B.2  Comments on the Didactic Production System... * +
+B.2.1  Internationalization... * +
+B.2.2  Document Type Definitions... * +
+B.2.3  Translation to XML... * +
+B.2.4  Translation to HTML... * +
+B.2.5  Translation to LaTeX... * +
+B.2.6  Future Plans... * +
+
+ +
+

1.  Introduction

+ +

GELLMU is an acronym for “Generalized Extensible +LaTeX-Like MarkUp”, which is the author's concept for using LaTeX-like +markup to write consciously for SGML document types such as HTML, +DocBook, TEI, or GELLMU's own didactic LaTeX-like document +type called article.

+ +

It evolved from earlier thought about delineation of a coherent subset +of LaTeX commands with the property that if a LaTeX document used +only those commands then it could be translated with full reliability +to other formats including HTML so that documents could be prepared +both for print and for the web from a single source.

+ +

Problems with this early thought during the years 1996–1997 included +the fact that there did not seem to be a community of LaTeX users +willing to focus on a narrow vocabulary and the fact then of a legacy +practice that mixed LaTeX commands freely with non-LaTeX TeX +commands.

+ +

The present idea was crystalized in the summer of 1998 while the author +was looking at Ulrich Vieth's LaTeX markup for the TeX Directory +System (TDS) specification from the TeX User Group +(TUG), which now is physically realized in TUG's +TeXLive series of TeX-related software distributions on +CDrom. The HTML version of that specification was derived +through an intermediate ad hoc translation from LaTeX to +Texinfo, the language of the GNU Documentation System, +which is a robust hypertex system pre-dating HTML driven by TeX +the Program.

+ +

In thinking about generalizing Vieth's ad hoc translation, which used +GNU Emacs Lisp (Elisp), one of the most widely available +free cross-platform programming languages +for which there is a free robust engine, the same engine that +underlies the interactive editing interface of Emacs, the author +realized that the structure of Texinfo is very much like that of an +authoring level SGML document type. From that idea it was a small +step to decide that one might profitably write Elisp code to use LaTeX-like +markup for the conscious writing of a new LaTeX-like article document +type.

+ +

The idea, which by itself saves keystrokes, gains significant power +with the emulation of LaTeX's newcommand. Although SGML +markup offers both subdocument inclusions and macro substitutions +using the notion of entity, there is no SGML-standard macro +facility that takes arguments. Moreover, GELLMU's newcommand, +which is, unlike LaTeX's, a simple macro substitution facility, +also provides a base for experimenting with document type extensions +in a way that the SGML notion of entity does not since SGML +entities are invoked with a notation that is apart from that used to +markup with SGML elements, which are the objects corresponding +in the GELLMU scheme with LaTeX-like commands.

+ +

Software associated with the GELLMU project falls into two parts: +

+
    +
  1. The syntactic translator. This is a purely syntactic layer for converting + LaTeX-like markup in configurable ways to SGML markup. Its output may + be handled in standard SGML or XML systems.

    +
  2. +
  3. The didactic production system. This component is a sketch, which might usefully + serve as a base for further development, of an SGML production + system for an authoring environment that consists of +

    +
      +
    1. An SGML document type called article that is + accompanied by a corresponding XML document type. +

      +
    2. +
    3. A package of extensible translating utilities written + in the language Perl. +

      +
    4. +
    + + As its name suggests, these materials are didactic and + should be regarded as unfinished for production work.
  4. +
+

+ +

There are two overall concepts: basic mode and advanced +mode. The basic mode may be used to write consciously for any +standard document type such as HTML, DocBook, or TEI, +and the syntactic translator is for that mode the only software under this project that +might be relevant. The advanced mode incorporates a configurable +broader array of LaTeX-like markup features, mostly for brevity, in the syntactic translator. +This mode is fully developed only for use with a LaTeX-like document type +such as the didactic article document type that is part of the +didactic production system.

+ +

One may use any SGML or XML processing framework in working +with the article document type. The didactic production system includes what is +needed to produce both HTML and regular LaTeX forms of an +article instance. Consequently, one is able to produce both +DVI using the LaTeX format for TeX, the program, and PDF +using the LaTeX format for PDFTeX, the program. Moreover, one +may tune the PDF in various ways using small alterations of the +Perl code for translating the XML version of article +to regular LaTeX. +

+
+ +
+

2.  Basic GELLMU

+ +

Neither the basic nor the advanced mode involves in any way adoption +of the language of LaTeX. (But many command names under the didactic +article document type, mimic LaTeX command names.) There are +two fundamental ideas: +

+
    +
  1. A LaTeX-like command “\foo” corresponds + to an SGML element “<foo>”.

    +
  2. +
  3. The syntactic translator is almost entirely ignorant of vocabulary + and a name like foo need not have meaning in it although + it must have meaning in the document type for which one is + consciously writing.1

    +
  4. +
+

+To use the basic mode one must be familiar with the SGML document +type for which one is writing. Ordinary HTML is an example. Very +few of the features in the advanced markup not also part of the basic +markup2 +make any sense for use in the direct preparation of HTML with LaTeX-like +input.

+ +

GELLMU uses LaTeX special characters such as ‘\’, +‘{’, and ‘}’ along with LaTeX-like argument/option syntax, +where braces immediately following a command name indicate command +arguments and square brackets, i.e., ‘[’ and +‘]’, indicate command options. A command corresponds to +an SGML element, and in basic mode a command may have at most one +argument, the content of which corresponds to SGML element content, +and at most one option, the content of which corresponds to a list of +SGML attribute specifications. Thus for example, in basic mode for +HTML one may use the markup +

+
+\a[href="http://www.w3.org/"]{The World Wide Web Consortium}
+

+to form the HTML anchor: +

+
+<a href="http://www.w3.org/">The World Wide Web Consortium</a> +.
+

+(The formation of anchors with the didactic article document +type in advanced mode is slightly more complicated because the +characters ‘=’ and ‘/’, which may acquire special (and +“overloaded”) semantic significance in mathematical +contexts, are held for delayed evaluation as empty elements and +because the syntactic translator, which does not recognize command names, regards this +usage in advanced mode as multiple +argument/option syntax (section 4.2), which is not part of basic +mode.)

+ +

An example of the distinction between basic and advanced GELLMU is that +in advanced mode it is possible and easy to arrange to have a blank line, +as in LaTeX, represent the beginning of a paragraph. In basic mode +for HTML one +must3 +use “\p” to begin a paragraph, and for the XML version of +HTML one must also provide markup for the end of every paragraph, which +may be done in several ways.

+ +

For some of the details on using the basic markup with HTML see +Using the GELLMU Syntactic Translator to Write HTML. +It will be instructive to have the parallel source +markup available at the same time. +

+
+ +
+

3.  Metacommands

+ +

A metacommand is a LaTeX-like command that does not correspond to an +SGML element. Each metacommand is handled internally by the +syntactic translator. +

+ +
+

3.1.  \documenttype

+ +

A document prepared in GELLMU source usually begins with a +documenttype command. For example, +

+
+\documenttype{html}
+

+is used to begin a document prepared for the most common form +of classical HTML.

+ +

The syntactic translator has two public variables +gellmu-doctype-keylist and gellmu-doctype-info, +which are Elisp associative lists, that enable one to match XML +or SGML “<!DOCTYPE ... >” declarations with +LaTeX-like +

+
+\documenttype[my-optional-key]{my-doctype}
+

+commands, where my-optional-key is available to override a +default key for my-doctype. Thus, for example, +“\documenttype{html}” points to the default key for +“html”, which is “html-4.01” and which points to +the W3C HTML 4.01 Transitional document type, while +

+
+\documenttype[xhtml-1.0s]{html}
+

+indicates W3C XHTML 1.0 Strict.

+ +

A user may configure these variables without modifying the source +code for the GELLMU syntactic translator, but minimal knowledge of Elisp will +be required. A future release might provide a configuration file +for this purpose.

+ +

A second option for the documenttype metacommand, which must +follow the single required argument, is provided for writing an +internal declaration subset. The contents of an internal declaration +subset constructed this way may be any internal declaration subset +material. However, some care is required for entering characters +that are special. To ease the handling of special characters four +metacommands have been provided for use inside the internal declaration +subset: +

+
+
\attlist{...}
+
\element{...}
+
\entity{...}
+
\notation{...}
+
+

+For example, a user who wishes to be able in source to use +“&quo;” to reference the ASCII quotation mark +when writing consciously in basic mode for TEI.2 would begin +the source file with: +

+
+
+\documenttype{TEI.2}[
+
+\entity{quo "&#x22;"}
+
+]
+
+

+

+
+ +
+

3.2.  \newcommand

+ +

From a user's viewpoint this provides emulation of LaTeX's +newcommand. But it is a simple facility providing macro +substitution with arguments forward in a source file from the +point of its occurrence. It differs from the newcommand +facility in LaTeX in that it does not add the name +of a newcommand to any namespace. Instead, as the syntactic translator encounters +each newcommand definition, it performs the corresponding expansions +and then forgets the name.4

+ +

The general construction of a newcommand definition is +

+
+\newcommand{name}[nargs][first]{value}
+

+where name is the name of the newcommand, +nargs optionally specifies the number of its arguments, +first is an optionally-provided default value for the first +argument, and value denotes the value string.

+ +

In the value string the character ‘#’ is used to reference an +argument by the numeric value of its position. Thus, “#1” +refers to the first argument that is provided at an invocation of +the newcommand, “#2” the second, etc., and there is no limit +on the number of arguments. It is not required that nargs be +supplied in order to define and use a newcommand taking +arguments. However, for the sake of automatic error checking the +use of nargs is strongly recommended when the definition of +a newcommand taking arguments is entered.

+ +

Example. In writing HTML one might use +

+
+
+\newcommand{\href}[2][http://www.w3.org/]{\a[href="#1"]{#2}}
+
+

+for brevity in writing many HTML anchors. With this definition the +invocation +

+
+\href{http://www.myweb.mydomain/me.html}{my web page}
+

gives +rise to the HTML markup +

+
+<a href="http://www.myweb.mydomain/me.html">my web page</a>
+

+while the invocation +“\href{Web Central}” gives rise to +

+
+<a href="http://www.w3.org/">Web Central</a> .
+

+ +

Rules. +

+
    +
  1. The name of a newcommand may not be referenced in its +value string.5 +

    +
  2. +
  3. A newcommand may not be invoked before it is defined unless +the invocation occurs in the value string of another newcommand +definition in which case the definition of the latter may be first and +must be first if the invocation of the former in the definition +of the latter involves argument substitutions.

    +
  4. +
+

+ +

Failure to observe these rules may cause the syntactic translator to enter an infinite +recursive loop. If a user suspects this may have happened, then the +invocation of the syntactic translator should be interrupted (section 7.4.3). +

+
+ +
+

3.3.  \begin{} … \end{}

+ +

These provide emulation of LaTeX environment notation without +actually providing anything that is not otherwise available. Markup +which resembles that for a LaTeX environment simply resolves to an +SGML element. This usage may be convenient for SGML elements of +large scope such as, for example, the body of an HTML +document.

+ +

With advanced mode the special form +

+
+\begin{document} . . . \end{document}
+

+may be used to emulate the corresponding feature of LaTeX for a +document type, such as the didactic article document type, +that in the large consists of a preamble and a body. +

+
+ +
+

3.4.  \macro and \Macro

+ +

Use of these is discouraged in the absence of a need. One situation +that presents a need is name “fronting”: see the +discussion below in section 3.5. +Please note that in most situations one may use newcommand +without an argument for simple macro substitutions.

+ +

macro and Macro do very much the same thing except +for the order of expansions. Every macro is expanded forward +as encountered before any newcommand definition is expanded. Every +Macro is expanded forward after every newcommand +has been expanded.

+ +

There are four primary differences between macro and Macro, +on the one hand, and newcommand, on the other hand. +

+
    +
  1. Neither macro nor Macro can be used to define a +macro that takes arguments.

    +
  2. +
  3. The name of a newcommand must consist of word characters, +but there is no restriction on the characters, apart from unbalanced +brace characters (‘{’ and ‘}’), that may appear in +the name field of a macro or Macro metacommand.

    +
  4. +
  5. If the name of a macro or Macro does not begin +with the command sequence introducer, i.e., the character ‘\’, +then an invocation of that metacommand is given by every forward match +of its name. The use of such names is strongly discouraged because +document segments can then become opaque much too easily.

    +
  6. +
  7. A newcommand invocation, absent the use of a semi-colon +for termination, is only effective at the whole word level — with +word here denoting a maximal string of successive word +characters — whereas macro and Macro invocations are +effective regardless of word boundaries.

    +
  8. +
+

+ +

Elaboration on the last point: If x is the name of a +newcommand, then invocations are +only considered by the syntactic translator on the string “\x” when it is followed +by a non-word character. For example, if the locale is us-ascii, +then the word characters are the 52 upper and lower case letters +and the ten numerals. Therefore with newcommand, as with its +namesake in regular LaTeX, the use of “x” as a name will +not intercept the occasions of “\x” as an initial +substring of “\xy”. With either macro or +Macro such interception does take place. One may block it at +the point of an invocation with the markup “\x;”, and when +this is done, the terminating semi-colon is removed.

+ +

Human authors using either macro or Macro may find +unanticipated interactions between the three forms of macro +substitution.

+ +

Unbalanced brace characters, i.e., the characters ‘{’ and +‘}’, may not be used in the name field or the value field of +any form of macro metacommand. +

+
+ +
+

3.5.  Macro-Level Fronting of SGML Element Names

+ +

The word fronting as used here describes the practice of +modifying the meaning of an SGML element name by using one or +more of the macro facilities to generate usage of the same name as +an element combined with other markup using the syntax that would +otherwise correspond to basic use of the element.

+ +

Suppose, for example, one wants all paragraphs in HTML (marked +with \p in GELLMU source) to be placed in a (style) class called +custom.

+ +

Recommended procedure: Create a new unique name and then use +macro to front it. +

+
+
+\newcommand{\cp}[1][]{\p[class="custom"]{#1}}
+
+\macro{\p}{\cp}
+
+

+Each invocation of “\p{...}” will first be replaced by “\cp{...}” +because all macro definitions are expanded before any +newcommand definition is expanded. Subsequent expansion +of the newcommand will yield +

+
+\p[class="custom"]{...} .
+

+ +

This will not intercept the alternate, otherwise nearly equivalent, +markup given with \begin{p}\end{p} since newcommand +is based on simple macro substitution and does not operate at the +level of namespaces. +

+
+
+ +
+

4.  Advanced GELLMU

+ +

The idea with advanced GELLMU is that for SGML document +types sharing structural characteristics with LaTeX one might +wish to have the syntactic translator provide LaTeX-like markup syntax beyond the level +used with basic GELLMU and that these additional layers of syntax +should be configurable. The only substantial realization of this +program so far is the case of the GELLMU didactic document type called article. +The specifics of that realization are discussed in the following +section. +

+ +
+

4.1.  Illustrations.

+ +

One might want to be able to use blank lines, as in +LaTeX, for introducing new paragraphs in a document type that +provides paragraphs.

+ +

In some article-level document types each sectional unit has a unit +header providing markup for various, often optional, unit descriptors. +It is convenient to be able to use LaTeX-like multiple +argument/option syntax (section 4.2) for these.

+ +

If the document type provides authoring-level mathematical markup +beyond inclusions of the World Wide Web Consortium's +Mathematical Markup Language (MathML) +under its XML namespace +regime, then one might want to be able to use the ‘$’ character +to toggle in and out of inline math, and if the document provides +for math displays, then one might want to use, as in LaTeX, the +strings “\[” and “\]” as delimiters for +unstructured mathematical displays, and markup such as +

+
+\begin{equation} . . . \end{equation}
+

+for a single equation, and markup such as +

+
+\begin{eqnarray} . . . \end{eqnarray}
+

+for a list of equations.

+ +

It is important to emphasize, however, that by overall system design +the syntactic translator operates without substantial knowledge of vocabulary. While +it is true that if ‘$’ is to provide a toggle for an inline +element containing math, say, tmath, then the syntactic translator needs to have +that association made, but the association is provided as the +value of a configuration variable in the syntactic translator that can be changed +between documents so that the syntactic translator may be used with many document +types.

+ +

One way to make such configuration convenient is to use an array of +Elisp functions that are fronts with various variable configuration +packages for the basic function gellmu-trans in the syntactic translator. +

+ +

The general outline for advanced GELLMU with arbitrary document types +is not fully developed in the present release. Instead the project +has concentrated on the realization of these ideas for the project's +didactic article document type, which is the subject of the +next section.

+ +

As the syntactic translator stands now, basic mode is characterized in the syntactic translator by the +true setting for its Boolean variable gellmu-straight-sgml, +while the configuration used by default for the didactic document type (which +could be handled in basic mode with more verbose source markup) +has that variable set false and also the variable +gellmu-regular-sgml set false.

+ +

The term regular GELLMU refers to use of the +syntactic translator with the default configuration for the didactic document type. It involves nearly +maximal emulation of LaTeX-like markup; it implies both advanced mode +and the didactic document type (section 5) article. +

+
+ +
+

4.2.  Multiple Argument/Option Syntax

+ +

An essential point in the present design is that the whole system +is built from components, each of which has its own +function6. +Consistent with this design the syntactic translator operates with knowledge of syntax +but little or no knowledge of language.

+ +

Multiple argument/option syntax has been built into advanced mode as +part of the overall idea of providing, where sensible, LaTeX-like +features in a precise user markup interface for writing in document +types under SGML and XML.

+ +

What are the rules for converting the multiple argument/option syntax +in source markup into SGML? Direct conversion by the syntactic translator of this +type of usage into XML is not available because such conversion +requires some language knowledge and the program does not operate with +knowledge of language at that level7. +One obtains an XML version of a +document in the didactic production system by using a translator with +minimal knowledge of the command vocabulary to create the XML version +from an SGML version that is the immediate output of the syntactic translator.

+ +

In multiple argument/option syntax, which is much like that of +LaTeX, arguments and options follow command names. Arguments are +delimited by braces, i.e., ‘{’ and ‘}’ and options +by square brackets, i.e., ‘[’ and ‘]’. There +must be no white space between the arguments and options nor between +the command name and the first member of an argument/option sequence.

+ +

Each command with a multiple argument/option sequence is translated to +an open tag whose name is the name of the command. Each argument is +translated to an ag0 element and each option to an op0 +element. (Both ag0 and op0 lie in GELLMU's reserved +name space.) There are two exceptional cases. + +

+
    +
  1. The first argument or option is an option inside which the very +first character is a colon, i.e., ‘:’. This is the method +provided in advanced mode for the direct entry of an SGML attribute +sequence.8 +The entire contents of the option string, apart from the +leading ‘:’, which is discarded, are understood to be a +sequence of SGML attributes for the SGML element whose name is the +name of the command. There is no syntax check of the attribute +contents by the syntactic translator. Such an attribute option is not treated +as an op0 element. In particular, an attribute option is +correctly followed immediately by a semi-colon, i.e., the character +‘;’, if and only if the corresponding SGML element is a +defined-empty element under the SGML document type. Since SGML +attributes correspond to very little of classical LaTeX9, +attribute options are seldom used10 +in the didactic production system. One such use is for the GELLMU equivalent of latex's +equation* and eqnarray* environments, which is marked up +this way: +

    +
    +
    +\begin{equation}[:nonum="true"]
    +
    +e = mc^2
    +
    +\end{equation}
    +
    + +to produce: + +e=mc2 +
  2. +
  3. The first argument is the only argument and there are no options +apart from a possible attribute option. This case, which is extremely +common, is exceptional relative to argument/option handling +since the sole argument simply becomes element content without an +ag0 wrapper. +

    +
  4. +
+

+ +

When a command has a multiple argument/option sequence, the question +arises whether the ag0 and op0 elements that arise from +the arguments and options are the only content of the element +corresponding to the command. The syntax does not provide a way to +determine this. On the other hand, the SGML document type definition +does provide information that indicates whether other content is +possible. It is beyond the scope of the design of the syntactic translator for the +syntactic translator to read a document type definition. The syntactic translator does, however, +have a configurable list variable gellmu-autoclose-list +that contains the names of elements +for which no content beyond the elements arising from arguments and +options is possible. While it is not necessary that every such +command be entered in this list, when such a command not in the list +is not explicitly followed by an element closing command, it is +possible in some instances for an SGML parser to infer incorrectly +the location of end of the element. Thus, the didactic production system provides a +command anch for making anchors. The document type definition +provides for one option, a reference, and one argument, the anchored +text.11 +Because the syntactic translator does not consider the document type definition, +if one enters the markup +

+
+\anch[href="http://www.w3.org/"]{W3C} HQ ,
+

+unless the name anch is in the list12 +gellmu-autoclose-list, +an SGML parser will not have reason to close the anch until +it sees the space following the anchored text “W3C”, and so +that space will be considered insignificant white space with the result +that there will be no space between the anchored text and the following +“HQ”. +

+
+ +
+

4.3.  Limitation in Regard to XML

+ +

A final general comment about advanced mode is that the features it +can provide beyond basic mode when one is writing consciously for an +XML document type are somewhat limited. For example, blank lines +cannot easily be made adequate for paragraph markup with the XML form +of the didactic article document type. Although it is not a +specific limitation for future editions of the syntactic translator, the vision is that +use of advanced mode will be specifically for a somewhat rich SGML +version of a document type. +

+
+
+ +
+

5.  The Didactic Document Type

+ +

The didactic document type is the document type underlying what is called regular +GELLMU. It is the heart of the idea of GELLMU as a bridge for authors +from LaTeX to the world of XML. More specifically, the bridge is +from the world of a LaTeX article to a document type in the +world of XML, also called article, that has a structure and a +vocabulary similar to those of the LaTeX document class.13 +The techniques used in the didactic production system are extensible and can be carried over +to other types of documents than articles. It is important to note +that there are many features in regular LaTeX which have no analogue +so far in the development of this project. One might hope to get an +idea of the extent of coverage by reviewing the examples in the +project archive (appendix A).

+ +

When an author prepares a document as a LaTeX article, the +document is being marked up as data for a specific typesetting +program: Donald Knuth's program TeX running with the main LaTeX +facilities loaded.

+ +

When an author prepares a document as GELLMU source, the syntactic translator provides +a LaTeX-like markup interface, but its output is not data for a +specific typesetting program. Rather it is data for a broad class of +processors. This means that multiple output formats can be obtained +from a single source without the need for human intervention because +XML provides a framework that makes it relatively easy to create +reliable programs for translation from an XML document type to other +formats. It offers, moreover, the possibility of translation to +future formats free of any need for human intervention once +translators from the original document type to such formats are +written. The small price one pays for this advantage in moving from +LaTeX markup to GELLMU markup is that the author must learn a few +new things.14

+ +

There are two formal constructions of the didactic document type. The name of the +document type is article. The first construction is an SGML +version of article that provides features convenient for +authors that are not available under XML. The second is an XML +version. For most non-technical purposes the two constructions should +be regarded as equivalent.

+ +

The SGML construction of an article is derived from GELLMU +source markup for a document by using the syntactic translator. The didactic document +type is accompanied by a translator implemented under the Perl +language framework sgmlspl by David Megginson (see +the release notes in appendix B +for more information) for converting the SGML version of an +article to the XML version.

+ +

The description in this section of the manual deals primarily with +source level markup for the didactic document type and with how it is handled 15 +by the time the XML version of an article is generated. Secondarily +there is comment on how it is rendered in the chief output formats +of the didactic production system, which are PDF, classic HTML, and XHTML+MathML.

+ +

A quick glance at the flowchart (section 7.5.2) shows that the first +XML stage — author-level XML — may be viewed as a second entry +point to didactic production system processing. Some day this could become a reasonable +formatting route for translations from things like Texinfo, +DocBook, and, even perhaps, classical LaTeX itself via a +processor such as tex4ht. +

+ +
+

5.1.  Suggestions and Caveats

+ +

Although this is the manual for a software release, it is not a book. +A document of book size would be required for a full description of +the didactic production system.

+ +

Much of the markup vocabulary is copied from LaTeX. There are some +instances where there is some deviation from LaTeX usage, and many +of those instances are mentioned here.

+ +

Definitive information about the didactic document type may be derived by consulting the +document type definition. Because the didactic production system is conceived as a base for +future development there are sketches in the document type definition +that are not covered by the didactic processors. For example, +although there is sketched code for the analogues of LaTeX's +paragraph and subparagraph commands, which are sectional +in nature, that is found in the translation from SGML to XML, there is +no sketched code for these elements in the two formatters.

+ +

Another way to obtain information about the didactic production system is by studying +examples including this manual and the examples in the +project archive (appendix A). +

+
+ +
+

5.2.  Markup Fundamentals

+ +

There are several kinds of commands: +

+ +
+
5.2.1.  Explicitly named commands.
+ +

Apart from macro level +metacommands an explicitly named command begins with a maximal +string introduced by the character\followed by +word characters, including the numerals0’, ‘1’, +…, ‘9’. The notion of word character depends on +one's locale, a concept that is formalized in GNU Emacs. In the +ASCII character set the word characters are the 52 upper and +lower case letters and the 10 numerals. The first numeral, if +any, must not be ‘0 since such names are reserved for use by +the syntactic translator. Command names are case sensitive.

+ +

An explicitly named command is a container, corresponding to an +SGML element, if its name is immediately followed, without +intervening white space, by the character ‘{’. In that case +the delimited zone of containment normally ends with the subsequent +balancing character ‘}’. (LaTeX-like +multiple argument/option (section 4.2) chains deserve more +discussion; for now it will suffice to point out that the use of the +\anch command in this document for making “anchors” is an +example, and, of course, LaTeX's \frac command is another example. +For the present discussion these commands are considered to be +containers.)

+ +

An explicitly named command corresponds to an SGML +defined-empty element if its name is immediately followed, +without intervening white space, by the character ‘;’.

+ +

An explicitly named command corresponds to an SGML element closing +tag if its name is immediately followed, without intervening +white space, by the character ‘:’.

+ +

The name of an explicitly named command is terminated by a non-word +character. There is a small, possibly acceptable, level of syntactic +ambiguity unless the name terminator is one of ‘{’, +‘;’, ‘:’, or ‘[’.

+ +

In basic mode if the name terminator is ‘[’, then that +character introduces a list of SGML attribute specifications, each of +the form name="value", and the list must be +terminated by the character ‘]’. Then if the following +character is ‘{’, the named command is a container that ends +with the balancing ‘}’. Otherwise the following character +may be ‘;’ if the named command is a defined-empty element and +must be so in that case for direct editing of an XML document type.

+ +

In advanced mode if the name terminator is ‘[’, then that +character introduces a LaTeX-like command option — part of the +emulation of LaTeX's multiple argument/option syntax (section 4.2) +— unless it is immediately followed, without intervening white space, +by the character ‘:’, in which case the bracketed content is +a list of SGML attribute specifications. (The initial ‘:’, +which may be used optionally in basic mode, is discarded.)

+ +

In any other case there is some syntactical ambiguity. The syntactic translator will +produce a corresponding SGML open tag unless the logical variable +gellmu-xml-strict has been set.16 If +the usage is consistent with the structure of the document type, an +SGML parser will in many cases be able to handle the result +correctly. The result of this type of syntactic ambiguity in source +markup is not tolerated if one is editing directly for an XML document +type. The terminator can be a blank space, but, if so, the +blank space is likely to become invisible after SGML parsing much +in the way that in LaTeX the markup +

+
+\LaTeX document
+

+will be collapsed into the single word form “LaTeXdocument” +when typeset.17 +

+
+ +
+
5.2.2.  Certain single characters.
+ +

The characters +‘\’, ‘{’, ‘}’, ‘^’, +‘_’, ‘$’, ‘%’, and ‘~’ +have command meanings that are similar to their meanings in LaTeX. +The characters ‘;’ and ‘:’ are ordinary characters that +have special meaning at the end of a command name. The character +‘#’ is also a special character used, as with LaTeX, in +newcommand templates. In source for the didactic +article document type any non-alphanumeric ASCII +character may be escaped (referenced for itself) with a named command, +e.g. ‘~’ may be referenced for itself as \tld;. This +is necessary in order to provide delayed evaluation for +ultimate translation to one of many possible ultimate formats.

+ +

The following language meanings apply to both basic and advanced +markup: +

+
    +
  1. \”: Command introducer.
    Escape in basic mode: \\ . This escape is + incorrect in advanced mode since this notation has a different + meaning — forced linebreak — in LaTeX itself. For the + didactic article + document type the escape is \bsl; . For other document + types one may resort to an entity reference + if adverse to providing a corresponding + defined-empty element or if one lacks control of the document type. +

    +
  2. +
  3. {”: Command argument opener.
    Escape: \{ or \lbr; . +

    +
  4. +
  5. }”: Command argument closer.
    Escape: \} or \rbr; . +

    +
  6. +
  7. [”: Command option opener.
    Escape: \lsb; (usually not necessary18). +

    +
  8. +
  9. ]”: Command option closer.
    Escape: \rsb; . +

    +
  10. +
  11. ;”: Command terminator for defined-empty tags.
    Escape: \scl; . + Usually an ordinary character. + Its use as a command terminator is invisible and may be + omitted optionally in some contexts. This syntax is analogous to + the use of ‘;’ as an entity reference terminator in SGML. +

    +
  12. +
  13. :”: Command terminator for close tags.
    Escape: \cln; . + Otherwise an ordinary character. + Its use as a command terminator is invisible. +

    +
  14. +
  15. %”: Comment introducer, in force to end of line.
    Escape: \% or \pct; . +

    +
  16. +
  17. #”: Argument marker in newcommand definitions.
    Escape: \# or \hsh; . + In the definition of a newcommand “#1” indicates the first + invocation argument, “#2” the second invocation argument, etc. + (There is no limit on the number of arguments.) +

    +
  18. +
+

+ +

The following language meanings apply to advanced markup with +allusion to the didactic article document type. +

+
    +
  1. ~”: Non-breaking interword space.
    Escape: \tld;.19
    Equivalent: \nbs;, cf. &nbsp; in HTML. +

    +
  2. +
  3. ^”: Superscript command.
    Escape: \crt; .
    Equivalent: \sup or, in math, \msup . +

    +
  4. +
  5. _”: Subscript command.
    Escape: \_ or \und; .
    Equivalent: \sub or, in math, \msub . +

    +
  6. +
  7. &”: Dual use: tabular cells and entity introducer.
    Escape: \& or \amp; .
    &’ introduces an entity reference if it is followed + by anything other than white space. It is used, as in LaTeX, as + a tabular cell delineator when it is followed by white space. +

    +
  8. +
  9. $”: Toggle inline math mode.
    Escape: \$ or \dol; .
    Equivalent: “\tmath{ . . . }”.
    Nearly equivalent: “\( . . . \)” +or “\math{ . . . }”.20 +

    +
  10. +
+

+

+
+ +
+
5.2.3.  Certain strings
+ +

These are strings of plain text with markup significance in the didactic document type that +are part of markup in LaTeX. +

+
    +
  1. --
    Short dash as used with a range + of numbers, e.g., 1–2.
    Equivalent: \rdash; . +

    +
  2. +
  3. ---
    Long dash as used for + punctuation, e.g., a dash — like this.
    Equivalent: \pdash; . +

    +
  4. +

  5. Blank interword space.
    Equivalent: \spc; . +

    +
  6. +
  7. \,
    Small horizontal space.
    Equivalent: \hsp; . +

    +
  8. +
  9. \\
    Forced line break.
    \\” may be used at the end of a line of + input for a forced line break. In a tabular environment + (with the didactic article document type, as in + LaTeX) it begins a new tabular row. Any other use is + deprecated, and will result in translation to the defined-empty + element bsl corresponding to the ASCII character + ‘\’ with a warning from the syntactic translator.
    Equivalents: \brk; for a + line break outside of a tabular environment.21 +

    +
  10. +
  11. Blank line.
    Begin new paragraph command.
    Equivalent: \parb . Nearly equivalent: \par . +

    +
  12. +
  13. ``
    Left (double) quotation mark.
    Equivalent: \ldq; . +

    +
  14. +
  15. ''
    Right (double) quotation mark.
    Equivalent: \rdq; . +

    +
  16. +
  17. \(
    Begin math mode command.
    Equivalent: \begin{math} . +

    +
  18. +
  19. \)
    End math mode command.
    Equivalent: \end{math} . +

    +
  20. +
  21. \[
    Begin displaymath mode command.
    Equivalent: \begin{displaymath} . +

    +
  22. +
  23. \]
    End displaymath mode command.
    Equivalent: \end{displaymath} . +

    +
  24. +
  25. .  ”, “?  ”, “!  
    End-of-sentence marks.
    Equivalent: \eos;, \eoq;, \eoe; .
    A period followed either by two blank spaces or by a newline + is recorded as an end of sentence. There is similar provision + for the question mark and the exclamation point. These tagged + forms may be used explicitly for the corresponding punctuation + inside math displays to distinguish punctuation from + mathematical use of the punctuation symbols. Explicit markup + for a comma is “\cma;”.22 + +

    +
  26. +
+

+

+
+
+ +
+

5.3.  Large Structure

+ +

Overall an article consists of a preamble followed by +a body. As noted previously (section 3.3) advanced mode +provides a special form of usage +

+
+\begin{document} . . . \end{document}
+

+with the paired metacommands begin and end that with an +article delimit its body. This is enabled with the +gellmu-trans call for the syntactic translator, and, consistent with regular +LaTeX usage the preamble is present without explicit tagging.

+ +

The only required markup in a preamble is a title, and it +is formally correct for its content to be empty. The SGML content +model for a body is somewhat loose, but is usually understood +to consist of sections and may contain ordinary paragraphs +(par, which must be marked up explicitly, or parb, +which is begun with a blank line). Although a body may be entirely +empty (likely not useful) or may consist only of par and +parb elements, all inline text must be within one of these +basic paragraph containers.

+ +

For example this formally correct textless document is handled without +noise by the didactic production system: +

+
+
+\documenttype{article}
+
+\title{}
+
+\begin{document}\end{document}
+
+

+while the following document with text outside of a paragraph fails +initial validation in the didactic production system: +

+
+
+\documenttype{article}
+
+\title{}
+
+\begin{document}
+
+x
+
+\end{document}
+
+

+The error may be corrected by placing a blank line before the +character ‘x’.

+ +

The content model for preamble is tighter than that for +body. This makes it possible to have a greater level of +error-checking than would otherwise be possible. For example, a +preamble must have exactly one title although it is not +specified where in the preamble a title might be. There may be at +most one of each of the elements surtitle, subtitle, and +date. Although newcommand, which is a metacommand, does +not affect the document type definition and may be used at different +locations in the preamble, the small number of actual elements that +may be multiply used in the preamble, such as mathsym (which is +partly a metacommand) must be located together. +

+
+ +
+

5.4.  Sectioning

+ +

In classical LaTeX one writes simply +

+
+\section{Some title for a section}
+

+to begin a new section. While this markup specifically delineates +the section title, LaTeX 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 number.

+ +

With SGML the classical approach is something along the following +lines: +

+
+
+<section><sectiontitle>Some title for a section</sectiontitle>
+
+<para> A paragraph.
+
+<para> Another paragraph.
+
+     . . .
+
+</section>
+
+

+Basic GELLMU markup corresponding to this would +be:23 +

+
+
+\begin{section}\sectiontitle{Some title for a section}
+
+\para A paragraph.
+
+\para Another paragraph.
+
+    . . .
+
+\end{section}
+
+

+If, moreover, the markup is to be well-formed XML markup, then each +para tag would need explicit closure with </para>.

+ +

The 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.24

+ +

The didactic SGML document type under advanced GELLMU seeks to +model classical LaTeX as closely as possible in order to provide a +bridge for authors from LaTeX to SGML (and, indeed, XML). For +this reason a command section similar to the classical LaTeX +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 +valid25 +under the didactic document type. +

+
+ +
+

5.5.  Labels, References, and Anchors

+ +

A label command may be placed anywhere that text may be placed +in order to mark a location and associate a symbolic “key” +with that location. A ref command may be placed anywhere that +text may be placed to generate a visible allusion called its +reference value, for example a section number, to the location +associated with a label key. An anch command may be placed +anywhere that text may be placed to provide a hypertext reference +either by key to an internal location or by uniform resource +identifier (URI) to an external resource.

+ +

At this point the discussion will become descriptive of of the entire +didactic production system rather than simply of its document type. +

+ +
+
5.5.1.  Labels and Sequencing
+ +

The basic usage for label is +

+
+\label[:series=" +series-name +" serseq=" +number +" refkey=" +ref-key +"]{ +key +}
+

+where use of the attributes is optional and, moreover, the required +key may be empty, i.e., the markup \label{} is permitted. +The key must be a case-sensitive string that is +monocase unique.26 +The didactic production system will provide a unique automatically generated string value +for key if none is provided by the author; this can be useful +if a series name is specified as an attribute for the label.

+ +

An author should never reference a label key not provided by the +author, but the empty element popkey is intended for processing +evaluation as the last label key, automatic or not, preceding +its location.

+ +

Sequencing27 +may be handled under the GELLMU didactic article +document type using labels and references. Toward this end one +makes use of three SGML attributes that are provided with the +label tag: +

+
+
+series
+
The 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 series.
+serseq
+
The 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 label.
+refkey
+
The name of a label key from which to spawn an automatically + generated value for the attribute serseq of the current label.
+

+ +

Every 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 backward.

+ +

The 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 document type and in the author-level XML document +type but not in the elaborated XML document type. +An evalref invocation will be successful only with a backward +reference. This is extremely useful for managing non-default +numbering of sectional units. For ordinary label references its use +is undesirable even though it is possible for backward references.

+ +

The reference value of a label is determined as follows: +

+
    +
  1. 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) +to a basic reference value with type attribute of series +set to one of ‘A’, ‘a’, ‘I’, or ‘i’. +

    +
  2. +
  3. 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 re-start the +sequencing of the sectional unit id's at the end of this document.) +

    +
  4. +
  5. 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 +reference value. (Markup — in particular, evalref — +cannot be used in defining an attribute value.) +

    +
  6. +
  7. 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.) +

    +
  8. +
  9. Else the reference value of the label is the sectional unit +identifier, i.e., its sunit value rather than the logical +value in its attribute sid, of the smallest sectional +unit containing the label. These values may not be numeric. For +example the string “A.3.2” might be a sectional unit +identifier. The series command should not be used to express +type conversion of a reference value that might resolve as a sectional +unit identifier. +

    +
  10. +
+

+

+
+ +
+
5.5.2.  Anchors
+ +

The basic usage for anch is +

+
+\anch[ +reference specs +]{ +anchored text +}
+

+where the option, 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 white space separated strings of the form +name="value"28 +with name restricted to 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 is preferably and more easily used with iref. + (The ‘#’ needs to be escaped, i.e., marked up as + “\#”.) In a non hypertext 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. This + might be the case if, 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 klabel29.
+
+

+ 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. +

+
+ +
+
5.5.3.  Example Emulating a LaTeX Counter
+ +

Suppose that one wants to fashion an inline enumerated list at some +point in a document. An enumerate environment is a list +structure that, while it may occur in a paragraph, is not inline. The +idea is to give each item a label and fashion the inline list item +number by referencing that label. One writes a newcommand to ease +this.

+ +

The name of a LaTeX counter is emulated with the name of the +series attribute for one or more labels. Unless one wishes to +be able to reference the items apart from the immediate reference, one +need not provide a label key. The didactic production system will provide a default labelkey +and the command “\popkey”, which grabs the key of the last preceding +label, may be used to furnish the key for the immediate reference. +If one wants small Roman numerals, one wraps the “\ref” command +in a “\series” command. Since series requires an actual +number, one must use evalref instead of ref, which is +permitted so long as the reference follows the label. +Here's the markup: +

+
+
+\label[:series="foo" serseq="0"]{} % zero the counter named foo
+
+\newcommand{\ti}{%
+
+\label[:series="foo"]{}(\series[:type="i"]{\evalref{\popkey}})}
+
+Hilbert's three most important contributions to algebraic geometry
+
+are \ti~the basis theorem, \ti~the nullstellensatz, and \ti~the syzygy
+
+theorem.
+
+

+The rendering is this: + + + +Hilbert's three most important contributions to algebraic geometry +are (i) the basis theorem, (ii) the nullstellensatz, and (iii) the syzygy +theorem.

+ +

With the current didactic production system if one had used “\ref” instead of +“evalref”, the translator from author-level XML to elaborated +XML, which resolves references, would have issued a warning in the +scroll, but the build would have run to otherwise successful completion +by ignoring the presence of the series command. +

+
+
+ +
+

5.6.  General Usage for Sectional Units

+ +

This describes the content model in the GELLMU didactic document type +for the “whole” sectional units Section, +Subsection, … as fully tagged. +

+ +
+
5.6.1.  The Content Model
+ +

The 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 required30 + section header or title. +
+
sopt
+
is an optional title for use in the table of + contents31. +
+
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.
+
+

+

+
+ +
+
5.6.2.  The LaTeX-Like Form of General Usage
+ +

Corresponding LaTeX-like argument/option syntax can be used, as previously +indicated, in GELLMU source with section, subsection, +… . If, however, argument/option 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 argument/option syntax one +precedes the bracket sequence for sprefix with an empty pair +“[]” of option brackets32 +for sopt. +

+
+
+ +
+

5.7.  verbatim, verblist, and +manmac

+ +

The ordinary notion of “verbatim” is complicated in the +context of a document type that is intended for processing toward +multiple output formats. There is no special provision for verbatim +markup under basic GELLMU33, +but there are two layers, one simplistic and one sophisticated, in the +didactic production system with each layer having provision for both inline and block-level +verbatim markup.

+ +

The simplistic approach involves the provision of an inline element +verb and a block-level element verbatim in the didactic document type. +With these the author is responsible for entering special characters +in ways that are safe for input source notation, safe for syntactic translator +output, and safe for each output format that is envisioned.34 +In the simplistic layer the formatting program in the didactic production system for HTML +output renders verb as an HTML kbd element and +verbatim as an HTML pre element. In formatting for +regular LaTeX output each of these SGML elements is rendered +as its LaTeX namesake. Neither the pre element in HTML +nor the (basic) verbatim command in LaTeX is context-sensitive, +and typically are formatted with left margin justification.

+ +

The sophisticated layer in the syntactic translator for verbatim is enabled by +setting the variable gellmu-verbatim-clean true. If this is +the case, then a user should input verbatim material literally between +\begin{verbatim} and \end{verbatim} markers occupying whole lines +and the syntactic translator will convert each of the 33 non-alphanumeric printable +ASCII characters therein to the corresponding empty element in +the didactic document type, and render each line of the converted material as a list +item bearing the item name nln in a list element +verblist.35

+ +

Similar arrangements pertain to the sophisticated inline analogue +of verb, which is enabled in the syntactic translator by setting the variable +gellmu-manmac-bar-name to a non-empty string value that is +to become the name of the element, such as quostr, to contain +the content, which should be delimited in source by successive +‘|’ characters. By default the user must enter a +verbatim string in “safe” form, but may enter it, +apart from any occurrence of the character ‘|’, literally +if the variable gellmu-manmac-literal is true. The term +“manmac” is derived from an old plain TeX package for +writing documentation by that name in which the character ‘|’ +is used to delimit inline literal material for verbatim presentation. +Moreover, consistent with usage observed in LaTeX documentation +markup of the form +

+
+\name|literal-text|
+

+is translated by the syntactic translator to an element named as with simple +“|...|” having a setting for its attribute +with name the value of the string variable +gellmu-manmac-attribute, which for quostr in the didactic document type +would appropriately be its attribute inv.

+ +

Variable settings to provide for the use of literal input both for +verbatim as a metacommand front for the list element +verblist and manmac configuration for the element +quostr, as described, are default when the syntactic translator is begun with +the non-default function gellmu-latex-faq. This function also +sets the variable gellmu-squophrase-name, which otherwise +defaults to the empty string, to the value “squophrase”. +This causes the syntactic translator to attempt to interpret balancing +character pairs consisting of the character ‘’ and the +character ‘’ as delimiters for the element +squophrase, an alternate form along with quophrase, +for “quoted phrase”, with odd instances of the character +‘’ set as the empty element apos, which represents +an apostrophe. +

+
+ +
+

5.8.  Accents

+ +

Traditional LaTeX markup employs accent commands for modifying +ASCII characters in order to produce non-ASCII +characters. On the other hand characters from 16 +“byte-planes” of Unicode are now available in HTML +and XML as ordinary characters, with treatment as the atoms of +ordinary strings of text not requiring any special attention or notice +from the viewpoint of markup. It may happen that this will affect +development in the LaTeX project, and it is, therefore, unclear what +the long term role might be of LaTeX's accent commands.

+ +

Nonetheless, the didactic document type provides element names corresponding to the +14 classical LaTeX accents although it does not provide classical +markup notations such as “\'”, +“\"”, “\~”, … inasmuch +as names are required in syntactic translator output.36 +The names for the accents may be seen by locating the word +“accent” in the didactic production system file gellmu.dtd and reading +the following 14 lines.

+ +

An author, particularly an author residing in an English language +locale, may introduce, for example, the character é in +several ways: +

+
    +
  1. by using an algorithmic accent command — in this case + \acute{e}: é.

    +
  2. +
  3. by direct Unicode-based entity reference Рin this case + &#xE9;: ̩.

    +
  4. +
  5. by simple direct entry of the Unicode point in a file + having the UTF-8 text encoding.

    +
  6. +
+

+Note that Unicode values are numbers represented in hexadecimal +notation (base 16); the digits are 0–9 and A–F. Thus, E9 is +233, and one could also use the entity reference &#233;.

+ +

While for the long term, the largely equivalent37 +second or third methods are superior, +there are caveats for their use in 2007: +

+
    +
  • One's LaTeX back end must have a suitably robust way + of handling Unicode, presumably via the inputenc + package or possibly via Omega/Lambda. +

    +
  • +
  • Even when fonts are available, some web browsers + seem only to handle Unicode via entity references.

    +
  • +
+

+ +

+
+ +
+

5.9.  Tabular Environment Emulation

+ +

At this point (2006-7) the didactic document type is able to accomodate emulation +of LaTeX's tabular environment with “l”, “c”, +“r”, and “p” column cell specifiers with, where +robust CSS support is available for HTML, “|” indicators +for vertical cell rules and “\hline” commands for horizontal +rules between rows. While multicol, and multirow are not +modeled, cells may contain other tabulars recursively.

+ +

A “p” column specifier optionally takes a decimal argument +that represents the fraction of available width to be made available +for the cells in that column. When is no fractional width specifier, +the default fractional width is 1n+1 where n is the +total of number of columns.

+ +

What may be viewed as a shortcoming of the tabular emulation +is that in each tabular row the first cell must contain +some markup in order for the document to be structurally correct. +This arises from a rule associated with SGML document types +that might be overcome if GELLMU source were processed by a +monolithic program. Instead, however, it is an +assemby of separate components (appendix 7.5.2) in which the first stage +has knowledge of syntax but not of the markup vocabulary.

+ +

One thing to keep in mind with tabular is that in the current, +though probably not future, design of HTML tables are not allowed +in paragraph content. The didactic production system works hard to deal with this. In most +web browsers there will be a line break before an HTML table and +again after an HTML table. (One way to finesse that is to place a +table in a cell in a sur-table, which is abuse of markup.) This +author generally places a tabular inside a display, +which is the GELLMU object corresponding to LaTeX's center.

+ +

The document type does not offer “floating” objects, and, therefore, +the name table is not used as as in LaTeX.

+ +

The name table is used for emulation in regular GELLMU +source of HTML tables. A table, like a tabular, +takes a required argument consisting of column specifiers. +In the didactic production system at the point where an article is spun to the elaborated +XML version of article, there is no longer a distinction +between tabular and table.

+ +

There is also array, which, as in LaTeX, is the in-math +version of tabular, except that in GELLMU its emulation of +LaTeX's array survives translation to the XML version of +article. An array has only “l”, “r”, +and “c” cells.

+ +

Example: The markup for the table of DTD's +in Appendix B.2.2 is this: +

+
+
+\begin{display}
+
+\begin{tabular}{l|cc}
+
+~                       & Latin-1              & \abbr{UTF-8}          \\
+
+\hline
+
+First stage \abbr{SGML} &  \quostr{gellmu.dtd} &  \quostr{ugellmu.dtd} \\
+
+Author Level \abbr{XML} &  ~                   & \quostr{axgellmu.dtd} \\
+
+Elaborated \abbr{XML}   & \quostr{xgellmu.dtd} & \quostr{uxgellmu.dtd}
+
+\end{tabular}
+
+\end{display}
+
+

+Because the one horizontal divider and the one vertical divider rely +on CSS support in HTML, these dividers might not be seen in a web +browser with weak CSS support. +

+
+ +
+

5.10.  Graphic Inclusions

+ +

There is basic support for graphics inclusions suitable for the HTML +backend and the LaTeX backend with both DVI and PDF outputs. +The arrangements are not unlike those required for the use of +the includegraphics command provided by LaTeX's +graphicx package. This means that, apart from the didactic production system's chain +of processors, one needs to provide several different versions of a +given graphic object in order to accommodate the needs of the three +different output formats (HTML, PDF, and DVI). A reliable graphics +format converter such as that provided by ImageMagick +(http://www.imagemagick.org/) +or the netpbm utilities +(http://netpbm.sourceforge.net/) +and a broad TeX support environment similar to that provided by +TUG's TeXLive +are essential for work with included graphics.

+ +

For example, if one begins with an encapsulated PostScript image +glmy.eps made, say, with Metapost, then one might run +the commands +

+
+
+   epstopdf glmy.eps
+
+   convert glmy.pdf glmy.png
+
+

+before making PDF with pdflatex and PNG (for inclusion +in HTML). In this case the PDF version of the graphic should be +regarded as best for use with pdflatex, and so one wants to +have the PNG version out of view from pdflatex when +building the GELLMU source glman.glm for this document. +With the new mmkg drivers one may prepare a tiny file +glman.prx that is a list of names of image files, one file +per line, that should be out of view at the point in the pipeline when +pdflatex is active. Thus, a line in the file +glman.prx should contain the name glmy.png.

+ +

In glman.glm one has the +code: +

+
+
+\begin{quotation}
+
+   Sometimes a picture is worth a thousand words.
+
+   \display[:frame="1.1"]{\includegraphics[:scale="0.2"]{glmy}}
+
+\end{quotation}
+
+

+which yields: +

+ +

Sometimes a picture is worth a thousand words. +

+
+Image file: glmy.png +
+

+
+

+ +

In this markup one sees, first of all, two uses of SGML +attributes — frame and scale. Attribute +options are opened with “[:” rather than simply with +“[”. Whereas options generally may contain markup, +attribute options may not.

+ +

The meaning in this example of scale is that the width +of the graphic in DVI and PDF outputs will be the result +of multiplying the scale by LaTeX's value of +\textwidth.38 +The HTML formatter will link to the PNG without a width +specification. Thus, the brower window width of the graphic will be +the actual width of the PNG image unless, perhaps, it's too large for +the browser's window. The meaning of frame is that for print +outputs the graphic image will be surrounded by a LaTeX +framebox with diameter that is 1.1 times the diameter of the +display's content. In the current HTML formatter no use is +made of the numeric value of frame although a default frame is +constructed via an HTML attribute giving values for the CSS +properties border and padding. When image framing is +desired, another approach is to incorporate framing in the graphic +itself. +

+
+
+ +
+

6.  Mathematics in article

+ +
+

6.1.  General

+ +

There was previous mention of the basic mathematical container element +tmath in the discussion of single string (section 5.2.2) markup +and the math and displaymath elements in the discussion +of certain strings (section 5.2.3) of special markup +significance.

+ +

The markup used inside these containers is very similar to that +which is used in LaTeX although far from all of LaTeX's math +markup, as extended by the amsmath package, has any +analogue in the didactic production system.

+ +

There are a few things that deserve short mention: +

+
+
\sum, \int, and \prod
+
are all similar to +their LaTeX namesakes except that each requires explicit closure. +For example, + +
+\[ \sum_{0}^{\infty} \frac{x^k}{k!} \sum: \]
+ +produces + +0xkk!. + +
+
\regch, \mbox, and \text
+
The didactic document type provides regch, +for “regular character” that is a one character version +of mbox provided for separating from general +mbox matter the content to which a non-math +algorithmic accent (section 5.8), may +be applied. For example, +
+
+\newcommand{\Q}{\regch{\bold{Q}}}  % intended for use in math
+
+\newcommand{\galQ}{\mbox{Gal}(\ovbar{\Q}/\Q)}  % only in math
+
+$\galQ$\aos;
+
+ +produces + + +GalQ¯Q. + +

Both regch and mbox should be used only for symbols. +Note that “Gal” in the foregoing is a symbol. The command +\text is provided for the use of text phrases – usually conjunctive +in nature – inside math zones. For example, the markup +

+
+
+\[ \absval{x} = \lbalbr{\begin{array}{rl}
+
+             x & \text{\ if\ } x \geq 0 \\
+
+            -x & \text{\ if\ } x < 0
+
+            \end{array}} \]
+
+

+produces + +x=x if x0x if x<0 + +In this example note that the command name lbalbr stands for +“left balanced brace”. It corresponds to +the use of \left\{  ...  \right. in LaTeX39. +

+
+
\aos;, \aoc; \aoq;, and \aoe;
+
are the +named forms of the LaTeX space adjustment commands “\@.”, +“\@,”, “\@?”, and “\@!”, which +provide correct placement of inline punctuation immediately following +inline mathematical markup. There is now also default provision in the +didactic production system for the more LaTeX-like “\@” usage. Note that the +use of \@ is seldom necessary. +
+
+

+

+
+ +
+

6.2.  Assertions: Near Emulation of + LaTeX's Theorem-Like Environments

+ +
+
6.2.1.  Examples
+ +

The container element \assertion is used in the didactic document type for the +creation of its analogue under SGML of theorem-like environments. As +a first example of the near emulation of a LaTeX theorem-like +environment, here is markup to give LaTeX-like meaning to +“\begin{theorem}” and “\end{theorem}”. +

+
+
+\newcommand{\begin{thm}}[1][]{%
+
+\begin{assertion}[#1][theorem]{Theorem}[\evalref{\popkey}]}
+
+\newcommand{\end{thm}}{\end{assertion}}
+
+

+ + + +For a first instance it is invoked without supplying the optional first +argument, which is for a label key. +

+
+
+Theorem 1. +  The continued fraction expansion of a real number is finite +if and only if the real number is a rational number.
+

+This is just text to follow the statement of a theorem.

+ +

If we do the same thing again, the theorem number should go up by +1 since in the didactic production system this usage is equivalent to using the default +counter associated with a label series name theorem.40 +

+
+
+Theorem 2. +  The continued fraction expansion of a rational number is +eventually periodic if and only if the real number is an irrational +number that is the root of some quadratic polynomial with rational +coefficients.
+

+

+
+ +
+
6.2.2.  Usage for assertion
+ +

The general usage of assertion is the following: +

+
+
\begin{assertion}[key][series +]{name}[id]
+
  .  .  .
+
\end{assertion}
+
+

+The options key and series represent the same things as +the corresponding label (section 5.5.1) options. The id +option is for explicit customization of the visible identifier, e.g., +theorem number, as illustrated with one of the examples later in this +section. One may use the id option, which must follow +the name argument, without using either of the other options. But in +order to use the series option, a key option, which may +simply be empty, must be present.

+ +

There is also a fully named way to proceed: +

+
+
\begin{assertion}
+
\asstkey{. . .}\asstser{. . .}\asstname{. . .}\asstid{. . .}
+
  .  .  .
+
\end{assertion}
+
+

+Here order is important, but any of the options may simply be omitted. +For example, we may write +

+
+
+\newcommand{\begin{Thm}}[1]{%
+
+\begin{assertion}\asstser{#1}\asstname{Theorem}%
+
+\asstid{\sref;.\evalref{\popkey}}%
+
+}
+
+\newcommand{\end{Thm}}{\end{assertion}}
+
+\begin{Thm}{XXseries}
+
+If $[ n_1, n_2, \ldots ]$ is an infinite continued fraction, then
+
+its sequence of convergents always has a limit.
+
+\end{Thm}
+
+

+to obtain: + + + + + +

+
+
+Theorem 6.2.2.1. +  If n1,n2, is an infinite continued fraction, then +its sequence of convergents always has a limit.
+

+Notice that the asstid argument is merging the reference value +for (the new) series XXseries with the visible id of the +current sectional unit. +

+
+
+ +
+

6.3.  Equations and Equation Arrays

+ +

The general usage for equation is the following: +

+
+
\begin{equation}[key][series]
+
  .  .  . 
+
\end{equation}
+
+

+The options key and series represent the same things as +the corresponding label (section 5.5.1) options. In order to use +the series option, a key option, which may simply be +empty, must be present. The use of “equation*” as a name for an +equation display that is not numbered is +not permitted, but one may instead use the nonum attribute +as follows: +

+
+\begin{equation}[:nonum="true"] . . . \end{equation} .
+

+ +

General usage for an equation array (name eqnarray) is: +

+
+
\begin{eqnarray}[key][series]
+
  .  .  . 
+
\end{eqnarray}
+
+

+where the content is an eqnabody consisting of eqnrow's, +each row may be terminated in LaTeX-like markup, as in LaTeX, with the +string “\\” and consists of three parts, corresponding to elements +eqnleft, eqncenter, and eqnright, that may +be separated in LaTeX-like markup with the character ‘&’.

+ +

Support for numbering in eqnarrays is only minimally developed +although there is suggestive sketching in the didactic document type that is not +supported in the formatters. By default the equations in equation +arrays are numbered consecutively throughout an article. This +behavior can be altered by using the series attribute of an +eqnarray. If that is done, then, as things have been sketched, +numbering applies to whole arrays rather than to the equations within +arrays. Numbering in an equation array may be suppressed by setting +its attribute nonum to the string “true”. +

+
+ +
+

6.4.  The \mathsym Metacommand

+ +

mathsym is a macro substitution metacommand that is +available in the didactic production system for enabling an author to declare that a macro +name represents a mathematical symbol. It is a formal way of +recording statements commonly made by authors in introducing notation.

+ +

Unlike regular metacommands, which may appear at any point in +GELLMU source, mathsym may only appear in the preamble +of an article, or, equivalently with defaults in the +syntactic translator, mathsym may only appear before the LaTeX-like +“\begin{document}”.

+ +

Its usage is: +

+
+\mathsym{ +symbol-name +}{ +symbol-rendering +}[symbol-meta-info +] .
+

+ +

Here symbol-name is an alphanumeric string (case-sensitive) +beginning with a letter. The second argument is the presentation +rendering of the symbol in GELLMU markup. It is like the definition +of a newcommand except that it may not involve +arguments.41 +The optional third argument symbol-meta-info is an +alpha-numeric string that might also include possibly a few other +string characters such as ‘/’, ‘-’, ‘,’, +‘.’, ‘*’, etc. Its exact structure depends on the +typing system. (No typing system is part of the didactic production system.) For example, +it might consist of (name, value) pairs for conveying meta-information +about the symbol.

+ +

The syntactic translator replaces each invocation of a given +mathsym with the specified rendering and writes for each +mathsym definition a corresponding element in the SGML output +whose content consists solely of the declared symbol name if there is +no meta information but otherwise consists of the symbol name followed +by a blank space and then whatever string of meta information is +provided in the optional argument. Additionally, each invocation is +wrapped in a rendering-inert Sym element whose key +attribute reveals the name given to the symbol at the point of +declaration (and by which the symbol is invoked). This makes it +possible for a downstream authoring platform processor that has +remembered the list of declared symbol names to match each invocation +of a declared symbol with its associated meta information, if any, +provided by the author in the symbol declaration.

+ +

A related feature in the didactic GELLMU document type is the +mlg tag for marking mathematical logical groups. This is +somewhat akin to the lgg tag for TeX-like logical groups, +traditionally created in TeX markup with braces that are not +attached to a command.42 +As with lgg there is no obvious evidence of an mlg tag +in a typeset rendering, but the presence of such a tag is intended as +a signal to downstream mathematical parsers that the contents of the +tag be given grouping priority as, say, with visible parentheses. +Furthermore, the mtype and mml attributes of the +mlg tag may be used to pass semantic information about the +tag's contents to a processor. +

+
+
+ +
+

7.  The Didactic Production System

+ +

The didactic production system is the suite of processors and technical support files +underlying what is called regular GELLMU. +

+ +
+

7.1.  Permission

+ +

The items of the didactic production system are copyrighted free software released +under the GNU General Public License. +

+
+ +
+

7.2.  Materials

+ +

The release contains everything originating with the author that is +currently used in “building” GELLMU documents.

+ +

It also contains a slightly modified version +of David Megginson's Perl module “SGMLS.pm” based on +another slightly modified version that was furnished to me by Dave +Holden in a very quick early 1999 response to my posted request for a +modification that handles the labels provided (optionally) by +nsgmls for SGML elements that are defined empty. A similar +slight modification was also supplied a few days later by Vassilii +Kachaturov and had been available at his web site.

+ +

Although the materials offered in this package aside from the syntactic translator +pertain only to the didactic document type and the didactic production system, it should be understood that +the larger design for GELLMU envisions other parties, on the one +hand, building in various ways to extend the functionality of the +didactic system, and, on the other hand, applying the methods of the +didactic system to other document types and other formatting programs +for those document types.

+ +

The basic items originating with the author, aside from the document +type definition files (section B.2.2) are: +

+
+
gellmu.el
+
the GELLMU syntactic translator, which makes SGML
+
xplaingart.pl
+
converts SGML to + author-level XML
+
xmlgart.pl
+
converts author-level XML + to elaborated XML
+
ltxgart.pl
+
translates elaborated XML + to LaTeX
+
htmlgart.pl
+
translates elaborated XML + to classical HTML and translates specially prepared XML to XHTML+MathML
+
mathcdata.pl
+
first of two special + preparations for translation toward XHTML+MathML
+
mathprep.pl
+
second of two special + preparations for translation toward XHTML+MathML
+
mval.pl
+
check for certain types of MathML errors
+
+

+ +

Since some users will only be interested in the syntactic translator, additional +description of these materials is found below in +“Using the didactic production system” (section 7.5) and in the +Release Notes (appendix B). +

+
+ +
+

7.3.  Other Required Software

+ +

To make use of the GELLMU syntactic translator a user must have or separately acquire +Emacs.43 +(“Windows” users should look at the special +FAQ.) Emacs is +commonly found on GNU/Linux systems and on *ix systems. It may be +found on other systems when provided by system managers.44

+ +

To make use of the didactic production system beyond the syntactic translator a user must have or acquire +the following items of free cross-platform software + +

+
    +
  • an ESIS +generating SGML parser such as found in the cross-platform package +SP by James Clark, +which has stood the test of years, or the newer variant +OpenSP, which +is internationalized, from the OpenJade Team. +

    +
  • +
  • Perl at CPAN. +

    +
  • +
  • a complete TeX system, for which one may look to + The TeX Users Group (TUG) or + The Comprehensive TeX Archive Network + (CTAN). +

    +
  • +
  • xmlwf — a basic utility that is part of the release of + James Clark's expat. +

    +
  • +
+

+

+
+ +
+

7.4.  Using the syntactic translator

+ +

This explains how to use the syntactic translator, which is the Emacs Lisp program +contained in the file gellmu.el. +

+ +
+
7.4.1.  Operation in Batch Mode
+ +

For linux and the other *ix a script like bin/linux/g2s will be +adequate if your working directory is the distribution directory45. +

+
+Usage: g2s  stem-name +  [ function-call ]
+

+For example, if “foo.glm” is the name of the source file, then +the first argument should be “foo”. The optional second +argument function-call is the name of the function in the Emacs +Lisp package “gellmu.el” that is to be used. The function +call defaults to “gellmu-trans”, which is the correct name for +LaTeX-like usage under the didactic document type (section 5).

+ +

There are also parallel scripts “g2h” and “g2x”.

+ +

g2s” will byte compile “gellmu.el” if +“gellmu.elc” is not present.

+ +

g2h” runs the function gellmu-html for the case +where the GELLMU file has been written directly for HTML. +The file ghtml.glm and the derived file ghtml.html +are examples.

+ +

g2x” runs the function gellmu-xml for the case +where the GELLMU file has been written directly for XML.

+ +

The directory “bin/win32” contains parallel, though more +complicated, batch files for use in a “DOS” command line +under “Windows”. +

+
+ +
+
7.4.2.  Interactive Operation
+ +

Open GNU Emacs interactively on the GELLMU source file. When +finished editing the source, save it but keep Emacs open. Then do +

+
+M-x load-file gellmu.el
+

+and +

+
+M-x gellmu-trans .
+

+ +

(It is better to have byte-compiled “gellmu.el” and if the +byte-compiled version “gellmu.elc” is in your Emacs +load-path, then +

+
+M-x load-library gellmu
+

+is faster.)

+ +

The SGML output should come up in a second buffer. Save that buffer +to save the output.

+ +

Make any corrections or changes in the GELLMU source buffer and re-run +

+
+M-x gellmu-trans .
+

+ +

As with batch operation the functions gellmu-html and +gellmu-xml, may be handled parallel to gellmu-trans.

+ +

There are a number of other functions besides these three for +obtaining syntactic translation from GELLMU source to SGML. Each of +these is, in fact, a front for calling gellmu-trans with +various combinations of variable settings. There are a great many +user configurable variables in the syntactic translator. Notable +among these for regular GELLMU (section 4.1) are (1) +gellmu-parb-nogo and (2) gellmu-autoclose-list. +See the variable documentation text, available interactively when the +GELLMU library is loaded in Emacs with the key combination +qquostrC-h C-h v, for more information. For a list of the names of +all user configurable variables see the variable documentation for +gellmu-public-vars.

+ +

For example, setting gellmu-verblist true causes a sequence of lines +beginning with the line “\begin{verbatim}” and ending +with the line “\end{verbatim}” to be considered +verbatim as in LaTeX, i.e., without requiring escaped forms +of special characters, and then to be set as a simple verblist, +which is in most circumstances superior to GELLMU's version of +pre-historic verbatim.46 +

+
+ +
+
7.4.3.  Interrupting the Syntactic +Translator
+ +

Interruption of the GELLMU syntactic translator will be necessary in the event that the +combined use of newcommand, macro, Macro, +and mathsym (advanced mode only) leads to infinite recursive +loops. Users should avoid the use of macro and Macro +unless such use is absolutely necessary since these metacommands +present greater looping risks.

+ +

Inasmuch as there are two ways to invoke the syntactic translator, there are two +different procedures for interrupting it should that be necessary. +

+
+
+Batch mode invocation
+
This is the case when GNU Emacs is launched +in batch processing mode to run the syntactic translator. To interrupt the syntactic translator in this +case one must interrupt the Emacs process. The author does not +know of any case when Emacs does not respond to standard interrupts. +For example, on linux systems pressing “Control-C” +when the process was launched from a shell provides a standard interrupt. +If the processed was launched in some other way, a normal “kill” +addressed to the process should have the same effect. +
+Interactive invocation
+
This is the case when the syntactic translator is launched +from within the GNU Emacs editing interface. Use the standard Emacs +function “quit”, accessed with the key “C-g” (Control-G) +to interrupt the syntactic translator. +
+

+

+
+
+ +
+

7.5.  Using the didactic production system

+ +
+
7.5.1.  Staged Design
+ +

The items in the didactic production system are components for use with staged processing. +The document type may be used with any SGML system. Of course, one +may not use a parser that is limited to XML with the SGML version of +the document type. Moreover, if one makes use of features in the +SGML version such as the positional argument and option elements, +then one might want to provide translation to the XML version of the +document type.

+ +

No particular processing system is required for the XML version of +the document type. For example, one might profitably write an +XSLT sheet for translation to some +other format and then submit the document and the XSLT sheet +to an XSLT engine such as xt, xsltproc, or +saxon. +

+
+ +
+
7.5.2.  Default Staging
+ +

The release includes bin/linux/lmkg and +bin/linux/mmkg as example driver scripts for running the +following sequence. (The bin/win32 directory contains +old driver scripts for the MS Windows command line that might someday +be worth updating.) The behavior of these driver scripts depends +on the way they are called though the specific of this are somewhat +different for lmkg than for mmkg. The older +lmkg scripts do not generate XHTML+MathML at this point they are +provided primarily for backward compatibility.

+ +

The mmkg scripts by default make XHTML+MathML but not if called by +a name, e.g., via a symbolic link, without the substring “mm”. +If an mmkg script is called with a name ending in the string +“froms” or “fromx”, then it will take as starting +point, respectively, an SGML, i.e., “.sgml”, or author-level +XML, i.e., “.xml”, version of the document. Thus, for +example, mmkgfromx might be used to operate on a document +that is an author-level XML translation from a non-GELLMU source.

+ +

Caution. These scripts, like all shell scripts, should be +examined for file system locations, system environmental variables, +and other platform-specific and location-specific issues. The user +who introduces a script on a platform should understand the script. +A user who does not understand a script should not attempt to +introduce it on a local platform.

+ +

Flow in the didactic production system is portrayed in the following diagram: +

+
+Image file: gcompst.png +
+

+ +

These are the stages in the didactic production system pipeline: + +

+
    +
  1. Prepare GELLMU source using a text editor. +

    +
  2. +
  3. Process the source with the syntactic translator to obtain an SGML document under + the didactic document type. +

    +
  4. +
  5. Use nsgmls to validate the SGML document and obtain an + ESIS for it as output. +

    +
  6. +
  7. Submit the SGML ESIS as input47 + to the Perl + program sgmlspl with the script xplaingart.pl + as file argument, obtaining an author-level XML document. +

    +
  8. +
  9. Use nsgmls to validate the author-level XML document + and then submit its ESIS as input to to sgmlspl + with the script xmlgart.pl, obtaining an elaborated + XML document. This document, which is accompanied by several + auxiliary files48, + has things such as sectional unit numbers and cross references + fully resolved so that there will be consistency in these across + the various output formats. +

    +
  10. +
  11. Use nsgmls to validate the elaborated XML document and + submit its ESIS as input multiply to sgmlspl: +

    +
      +
    1. with the script htmlgart.pl to obtain a + classical HTML document that then will be validated if an + HTML validation program is identified in the driver script. + +

      +
    2. +
    3. with the script ltxgart.pl + as file argument, obtaining a LaTeX document. The LaTeX + document is then built with latex to make a DVI + file and with pdflatex to make a PDF file. + +

      +
    4. +
    5. for a pipeline using successive runs of sgmlspl with + 3 scripts, mathcdata.pl, mathprep.pl, + and htmlgart.pl (called in a special way) to make + a XHTML+MathML file that is then checked for XML well-formedness + using xmlwf, checked for certain kinds of MathML + errors using sgmlspl with mval.pl, and + validated if a suitable validation program is + identified in the driver script. +

      +
    6. +
    + +
  12. +
+

+

+
+ +
+
7.5.3.  Parsing with nsgmls
+ +

The program nsgmls is part of the +SP package, which includes +extensive documentation. Those familiar with it will want to ignore +these hints.

+ +

Since for both the SGML and the XML versions of the didactic document type SP +requires non-default SGML declarations, it is recommended that the user +employ SGML catalogs, one for SGML and another for XML. +The file system location of a catalog is conveyed to nsgmls +as the value of its command line argument immediately following the +argument “-c”.

+ +

Each catalog should contain an SGMLDECL directive that is the +file system location of an SGML declaration. Aside from that a catalog +may contain a number of three string lines of either of the following +forms +

+
+
PUBLIC  formal-public-identifier  quoted-pathname
+
SYSTEM  quoted-system-identifier  quoted pathname
+
+

+where the quoted pathname, which may be relative to the location of the +catalog, should for this context in each case be that of a +DTD file.

+ +

It is recommended in each case that nsgmls be run with +arguments “-l” (for propagating line number references) and +“-oempty” (for flagging defined-empty elements). For +processing the XML version of the didactic document type one should additionally use +the argument “-wxml”.

+ +

Additionally, a user may wish to make locally-specific arrangements +for the handling of character sets. +

+
+ +
+
7.5.4.  Processing with sgmlspl
+ +

The program sgmlspl is part of David Megginson's +SGMLSPM package. Megginson's extensive documentation for it +may be found in the (December 1995) release found at +CPAN.49

+ +

One uses sgmlspl by calling the Perl program sgmlspl +with an ESIS as input and a script as argument. Additional +arguments become arguments for the script.

+ +

Although some operating systems provide a way for dealing with a Perl +program, which is stored in a text file, as an executable object, in +other cases one must explicitly call the Perl engine as a program with +an ESIS as input, the system name of sgmlspl as first +argument, and (the system name of) a script as second argument. In +both cases one will want to arrange, perhaps with an environmental +variable or perhaps with the “-I” argument to the Perl engine, +for the directory containing “SGMLS.pm” and its supporting +module “SGMLS/Output.pm” to be in its path array +@INC. +

+
+ +
+
7.5.5.  Environmental Variables
+ +

There are a number of environmental variables that affect processing +in the didactic production system. The names all begin with the string “GELLMU_”. +Of course, the names are case-sensitive.

+ +

Many of these variables are set in the distributed driver scripts. +When that is the case, the distributed driver scripts commonly check +for a previous setting (which may, therefore, be easily placed in a +fronting script that makes a setting and then just calls the +distributed driver).

+ +

Setting environmentals can be difficult in a non-Unix-like +operating system environment. This is one reason why the author +generally recommends that Windows users install GELLMU under +Cygwin. + +

+
+
GELLMU_Dir
+
The top of the directory tree where GELLMU is installed. +
+
GELLMU_StyleDir
+
URI or directory location of CSS and XSLT style + sheets that is used by the didactic production system in writing links in XML, + HTML and XHTML+MathML files. + The value usually has a different meaning under the eye of a + web server than in a local file system. A relative URI or + path is usually best. A value like “../webstyle” + can often be made to work both ways. +
+
GELLMU_CSSName
+
Name, relative if given relative syntax, to the value of + GELLMU_StyleDir, of the CSS stylesheet written by the + didactic production system in HTML and XHTML+MathML files. +
+
GELLMU_XhtmlSuffix
+
Suffix given to XHTML or XHTML+MathML files written + by htmlgart.pl. +
+
GELLMU_NoUMSS
+
Value 0 or 1: if 1, signals to htmlgart.pl + that it should not link to W3C's + UMSS XSLT + stylesheets. +
+
GELLMU_UTF8
+
Value 0 or 1: signals to sgmlspl scripts that + Perl's handling of the UTF-8 text encoding should be invoked. + The meaning is subtly different between Perl versions 5.6 + and 5.8. +
+
GELLMU_Encoding
+
String value for text encoding that is set by the + xplaingart.pl in writing author-level XML and by + xmlgart.pl in writing elaborated XML. (HTML, + XHTML, and XHTML+MathML are always written with the UTF-8 + encoding.) +
+
GELLMU_LaTeXUTF8
+
Value 0 or 1: signals to latex and + pdflatex to expect the UTF-8 encoded text in + their input. +
+
GELLMU_LaTeXStyle
+
Pathname for LaTeX stylesheets that latex + and pdflatex should use when such stylesheets are + not properly positioned for TeX system KPSE-based + location. (It's better to use a local or personal + TDS tree.) +
+
GELLMU_PAPER
+
String value for the paper used in printing; becomes an + option for the documentclass command in the output + LaTeX file. +
+
GELLMU_Memoir
+
Value 0 or 1: if 1, use the memoir, rather + than article, documentclass in the output LaTeX file. +
+
GELLMU_DefaultEmptyEqncenter
+
Experimental. String value + consisting of a small bit of LaTeX wrapped as a Perl + string to use in tweeking the LaTeX-rendered appearance of + a GELLMU eqnarray (which is rendered in LaTeX using + either align or aligned, depending on + numbering arrangments) in the case of an empty middle cell + (eqncenter). The current default value used in + ltxgart.pl is the string “ \qquad ”. Be + mindful of how such a string can be entered as a literal + string in Perl or as part of an on-the-fly environmental + setting from a command line shell. +
+
GELLMU_XLink
+
Value 0 or 1. How to handle links in MathML output + when writing XHTML+MathML. Such links, which are currently + illegal inside XHTML+MathML math zones, are confined to + \text{...} areas in GELLMU. If the value is 1, use + XLink; otherwise, switch into the HTML namespace and + write an HTML anchor. (Firefox handles both, + while more of the other browsers seem to choke on the + namespace switch than choke on the necessarily cumbersome + use of XLink.) +
+
GELLMU_OriginLabel
+
Name for an automatic label key, chiefly of occasional + value for HTML and XHTML+MathML outputs, that, when this + variable is present in the environment, places a link target, + with id the value of this variable, at the top of the document. +
+
+

+

+
+
+
+ +
+

Appendix A.  The GELLMU Archive

+ +

The GELLMU Archive is the web site +http://www.albany.edu/~hammond/gellmu/.

+ +

It is the source for late breaking information about GELLMU. +Among other things, it houses a largely uncommented +archive of examples. This is provided +in the belief that the study of examples is one of the quickest +ways to learn a markup language.

+ +

Of course, this document, which is furnished with the release, +is also an example.

+ +

Another item, also an example, that is housed in the archive +is The GELLMU FAQ. +

+
+ +
+

Appendix B.  Release Notes

+ +

This version of the manual was prepared for release 0.8.5 in +July 2007. The GELLMU materials (section 7.2) consist of: + +

+
    +
  1. The manual, which is this document. +

    +
  2. +
  3. The GELLMU syntactic translator, a Emacs Lisp program, which is the only +item of software required for those who simply wish to use GELLMU +markup for the conscious preparation of HTML documents or documents +under some other classical SGML or XML document type for which the +user is otherwise equipped. +

    +
  4. +
  5. The GELLMU didactic production system, which consists of +an SGML document type called article, an XML document type +also called article, and three separate collections of Perl +functions for the well-known Perl SGML processing framework +sgmlspl by David Megginson. +A very slightly modified version of Megginson's Perl library +SGMLSpm that provides a method for detecting defined-empty +SGML elements, as flagged in an SGML parse stream in ESIS +format, is included as part of the didactic production system. +Since it is by size 60% of the software content of the +Megginson package on CPAN, the rest of the +package, licensed under the GNU +General Public License +is distributed with the didactic production system as well, though without its +documentation. The distribution includes 7 scripts for use with +sgmlspl in the didactic production system pipeline. For more +on this see “Using the didactic production system” (section 7.5). +

    +
  6. +
+

+

+ +
+

B.1.  Comments on the Syntactic Translator

+ +

The GELLMU syntactic translator is more mature than the other components. The following +comments pertain to it. + +

+
+
internationalization
+
+ +

Internationalization has a considerable and evolving +level of support in Emacs. The concept is that an author resides in +a locale. When the author enters a character from a locale, it gives +rise in Emacs to a somewhat complicated multibyte entity that can have +“properties”. Particularly relevant variables in Emacs +are: coding-system-for-write and +buffer-file-coding-system. GELLMU provides the user +variable gellmu-sgml-default-coding, which should be properly +coordinated via driver script settings with one's SGML parser. +

+
+
inclusions
+
+ +

It is not actually a limitation that a GELLMU source file cannot +be included in another. The primary reason is that one should +make use of the inclusion mechanism of SGML. For that one needs +to define the included pieces as entities in the direct internal +subset 50 +of the source file and then reference each as an entity, e.g., +“&sect2;” at the appropriate location in the source +file where it is to be included. Because the inclusion happens +at the SGML level there are two points to observe: +

+
    +
  1. Macro information is local to each source file.

    +
  2. +
  3. The situation is optimal for the location of validation + errors provided that one's parser reports such errors by + filename and line number since the syntactic translator + provides line number alignment between source and generated + SGML.

    +
  4. +
+

+ +

A second reason is that source inclusion would disturb +line number alignment between source and SGML output. This +is important for the interpretation of SGML validation error +messages. Such validation is considered routine, and plays an +important role in detecting an author's mistakes. Some author errors +are diagnosed in the syntactic translator.

+ +

A third reason, which at the same time might be considered also +a disadvantage, is that all of GELLMU's macro facilities are +local to each source file. This adds both robustness and flexibility +at the price of the inconvenience of physical inclusion of common +macro definitions. +

+
+
variable management
+
+ +

This refers to the management of user variables in the syntactic +translator. These are Elisp variables. One who is familiar with +Elisp should be able to provide values in batch mode without +making changes in the Elisp source.51 +Setting values interactively in the Emacs editing interface can be +done easily using “M-x set-variable”.

+ +

With a future release it is likely that additionally a user resource +file for custom variable settings without the need for writing Elisp +code will be provided. +

+
+
Bugs
+
+ +

No serious existing problem is known in the GELLMU syntactic translator at the time of this +release. Of course, as stated in source code comments, there is no +warranty of any kind. Please report bugs to the author: +hammond@math.albany.edu. + +

+
    +
  • Reserved element names. +The GELLMU syntactic translator reserves for its own internal use all SGML or XML element +names in which the first numeric character in the range +“0–9” is the character “0”. +

    +
  • +
  • Limitation on braces in macros. +Unbalanced braces are not permitted in either the name or the value +field of any form of macro metacommand. +

    +
  • +
  • First cell limitation. +In the LaTeX-like emulation of an array or tabular +environment the first cell in each row must have something other than +whitespace. Of course, sometimes no content is wanted, and then +\empty (for nil markup, not to be confused with the mathematical +\emptyset) is one way to handle it, but this author usually uses +something that is mostly inconsequential like “~” or +“\,”. Another way to handle it is to invoke the names +of the SGML elements, i.e., \firstcell{} for tabular or +\firstacell{} for array. +

    +
  • +
  • Concept of advanced GELLMU immature. +Inasmuch as didactic article is the only document type for +which the idea of advanced GELLMU has been implemented, the general +concept of advanced GELLMU is not fully developed in the GELLMU syntactic translator. +Basic GELLMU is characterized in the GELLMU syntactic translator by the evaluation of +the Boolean variable gellmu-straight-sgml to “true”. +This automatically make the Boolean variable +gellmu-regular-sgml true. +Full LaTeX-like support for the didactic production system is realized only by both +of these Booleans being false. Thus, advanced GELLMU will +need to evolve in the space in between, probably after the +introduction of further such Boolean variables, some public and +some private. This technique will make it possible for the +code to continue performing as now when the variable +gellmu-straight-sgml, the flag for basic GELLMU, is true +and also when both of these flags are false. +

    +
  • +
  • Reserved strings. +The strings “<<” and “>>” have been reserved +as future notation for mathematical objects. Although it might seem +at first glance that this type of short hand has no place apart from +the fully LaTeX-like environment of the GELLMU syntactic translator in the context of the didactic production system, in +which they have not yet been used, it is actually not so clear that +one could not make sensible use of such notation in the context of +“XHTML plus MathML” under advanced GELLMU along with +other features such as blank lines for new paragraphs and many other +mathematical shortcuts. It awaits the further development of advanced +GELLMU, and reserving this notation is necessary to ensure backward +compatibility. +

    +

    Consequently, for example, entering “<<a>>” is +problematical, because only the first “<” or “>” +will be converted to something appropriate. In basic mode +“&lt;” and “&gt;” are one-step ways of +circumventing this when these entities are available, which is +guaranteed for any form of HTML as well as for any form of XML. In +the didactic production system one should use “\ltc;” and +“\gtc;”. For other cases the one-step circumvention is +to use entity references to the numeric character codes, e.g., in +ASCII “&#3C;” and “&#3E;”, and for +convenience these may be brought up as macros, perhaps +“\lt” and “\gt”. +

    +
  • +
+

+

+
+
+

+

+
+ +
+

B.2.  Comments on the Didactic Production System

+ +

The didactic production system is to be understood as a potential base for development. +As such it is not intended ever to offer everything that might +be imagined. The following comments pertain to it. +

+ +
+
B.2.1.  Internationalization
+ +

Internationalization has been a concern of the project. It is +possible, for example, to use the ISO-Latin-1 +character ‘é’ in the name of an element. The +didactic article document type offers, for example, an element +étale, which is a style, parallel to bold. +Use of the character ‘é’ as a raw word character +data with the didactic production system is less robust than the more careful +“\acute{e}52 +construction, which is desirable for translation of article +to formats that do not support latin1. For that matter, the +exact extent of LaTeX's support of latin1 is a bit tricky, and +the whole matter of internationalization is currently under +review in the LaTeX project.53 +

+
+ +
+
B.2.2.  Document Type Definitions
+ +

Currently the project has one SGML document type definition +and two XML document type definitions. Files under the +various document types are suffixed as follows: +

+
+ +
First stage SGML.sgml
Author Level XML.xml
Elaborated XML.exml
+
+

+ +

Additionally, in the three steps of processing to generate an +XHTML+MathML file from an elaborated XML file there are two intermediate +XML files generated, the first with suffix “.yml”, which +lives under the document type definition for an elaborated XML +document, and the second with suffix “.zml”, an XML file +for which there is no extant formal document type +definition.54

+ +

The author-level XML document type is formalized by the +DTD "axgellmu.dtd", while the elaborated XML document +type is formalized by a modification that is found in the DTD +"uxgellmu.dtd". (The latter was the only XML document type +used with the regular GELLMU production stream prior to +October, 2006.)

+ +

The document type represented by "uxgellmu.dtd" is now called the +elaborated XML document type.

+ +

The author-level XML document type is suitable as a translation +target from other markups. The elaborated XML document type +should not be used as a translation target other than from the +GELLMU author-level XML document type.

+ +

All document type definitions are available under the UTF-8 +text encoding. The two older document type definitions will continue +to exist for a while under the Latin-1 (ISO-8859-1) text +encoding. The text encoding of a so-called DTD file (not +quite the same thing as a document type definition) is significant +in regard to the names of SGML/XML entities and +elements rather than in regard to document instances which might +be processed. The names of the DTD files are: + +

+
+ +
 Latin-1UTF-8
First stage SGMLgellmu.dtdugellmu.dtd
Author Level XML axgellmu.dtd
Elaborated XMLxgellmu.dtduxgellmu.dtd
+
+

+

+
+ +
+
B.2.3.  Translation to XML
+ +

Presently the author-level XML files link to a CSS stylesheet that +provides primitive rendering. One could go further in this direction, +but the rendering of mathematics will be limited without more development +in that direction of CSS. +

+
+ +
+
B.2.4.  Translation to HTML
+
+
+Math in classic HTML
+
The classic HTML output does not use graphic images for mathematical +zones in the manner of programs like latex2html. Instead it +uses pseudo-TeX notation for math. +There are a +number of reasons: +
    +
  1. Well typeset mathematics is available in the modern form of + HTML that is more precisely called XHTML+MathML.

    +
  2. +
  3. Graphical images completely block accessibility in the + sense of the World Wide Web Consortium's + Web Accesibility Initiative.

    +
  4. +
  5. The present classical HTML output files may be deciphered + in terminal window browsers.

    +
  6. +
  7. The present classical HTML output files may be “dumped” to + plain text using a program such as lynx or w3m + for various sometimes useful purposes.

    +
  8. +
+ +
+Style.
+
HTML and XHTML+MathML made with the didactic production system now rely on CSS, even, for +some things, level 2 CSS. +
+
+ +
+
B.2.5.  Translation to LaTeX
+ +

This translator writes LaTeX2E. A number of packages, including +graphicx, amsmath, amssymb, amsfonts, +bm, url (not hyperref for the standard track +where the focus is on printed output), and inputenc for UTF-8 +(which may be needed even if the GELLMU source or, otherwise, the +author-level XML source is not UTF-8 encoded). +Apart from current font availability issues, the author would have +preferred to invoke the T1 font encoding.

+ +

Even though GELLMU source uses the names equation and +eqnarray, in the LaTeX formatting amsmath constructions +are used.

+ +

A small modification of this translator can be used to write +Adobe's Portable Document Format (PDF) with pages sized for screens +rather than for paper. +

+
+ +
+
B.2.6.  Future Plans
+ +

This is a very limited list. +

+
+
A literate document type definition.
+
+ +

Capable of spawning not only the 5 DTD's but type definitions +under other mechanisms such as, for example, RelaxNG. +

+
+
Mathematical Semantics
+
+ +

Provision for optional semantic tightening sufficient for authors +wishing to be able to export mathematical markup into computer algebra +systems. +

+
+
+

+

+
+
+
+
+

Footnotes

+
    +
  1. * The syntactic translator does, however, have some facilities for + classifying the names in a list in regard to common syntactic + behavior. See, in particular, the Elisp variables + gellmu-autoclose-list and gellmu-parb-hold, both + of which are not significant in basic GELLMU.
  2. +
  3. * With several minor exceptions, one related to the direct writing of +SGML attributes (which cannot contain markup and which do not have +many parallels in LaTeX) and another related to the way of escaping +the character ‘\’, everything about basic mode also +applies to advanced mode.
  4. +
  5. * There is a way, with the setting of several +variables for the syntactic translator in advanced mode, to have blank lines begin +new paragraphs in basic input for HTML
  6. +
  7. * This means that it is a relatively slow form of processing, but +the author believes that it is a good match for the intuitive +expectations of most LaTeX users.
  8. +
  9. * In a future release an alternative metacommand +called frontcommand may be provided which could be used, for +example, if one wishes to have a macro name of some kind match the +name of an actual SGML element.
  10. +
  11. * In the prototype production system based on +the didactic article document type the output from each +stage is available for examination and, where necessary, intervention. +However, such use of intervention is intended only for temporary +expedient use while a GELLMU system is being designed or enhanced. +As with LaTeX, enhancement is an ongoing process.
  12. +
  13. * In handling GELLMU source markup one could provide +a more elaborate processor that can be configured to know for each +such command the list of names for its positional arguments and +options. It was decided that this goes somewhat beyond syntactic +handling but that the question of whether a list of arguments and options +corresponds to sole content might be regarded as a syntactic matter.
  14. +
  15. * Its use is optionally permitted in basic mode as well.
  16. +
  17. * Indeed, LaTeX usage allows markup in options, but (element level) +markup is not permitted in SGML attributes. Note, however, that +in the didactic document type the SGML content model for an option is more restrictive +than that for an argument. Also in the didactic document type some options, such as +that for anch, which is described later in this section, are +practically required.
  18. +
  19. * To say seldom is not to say not. Two important +instances in the didactic production system are the series attribute for the +label command, which stands in, to the extent possible, for the +notion of counter in LaTeX, and the type attribute for +the series command, which provides emulation of counter +conversion from, say, number values to letter values.
  20. +
  21. * In the XML version of article the option becomes the element +anchref and the anchored text becomes the element anchv. +One may use these names directly in GELLMU source, but option/argument +notation is more familiar and more succinct.
  22. +
  23. * There was no list +of this type in early pre-release versions of the syntactic translator.
  24. +
  25. * The LaTeX concept of document class has only a loose correspondence +with the SGML concept of document type.
  26. +
  27. * It is not inconceivable that at some future point conscious writing +for some XML document types using LaTeX-like markup might be +subsumed in the LaTeX project, but in saying this, the author is +neither predicting it nor assessing the merits of the idea. He has no +affiliation with the LaTeX project other than as a user.
  28. +
  29. * Strict discussion of an SGML document type would not allow use of the +word handled. In this instance a coordinated pair of document +types is being described, one SGML and the other an XML translation. +For most purposes the SGML document type is the richer of the two. +However, because of its use of a handful of generic elements (in its +reserved namespace consisting of names that contain ‘0’ (zero) +as first numeric character) for modeling certain convenience features +of LaTeX, it is possible for a correct translation of a valid SGML +article to yield an XML version that fails validation because the +content models of the generic elements are necessarily loose.
  30. +
  31. * The variable +gellmu-xml-strict is by default unset in advanced mode.
  32. +
  33. * The correct LaTeX markup is “\LaTeX{} document”. In the didactic production system the +name of LaTeX is “latex”, which is a defined-empty +element, that for the SGML version of article may be marked up +safely either as “\latex;” or as “\latex{}”.
  34. +
  35. * In math ‘[’ sometimes needs to be escaped to prevent confusion +between its markup use and its ordinary use in an instance such as +the markup for Z[t]. The syntactic translator would need to know +vocabulary — at least the argument/option pattern for +mathbb — in order to elude the syntactic ambiguity.
  36. +
  37. *\~” is an example of a markup string that is defined in LaTeX (for +an accent) that is not defined in the didactic document type. A LaTeX user may recover +a prior markup habit of this type using newcommand possibly in +combination with macro. For more information see the +discussion of accents (section 5.8).
  38. +
  39. * It is possible to merge the inline math and tmath zones +at any level of processing beyond the syntactic translator. These are indeed the same +in LaTeX, but the syntactic translator resists the temptation here to +go beyond syntax and merge them. With the didactic article +document type the formatting to LaTeX inserts the LaTeX markup +“\,” for a small horizontal space before and after +math, but not before and after tmath.
  40. +
  41. * The syntactic translator simply outputs the SGML defined-empty element +brk0, which belongs to its reserved name space. The dual use of +brk0 involves some SGML chicanery that is resolved during translation +to the XML version of the article document type, +where tabular is converted to table and non-tabular use of +brk0 is converted to brk. See also the handling of +array, which is different even though the source markup, as in +LaTeX is similar.
  42. +
  43. * Alternate forms “\aos;”, “\aoq;”, “\aoe;” of sentence ending +punctuation are provided that may be used following inline mathematical +markup at the end of a sentence. Similarly, “\aoc;” is an alternate +form for a comma.
  44. +
  45. * Or one +could use: +
    +
    +\Section{\sectiontitle{Some...}
    +
    +\para A para...  . . .}
    +
    + +instead of using the environment-like +begin/end construction.
  46. +
  47. * In fact, classical SGML document types are often +even more elaborate than this.
  48. +
  49. * Caveats: +
    +
    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” values.
    +
    While 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.
    +
    +
  50. +
  51. * It is recommended that the characters in label key strings be +restricted to lower case ASCII letters, the digits 0–9, and +possibly the character ‘-’ or the character ‘.’ for +maximal inter-operability with current and future formattings. +For example, the ‘_’ is problematical in this context.
  52. +
  53. * Although one could provide SGML modeling for LaTeX's +counters, it would not be very much along the lines of main track +SGML or XML document types.
  54. +
  55. * 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.
  56. +
  57. * A klabel is a +“visible key” label.
  58. +
  59. * It may be left empty, but it must be present. +
  60. +
  61. * 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”.
  62. +
  63. * The didactic production system offers a way to furnish a formally empty string, which is an +empty element called empty in the document type for use in +places such as the the table of contents option of a sectional unit, +where it is not otherwise possible to distinguish after parsing whether +deliberately empty content was specified by the author. +That is, the markup “\sopt{}” furnishes an empty +string which, in turn, signals “no sopt”, while +“\sopt{\empty;}” indicates that empty content +was specified for sopt.
  64. +
  65. * When editing for HTML one may, of course use HTML's pre, +which stands for “pre-formatted text”
  66. +
  67. * With a sufficiently long list of output format candidates each of the +33 non-alphanumeric printable ASCII characters is unsafe. +However, one might use an external character-to-string conversion +program to prepare a large amount of verbatim material for inclusion +inside the simplistic verbatim command in GELLMU source.
  68. +
  69. * To export this procedure for general advanced mode usage, all +of the names used need to be made user-configurable.
  70. +
  71. * Familiar short forms +may be introduced by a user using the macro facility.
  72. +
  73. * For the +third method one's GELLMU driver script must provide appropriately +for the text encoding of the source file.
  74. +
  75. * This meaning of scale differs +from the meaning of scale with includegraphics under +LaTeX's graphicx package. New controls of this type +may be introduced in a future version.
  76. +
  77. * Note that the use of lbalbr in this instance is insufficiently +semantic for translation to content MathML while it is meaningful +for translation to presentation MathML. Adequate enhancement might +be had by providing mml="cases" (using a name from amsmath) +as an attribute for lbalbr with this example.
  78. +
  79. * There is also a default counter that is used when no label series name +is present. That counter simply is the position of the underlying +assertion in the list of all assertions.
  80. +
  81. * However, a declared math symbol may be invoked in +a newcommand that takes arguments.
  82. +
  83. * Such unattached braces in GELLMU markup lead to an lg0 tag in +the output of the syntactic translator that is translated to an +lgg tag in the XML version of the didactic document type.
  84. +
  85. * Version 20 or later should be adequate. Although the author began +this project using version 19, he is no longer able to run tests +with that version.
  86. +
  87. * It is an embarrassment of the business world in the years since 1985 +that many business computing installations do not provide general +purpose cross-platform programming systems despite the widespread +availability of excellent free robust systems such as Emacs (for +Lisp), gcc (for C), and Perl. This new phenomenon +apparently arises not so much from lack of organizational interest but +from the fact that the responsibility for maintenance cannot be passed +beyond the local system manager to a vendor.
  88. +
  89. * None of the enclosed scripts either for linux or for win32 should be used +without prior examination and verification for suitability.
  90. +
  91. * The main reasons that this version is not the default with a call to +gellmu-trans are: +
      +
    1. It breaks the paradigm under which a GELLMU command name is the +name of an SGML element.

      +
    2. +
    3. It breaks backward compatibility with earlier versions of the +syntactic translator, i.e., breaks older documents.

      +
    4. +
    5. It is felt that the user invoking verblist this way +should be aware of what is being done.

      +
    6. +
    + +Note that direct invocation of verblist requires escaping +special characters. Thus, using the function call +gellmu-verblist converts the name verbatim from a +command name to a meta-command name.
  92. +
  93. * Specifically, this mention of “input” refers to + what is called “standard input” in a command line + situation. There may be a challenge here on platforms that do + not provide a command line.
  94. +
  95. * Formally, two of these auxiliary files are considered part of the + elaborated XML document.
  96. +
  97. * At the time of this release +there was discussion in the UseNet newsgroup +news:comp.text.sgml about a proposed revision of +SGMLSPM by another party. The code for “SGMLS.pm” +included in this GELLMU release contains a very small modification +of Megginson's 1995 release.
  98. +
  99. * The direct internal subset is the content of the optional argument of +the documenttype metacommand that follows its required argument. +It should be noted in the didactic production system that the direct internal +subset cannot be propagated to the XML form of article +because it is digested by any standard SGML parser and, hence, +by any translation based on a standard parsing. Thus, +any pieces are merged in the XML form of an article although +the translator xmlgart might be modified to +construct an internal declaration subset there and provide +partitioning of the XML version among filesystem pieces based +on document structure.
  100. +
  101. * Please observe the rules of the LaTeX project regarding filenames +as well as the license rules of the GNU General Public License +if you wish to distribute a modified version of the Elisp +source. Alternatively, the author is always interested in learning +of suggestions for change.
  102. +
  103. * The corresponding usage in LaTeX would be “\'e”; +this could be brought into GELLMU source using \macro, +but it must be resolved to a name in the output of the GELLMU syntactic translator where +everything that is markup needs a name. Rather than using a +general container acute, the document type could have provided +a name for the specific character.
  104. +
  105. * Alternatively LaTeX source can be submitted to the program +lambda which is the LaTeX format for the program +omega that is now under development as a substitute for +Knuth's TeX, the program, with internationalization as a stated +goal.
  106. +
  107. * There is no formal document type definition +for a “.zml” file because such a file is endowed via XML +attributes with information about tree structure for +mathematical zones.
  108. +
+ + + diff --git a/support/gellmu/doc/glmy.png b/support/gellmu/doc/glmy.png new file mode 100644 index 0000000000..6570e50fc6 Binary files /dev/null and b/support/gellmu/doc/glmy.png differ diff --git a/support/gellmu/doc/userdoc.html b/support/gellmu/doc/userdoc.html new file mode 100644 index 0000000000..19a58da4ad --- /dev/null +++ b/support/gellmu/doc/userdoc.html @@ -0,0 +1,1216 @@ + + + + + + + + + +GELLMU: Introductory User's Guide + + +

Introductory User's Guide to Regular GELLMU

+

Version 0.8.4 release, July 2007

+

William F. Hammond

+

+Dept. of Mathematics & Statistics
University at Albany
Albany, New York 12222 (USA)

+

revision of July 6, 2007

+
+

Table of Contents

+
+
1  Introduction... * +
+2  First Steps... * +
+2.1  Acquiring and Installing... * +
+2.2  Writing an Article... * +
+3  Basic Markup Within Sentences... * +
+4  Sectioning... * +
+5  Lists... * +
+6  Tabular Environment Emulation... * +
+7  Labels, Cross References, and Anchors... * +
+8  Mathematics... * +
+9  Beyond this Introductory Guide... * +
+
+ +
+

1.  Introduction

+ +

Regular GELLMU is the part of the GELLMU Project under which +source language markup most closely resembles actual LaTeX source +markup. Much of the markup vocabulary is the same as that of +actual LaTeX. The differences — and, indeed, the whole reason +for the GELLMU Project — arises from the author's conclusion in +1998 that it would not be possible in a robust way to write rules +for actual LaTeX source markup so that the collection of documents +in the article document class prepared under such rules would +admit fully reliable automatic translation to other formats1.

+ +

The version 0.8 release of the GELLMU Project was the first +release providing an output stream for the XML form of HTML extended +by the World Wide Web Consortium's +Mathematical Markup Language (MathML). +The driver script mmkg provides translations of regular GELLMU +articles to (1) actual LaTeX (and from there to DVI and +PDF), (2) classic HTML, and (3) XHTML+MathML, while the driver +script mkg omits XHTML+MathML. Though the +PDF output may be read on a screen, it is intended primarily +for printing by end consumers.

+ +

While one could provide a landscape version of the PDF output with +live anchors for screen consumption, the XHTML+MathML version +would still be superior for screen reading since, as with ordinary +HTML, the text is re-formatted to conform naturally both to +magnification and window-resizing actions by the end user. The +quality of the rendering of mathematics in the XHTML+MathML +version is very nearly as good as that in the PDF version.

+ +

Indeed the author, as an author, finds that the best venue for proof +reading what he writes is XHTML+MathML when displayed in a suitable web +browser2 +with larger than normal font size and narrower than normal +line length.

+ +

Moreover, the XHTML+MathML version is fully compliant with the +Accessibility Guidelines of the +World Wide Web Consortium.

+ +

This document is an introductory user guide. The relation of regular +GELLMU to the GELLMU Project overall is explained in the Manual, and +advanced user information on regular GELLMU is found there as well. +This document covers fundamentals not mentioned in the manual. It is +available in PDF, XHTML+MathML, +and classical HTML versions. Online copies of +this Introductory Guide and of the Manual may be found at +CTAN and the GELLMU web site.

+ +

To use this document as an example for learning refer to its +source markup and to use the project manual +as an example refer to the +manual's source markup. +

+
+ +
+

2.  First Steps

+ +
+

2.1.  Acquiring and Installing

+ +

GELLMU is implemented as cross-platform free software licensed under +the GNU General Public +License. Its package is available from the +Comprehensive TeX Archive Network (CTAN) +and from the GELLMU web site.

+ +

The package requires a number of other cross-platform free software +packages including GNU Emacs, Perl, and some standard items of +SGML/XML software, chiefly Open SP. Locations may be +found in the Manual (key “requiredsoftware”).

+ +

Linux: The required packages are generally part of a full +GNU/Linux distribution. The package should be installed in +/usr/local/gellmu and symlinks to driver scripts should be +made from a suitable place in one's command path.

+ +

MacOS-X and other Unix variants: The only difference from +GNU/Linux is that some of the supporting packages may need +to be acquired and installed.

+ +

MS Windows: The best strategy is to acquire and install a +full Cygwin distribution. +Then proceed as with Linux.

+ +

Additional information may be found in the Manual. +

+
+ +
+

2.2.  Writing an Article

+ +

The minimal form of a regular GELLMU article is this:

+ +

+
+
+\documenttype{article}
+
+\title{Some title}
+
+
+\begin{document}
+
+
+First Paragraph.
+
+
+Second Paragraph.
+
+
+. . .
+
+
+\end{document}
+
+

+ +

An article must begin with \documenttype{article}. The initial +part of an article up to the required \begin{document} is the +article's preamble, and the rest of the article is the +article's body.

+ +

Almost everything in the body of an article must be part of +a paragraph. Most typically a paragraph is begun with a blank line. +Paragraphs themselves may be parts of sectional units.

+ +

Beware special characters. For example ‘%’ converts the rest +of its line to comment status. To use ‘%’ in text write +“\%”. The special characters are with small exceptions +the same as those in LaTeX. Note, however, that in dealing with +multiple downstream formats any character that is not alpha-numeric +becomes potentially special. Therefore, there is a named form for +every non-alphanumeric ASCII character. For example, +“\tld;” is the name of ASCII ‘~’, +which is sometimes handy when forming a URL.3

+ +

The names of special characters may be found by browsing the SGML +document type definition in the file gellmu.dtd at the top of +the distribution tree.4 +

+
+
+ +
+

3.  Basic Markup Within Sentences

+ +

Although there is no markup for a sentence as a unit, there is markup +for the end of a sentence or a “full stop”. The normal way to +indicate the end of a sentence is to use an ASCII period +‘.’ followed by either a newline or two or more blank spaces. +An end of sentence is marked up as the SGML empty element eos. +This is automatically generated under the condition indicated above. +For most purposes it will not matter if an ASCII period is followed +by only a single blank space, but in that case no eos will be +generated.

+ +

The foregoing paragraph provides several instances of markup within +sentences other than eos. There are (1) a quoted phrase, +(2) two abbreviations, (3) a quoted character, and (4) two instances +of emphasized text. The source for that paragraph is:

+ +

+
+
+Although there is no markup for a sentence as a unit, there is markup
+
+for the end of a sentence or a ``full stop''.  The normal way to
+
+indicate the end of a sentence is to use an \abbr{ASCII} period
+
+\quochar{.}  followed by either a newline or two or more blank spaces.
+
+An end of sentence is marked up as the \sgml empty element \emph{eos}.
+
+This is automatically generated under the condition indicated above.
+
+For most purposes it will not matter if an \ascii period is followed
+
+by only a single blank space, but in that case no \emph{eos} will be
+
+generated.
+
+

+ +

The ``full stop'' is a marked up quoted phrase. The named form of a +quoted phrase is quophrase. The markup \quophrase{full stop} +is the equivalent expanded form. An abbreviation is indicated with the +command abbr. There is, of course, no requirement that an +abbreviation be marked up; it is merely good practice.

+ +

The name of markup for emphasized text is emph. A common +alternate form of emphasis is called bold. One way the two +differ is that emph has order two effect, i.e., emph +within emph removes emphasis while bold is not permitted +within itself. Note that bold may be emphasized.

+ +

In the cited marked up text above the instances \sgml and \ascii +are user-defined newcommands occurring in the preamble (or at least +before the invocations): +

+
+
+\newcommand{\ascii}{\abbr{ASCII}}
+
+\newcommand{\sgml}{\abbr{SGML}}
+
+

+The command newcommand is a meta-command in GELLMU source. +All newcommand instances are fully expanded by the syntactic +translator before it writes any output.

+ +

The markup \quochar{x} produces a quoted character: in this case +‘x’. There is no compelling reason why quophrase could +not have been used instead of quochar, but it is customary in +technical documentation to use a different presentation style for +quoted characters than for quoted phrases. Beyond that for +non-traditional forms of processing it can be very useful to provide +for semantic distinctions such as the distinction between a quoted +phrase in normal discourse and a quoted string in technical discourse. +More particularly, it is significant that in some languages for +computer programming there is an important distinction between a +character and a string of unit length. Some of the markup commands +useful with technical documentation are +

+
+ +
commandexample in sourceexample rendered
quocharuse \quochar{\%} to commentuse ‘%’ to comment
quostr\quostr{unsigned long num;}unsigned long num;
qquostrtype \qquostr{done} to exittype “done” to exit
path\path{C:\bsl;TEX\bsl;TEXMF}C:\TEX\TEXMF
urlanchsee \urlanch{userdoc.glm}  see userdoc.glm
+
+

+With regular LaTeX standard practice is to use texttt for the +examples just cited involving quochar, quostr, +path, and, apart from web-related considerations, +urlanch. The name url has been used variously in +regular LaTeX; therefore, url has not been introduced as a +name in regular GELLMU so that an author may safely use it, if +desired, as a macro name. +

+
+ +
+

4.  Sectioning

+ +

Unless one wants fancy non-default behavior, one may provide +sections, subsections, and subsubsections as in LaTeX. Thus, +for example,

+ +

+
+
+\documenttype{article}
+
+\title{Some title}
+
+
+\begin{document}
+
+
+\section{Title of first section}
+
+First Paragraph.
+
+
+Second Paragraph.
+
+
+. . .
+
+
+\section{Title of second section}
+
+First Paragraph.
+
+
+Second Paragraph.
+
+
+. . .
+
+
+\end{document}
+
+

+ +

With this style of markup one does not indicate the end of a section +although there is a way described in the Manual (key “secusage”) to gain finer +control over sectional units. +

+
+ +
+

5.  Lists

+ +

As with LaTeX GELLMU article provides lists with the +names description, enumerate, and itemize. +For example, the markup +

+
+
+\begin{enumerate}
+
+\item bird
+
+\item cat
+
+\item dog
+
+\end{enumerate}
+
+

+yields: +

+
+
    +
  1. bird

    +
  2. +
  3. cat

    +
  4. +
  5. dog

    +
  6. +
+
+
+

+while the markup +

+
+
+\begin{description}
+
+\item[Parrot] a type of bird
+
+\item[Persian] a type of house cat
+
+\item[Pointer] a type of dog
+
+\end{description}
+
+

+yields: +

+
+
+
+Parrot
+
a type of bird
+Persian
+
a type of house cat
+Pointer
+
a type of dog
+
+
+

+ +

A list is normally part of a paragraph, but a list may occur outside +of a paragraph in a sectional unit or even at the top level of +an article's body.

+ +

An item in a list may contain paragraphs but, as the foregoing +examples show, may contain loose text.

+ +

While LaTeX provides an excellent construction facility for customized +lists through its list environment, which may be used in +conjunction with its newenvironment command, there is no facility +for the provision of on-the-fly markup in SGML. Therefore, the +article document type provides several other kinds of list.

+ +

The lists called menu and Menu consist of +items. These lists have no item labels. They differ only +in intention for spacing in presentation formats.

+ +

It often makes sense for menu to be used inside an item +of another list. Moreover, a single item menu will render in +either the LaTeX or HTML formattings as “hanging indentation”.

+ +

A defnlist is intended to be more like the list called dl +in HTML than like description. It must consist of one or +more term, desc pairs with term mandatory and +desc optional.

+ +

There are also other lists that will not be mentioned here except to +point out that when the name verbatim is enabled as a +metacommand, rather than as a command, by calling the syntactic +translator with a non-default function5 +such as verblist or latex-faq, the verbatim material +is organized as a verblist.

+ +

For more information about lists browse the document type definitions +gellmu.dtd and xml/xgellmu.dtd being mindful that +default processing in the didactic production system sometimes does +a small amount of list manipulation between the SGML and XML versions +of an article. +

+
+ +
+

6.  Tabular Environment Emulation

+ +

Most users having a LaTeX background will find that tabular +with column arguments limited to ‘l’, ‘r’, +‘c’, and ‘p’ is reasonably functional. +Improvement made during 2006 were made possible by the increased +availability to users of web browsers supporting version 2 of the +cascading style sheets (CSS) specification.

+ +

For example, the following markup underlies a small +lcc table in the section on mathematics. +

+
+
+\display{\begin{tabular}{lcc}
+
+\bold{Name} & \bold{Opener}       & \bold{Closer}   \\
+
+math        & \quostr{\bsl;(}     & \quostr{\bsl;)} \\
+
+tmath       & \quostr{\$}         & \quostr{\$}     \\
+
+displaymath & \quostr{\bsl\lsb;}  & \quostr{\bsl\rsb;}
+
+\end{tabular}}
+
+

+(In this markup bsl is a name for the backslash character +and lsb, rsb the names of the square brackets.)

+ +

There is presently no concept of “float”.

+ +

More information is available in the Manual (key “tabular”). +

+
+ +
+

7.  Labels, Cross References, and Anchors

+ +

The basic idea is very simple. Use +

+
+\label{mylabelkey}
+

+to mark a location that is associated with the named +label key, and use +

+
+\ref{mylabelkey}
+

+or one of several other methods to reference that location. +The command ref may be regarded as the default method. +In an online version, however, it has not been designed to +create a selectable anchor but rather simply to indicate section +number.

+ +

For example, in this document there is a label with the key +“math” at the beginning of the section (8) on +mathematics. The previous sentence contains a reference with +the markup \ref{math} to that section. This markup results +in the number of that section appearing in the first sentence. +For clarity the markup for the entire first sentence of this +paragraph is: +

+
+
+For example, in this document there is a label with the key
+
+\qquostr{math} at the beginning of the section (\ref{math}) on
+
+mathematics.
+
+

+ +

If, on the other hand, one wants an online version to contain +a selectable anchor to section 8 to the +section on math, then +in the preamble of the document one might place the newcommand +definition +

+
+\newcommand{\iref}[2]{\anch[iref="#1"]{#2}}
+

+and then, as in the foregoing portion of this sentence use +the markup +

+
+\iref{math}{selectable anchor to section \ref{math}} .
+

+Note that this markup uses the label key “math” twice: +once as the first argument to the newcommand called iref +and once as the sole argument of the command ref that +itself appears in the second argument of iref.

+ +

On the question of whether to use ref or one of several +other commands to make a reference, there are several considerations: +

+
    +
  1. How should the reference be indicated in an online format + that will be viewed in an ebook or a web browser?

    +
  2. +
  3. How should the reference be indicated in a typeset format + where there is neither a cursor nor the possibility of automatic + scrolling?

    +
  4. +
+

+More details on this subject may be found in the +Manual (key “labelref”). +

+
+ +
+

8.  Mathematics

+ +

GELLMU article provides 5 containers for mathematical +content: math, tmath, displaymath, equation, +eqnarray. All may be referenced by name. However, +LaTeX-like markup is supported: + +

+
+ +
NameOpenerCloser
math\(\)
tmath$$
displaymath\[\]
+
+

+ +

The containers math and tmath are essentially +equivalent non-displayed containers. The current LaTeX formatter +provides a tiny amount of extra horizontal space around math +but not around tmath.

+ +

Just as with ordinary LaTeX there can be difficulty locating +a missing ‘$’ if one uses these for tmath. Unbalanced +‘$’ characters usually lead the syntactic translator to +complain (correctly, though not with as much user-friendliness as one +might wish) about not being able to balance a brace. In this case +if tmath is seen in the displayed surrounding text, a missing +‘$’ is likely.

+ +

MathML rendering support (with MathML's presentation markup) in HTML +versions, i.e., the modern XML form of HTML extended with MathML, is +new in the summer of 2004.

+ +

A program to generate an output stream providing content-level MathML +markup, i.e., semantic markup transparent for computer algebra +systems, has not yet been written.

+ +

Those who use mathematics may find the following illustrations +instructive.

+ +

The markup +

+
+
+Just as with \tex; or \latex; it is easy to provide a mathematical
+
+formula, such as $y = x^3/(x^2 + 1)$\aoc either inline or displayed.
+
+

+produces: +

+
+
Just as with TeX or LaTeX it is easy to provide a mathematical +formula, such as y = x^{3}/(x^{2} + 1), either inline or displayed.
+
+

+ +

This markup +

+
+
+Here the same formula is displayed.
+
+\[ y = \frac{x^3}{x^2 + 1} \eos\]
+
+

+yields: +

+
+
Here the same formula is displayed. +
+ y  =  {x^{3}}/{x^{2} + 1}   . +
+
+

+The eos corresponds to an empty SGML element for “end of +sentence” (or “full stop”). Normally one simply uses ‘.’, +but inside a displayed math zone there is semantic-level risk of +confusion with various possible uses of ‘.’ as a mathematical +symbol.

+ +

Markup: +

+
+
+The square root of a compound fraction:
+
+\[ \sqrt{\frac{\frac{a}{b}}{\frac{c}{d}}} \eos \]
+
+

+Rendered: +

+
+
The square root of a compound fraction: +
+ SQRT{{{a}/{b}}/{{c}/{d}}}   .  +
+
+

+ +

In the current XHTML+MathML formatting by default radical signs in +source markup are converted by default to fractional exponents because +of an intellectual property issue with fonts available for use by the +open source Mozilla browser and its spinoffs including +Firefox, Galeon, and Nautilus.6

+ +

Using the markup for numbered equations +

+
+
+The quadratic equation
+
+\begin{equation} a x^2 + b x + c = 0 \end{equation}
+
+has roots
+
+\begin{equation}
+
+ x = \frac{-b \pm \sqrt{b^2 - 4 a c}}{2 a} \ \eos
+
+\end{equation}
+
+

+one obtains the rendering: +

+
+
The quadratic equation +
+(1)   a x^{2} + b x + c  =  0  +
+ +has roots +
+(2)   x  =  {-b ± SQRT{b^{2} - 4 a c}}/{2 a}    . +
+
+
+

+ +

Rule for subscripts and superscripts: A subscript or +superscript must be braced if keyboarding it involves more than +one character. Thus, one may use $C^2$ or $C^{2}$ +to produce C^{2}, but one must use $C^{\infty}$ to +generate C^{INFTY}.

+ +

The Taylor series of the exponential function is +

+
+ e^{t}  =  SUM_{k  =  0}^{INFTY}[  {t^{k}}/{k!} ]    .  +
+

+Note here that the sum markup \sum requires a formal +terminator \sum: (likewise with \int for integral and \prod +for product). +

+
+
+\[ e^t = \sum_{k = 0}^{\infty} \, \frac{t^k}{k!} \sum: \ \eos \]
+
+

+ +

The markup +

+
+
+The continued fraction expansion of the \emph{golden mean}:
+
+\[\frac{1 + \sqrt{5}}{2} =
+
+     1 + \frac{1}{1+\frac{1}{1+\frac{1}{1+\frac{1}{1+\ldots;}}}} \eos \]
+
+

+produces: +

+
+
The continued fraction expansion of the golden mean: +
+{1 + SQRT{5}}/{2}  =   1 + {1}/{1+{1}/{1+{1}/{1+{1}/{1+…}}}}   .  +
+
+

+while the markup +

+
+
+Mixed function application and multiplication:
+
+\[ {\func{sin}\aF;{ax}}\itimes;{\func{cos}\aF;{bx}} \eos \]
+
+

+yields +

+
+
Mixed function application and multiplication: +
+ {sin{ax}}{cos{bx}}   .  +
+
+

+ +

Markup: +

+
+
+Newton's binomial series:
+
+\[ (1 + t)^r = \sum_{k=0}^{\infty} \,
+
+  \frac{r(r - 1)(r - 2)\ldots(r - k + 1)}{k!}\, t^k \sum: \eos \]
+
+

+rendering: +

+
+
Newton's binomial series: +
+ (1 + t)^{r}  =  SUM_{k = 0}^{INFTY}[   {r(r - 1)(r - 2)…(r - k + 1)}/{k!}  t^{k} ]   .  +
+
+

+ +

Markup: +

+
+
+A differential equation:
+
+\[ D^2 y - 3 x (D y)^2 = x \func{cos} x \ \eos \]
+
+

+rendering: +

+
+
A differential equation: +
+ D^{2} y - 3 x (D y)^{2}  =  x cos x    .  +
+
+

+ +

The statement of Stokes's Theorem in space +

+
+ INT[INT_{S}[  (curl    F  ·  N)  dsigma]]   =  INT_{partial S}[  (F  ·  T)  ds ]    .  +
+

+may be generated by the markup +

+
+
+\[ \int\int_S \, (\mbox{\bold{curl}}
+
+ \, \regch{\bold{F}} \,\cdot\, \regch{\bold{N}})\, d\sigma;
+
+\int:\int:
+
+ = 
+
+\int_{\partial S} \, (\regch{\bold{F}}
+
+\,\cdot\, \regch{\bold{T}})\, ds \int:\, \eos \]
+
+

+Note that each \int integral opener must be followed eventually +by a \int: closer (or braces could be used, i.e., \int{ ... }, +or \begin{int}\end{int} also could be used.

+ +

The branched definition of the absolute value of a real number may +be marked up with +

+
+
+\[ \absval{x} = \lbalbr{\begin{array}{rl}
+
+                x & \text{\ if\ } x \geq 0 \\
+
+               -x & \text{\ if\ } x < 0
+
+               \end{array}} \ \eos \]
+
+

+to yield +

+
+  |x|   =  
{ + + + + +
 if  x  >=  0
-x if  x < 0
+
    .  +
+

+ +

The LaTeX-like command mathbf is new in GELLMU +article. It may only be used in math. The command +bold, which indicates bold-style emphasis, parallel to +strong in HTML and textbf in LaTeX, may be +used inside mathematical content as well as outside. However, +bold may not contain math-special symbols such as that given by +\alpha, while mathbf may.

+ +

A certain amount of attention to semantics is required in order to +have robust generation of the XHTML+MathML output. An absolutely +basic part of this is having unambiguous determination of what is a +single symbol. By long convention in TeX the string “abcd” in +math is understood as the product (in whatever sense of “product”) +of four symbols. If a string with more than one character — for +example, “Hom” — is to be a single symbol, it may be marked up +with mbox or, in GELLMU source, be assigned a symbol name +having custom print representation using mathsym in the preamble. +In GELLMU source mathbf should only contain a single symbol. + + +

+ +

The markup +

+
+
+\display{$\nabla\times\vec{\mbox{\bold{B}}}$
+
+         \ with ``mbox'' and ``bold'' versus
+
+         \ $\nabla\times\vec{\mathbf{B}}$ \ with ``mathbf''\,.}
+
+

+produces +

+
+ \nabla \times\vec{B} + with “mbox” and “bold” versus + \nabla \times\vec{B} with “mathbf”.
+

+ +

Diagrams are done using array. They must, therefore, be +rectangular. The markup +

+
+
+\newcommand{\ra}{\rightarrow}
+
+\newcommand{\da}{\downarrow}
+
+\[ \begin{array}{ccccccccc}
+
+0 & \ra  & A'  & \ra  & A   & \ra &  A''  & \ra & 0 \\
+
+~ &      & \da &      & \da &     & \da   &     &   \\
+
+0 & \ra  & B'  & \ra  & B   & \ra &  B''  & \ra & 0
+
+\end{array} \]
+
+

+yields +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
--> A^{′} --> A --> A^{″} --> 0
 
0 --> B^{′} --> B --> B^{″} --> 0
  +
+

+ +

+
+
Comments about array, eqnarray, tabular +
    +
  1. In this markup note the appearance of the character ‘~’ at +the beginning of the second row of the array. The modular design of +the didactic production system requires that the syntactic translator +may only deal with markup syntax. The ‘~’, which is markup +in GELLMU source as in LaTeX for “non-breaking space”, in the +first cell of the second row serves to keep the first cell from being +empty. There is a technical error in the SGML output of the +syntactic translator when the first cell in an array or +tabular row is empty unless there is an explicit opentag for +the first cell. The technical error will trigger a validation error +though it should not interfere with the generation of a correct parsed +output.7 +

    +
  2. +
  3. Also in the foregoing markup note that the LaTeX-like use of the +character ‘&’ as the introducer of a new cell must in GELLMU +source be followed by whitespace. Otherwise there is risk of +confusion with the alternative markup use of ‘&’ in GELLMU +source (though not in LaTeX source) to initiate an SGML entity +reference.

    +
  4. +
+

+
+

+ +

There is multiscript support. The command mscript takes 5 +arguments. The first is its base. The script order is counter-clockwise +beginning with upper-left. For example, +

+
+\pre[_{2}^{14}]{C}_{5+}^{2}    \pre[_{b}^{a}]{Hom}_{c}^{d}(X,Y) +
+

+is produced by +

+
+
+\[
+
+\mscript{\mathbf{C}}{14}{2}{5+}{2}\quad
+
+\mscript{\mbox{Hom}}{a}{b}{c}{d}(X,Y)
+
+\]
+
+

+ +

AMSMath-like overset and underset: \overset{A}{B} + then \underset{A}{B} +

+
+ \overset{A}{B} +     \underset{A}{B} +  +
+

+ +

The command overset is the AMSMath replacement in LaTeX +for LaTeX's native stackrel.

+ +

+
+
+A map may be labeled using \emph{overset}:
+
+\[ X \overset{f}{\longrightarrow} Y \]
+
+or using \emph{underset}:
+
+\[ X \underset{f}{\longrightarrow} Y \]
+
+

+

+
+
A map may be labeled using overset: +
+ X \overset{f}{ ----> } + Y  +
+or using underset: +
+ X \underset{f}{ ----> } + Y  +
+
+

+ +

Binary or pseudo-binary operators: +

+
+vee: ∨   setminus: ∖   ll: ≪   gg: ≫     approx: ≊  ਊsymp: ≈    +
+

+

+
+rightarrow:  -->    leftarrow:  <--     implies: ⇒   revimplies: ⇐   iff: ⇔    +
+

+ +

Other operators: +

+
+uparrow: ↑  ਍ownarrow: ↓   triangle: ▵  ꂫuts: ⇒    +
+

+ +

The command vect is for vector generation. Its usage is: +

+
+\vect[open-close-separator spec]{coordinate}
+

+Thus, the markup \vect{x}{y}{z} produces (x, y, z). +On the other hand the markup \vect[]{x}{y}{z} produces +xyz. This might be useful, for example, in +providing reasonably semantic (but visibly traditional) markup for a +tensor field. For example +

+
+T_{j_{1}j_{2}…j_{q}}^{i_{1}i_{2}…i_{p}} +
+

+When vect's option is empty, vector opener, closer, and coordinate +separators are all nil. vect might be used to provide the stylized, +though semantically dubious, +inner product markup \vect[<>;]{v}{w} yielding +

+
+ <v; w>  ,  +
+

+or with the markup \vect[\lsb;\rsb;:]{a}{b}{c} +to customize notation for the homogeneous coordinate triple +representing a point of P^{2}: +

+
+ [a: b: c]    .  +
+

+ +

Leray's spectral sequence: +

+
+
If +
+ X   ---->    B  +
+with fibre F, then +
+ {{E}_{2}^{pq}  =  H^{p}(B, H^{q}(F))}  ⇒ H^{*}(X)    .  +
+
+

+is produced by +

+
+
+If
+
+\[ X \ \longrightarrow \  B \]
+
+with fibre $F$\@, then 
+
+\[ {\mscript{E}{}{}{2}{\vect[]{p}{q}} = H^p\aF(B, H^q\aF(F))}
+
+   \abuts H^{*}\aF(X) \ \eos \]
+
+

+In this markup the command \aF, is not strictly necessary. +It provides a deliberate way to indicate that, in the second +instance above, the symbol X is argument-like in relation to +the symbol H^{*}. In MathML rendering aF gives rise to +presentation-level MathML's invisible operator ApplyFunction. +

+
+ +
+

9.  Beyond this Introductory Guide

+ +

More information about GELLMU is available in the Manual. +Some examples of topics to be found there include: +

+ +

+ +

The author tries to keep fresh information on the GELLMU web site. +

+
+
+

Footnotes

+
    +
  1. * This should not be construed to mean, however, that standard LaTeX +processing could not incorporate this type of source markup at some +time in the future.
  2. +
  3. * The author prefers the freely available cross-platform +browser Firefox (http://www.mozilla.com/) from the +Mozilla Project.
  4. +
  5. * In +GELLMU source, as in LaTeX source ‘~’ is markup for +“non-breaking space”. Note further that ASCII tilde +“\tld;” should not be confused with either the accent +command “\tilde” or the math command “\sim” +(rendered as ~ ) that is typically used for mathematical +operators.
  6. +
  7. * The SGML document type definition is +more elaborately commented than its XML mirror found in the file +xml/xgellmu.dtd.
  8. +
  9. * The most convenient +way to call the syntactic translator with a non-default function is to +make the first line of the source file point to the name of the +special function. For example, the function “gellmu-verblist” will +be called if the first line of the source file is “%!verblist”.
  10. +
  11. * Similar intellectual property issues pertain more widely to fonts. +In particular, for this reason by default in the XHTML+MathML +output character coloring is used to cover possible font failures +for the blackboard bold, calligraphic, and fraktur math fonts; the +colors corresponding colors are, respectively, red, blue, and green.
  12. +
  13. * Beyond that in certain situations some web browsers +appear not to deal well with empty table cells, and placing an HTML +non-breaking space in such a cell is often a good thing for that +reason. Of course, the special character ‘~’ for +non-breaking space in GELLMU source gives rise in HTML output to the +SGML non-breaking space character denoted with the entity reference +“&#xA0;”.
  14. +
+ + + diff --git a/support/gellmu/doc/userdoc.pdf b/support/gellmu/doc/userdoc.pdf new file mode 100644 index 0000000000..7176a9785f Binary files /dev/null and b/support/gellmu/doc/userdoc.pdf differ diff --git a/support/gellmu/doc/userdoc.xhtml b/support/gellmu/doc/userdoc.xhtml new file mode 100644 index 0000000000..563864f957 --- /dev/null +++ b/support/gellmu/doc/userdoc.xhtml @@ -0,0 +1,1402 @@ + + + + + + + + + + +GELLMU: Introductory User's Guide + + +

Introductory User's Guide to Regular GELLMU

+

Version 0.8.4 release, July 2007

+

William F. Hammond

+

+Dept. of Mathematics & Statistics
University at Albany
Albany, New York 12222 (USA)

+

revision of July 6, 2007

+
+

Table of Contents

+
+
1  Introduction... * +
+2  First Steps... * +
+2.1  Acquiring and Installing... * +
+2.2  Writing an Article... * +
+3  Basic Markup Within Sentences... * +
+4  Sectioning... * +
+5  Lists... * +
+6  Tabular Environment Emulation... * +
+7  Labels, Cross References, and Anchors... * +
+8  Mathematics... * +
+9  Beyond this Introductory Guide... * +
+
+ +
+

1.  Introduction

+ +

Regular GELLMU is the part of the GELLMU Project under which +source language markup most closely resembles actual LaTeX source +markup. Much of the markup vocabulary is the same as that of +actual LaTeX. The differences — and, indeed, the whole reason +for the GELLMU Project — arises from the author's conclusion in +1998 that it would not be possible in a robust way to write rules +for actual LaTeX source markup so that the collection of documents +in the article document class prepared under such rules would +admit fully reliable automatic translation to other formats1.

+ +

The version 0.8 release of the GELLMU Project was the first +release providing an output stream for the XML form of HTML extended +by the World Wide Web Consortium's +Mathematical Markup Language (MathML). +The driver script mmkg provides translations of regular GELLMU +articles to (1) actual LaTeX (and from there to DVI and +PDF), (2) classic HTML, and (3) XHTML+MathML, while the driver +script mkg omits XHTML+MathML. Though the +PDF output may be read on a screen, it is intended primarily +for printing by end consumers.

+ +

While one could provide a landscape version of the PDF output with +live anchors for screen consumption, the XHTML+MathML version +would still be superior for screen reading since, as with ordinary +HTML, the text is re-formatted to conform naturally both to +magnification and window-resizing actions by the end user. The +quality of the rendering of mathematics in the XHTML+MathML +version is very nearly as good as that in the PDF version.

+ +

Indeed the author, as an author, finds that the best venue for proof +reading what he writes is XHTML+MathML when displayed in a suitable web +browser2 +with larger than normal font size and narrower than normal +line length.

+ +

Moreover, the XHTML+MathML version is fully compliant with the +Accessibility Guidelines of the +World Wide Web Consortium.

+ +

This document is an introductory user guide. The relation of regular +GELLMU to the GELLMU Project overall is explained in the Manual, and +advanced user information on regular GELLMU is found there as well. +This document covers fundamentals not mentioned in the manual. It is +available in PDF, XHTML+MathML, +and classical HTML versions. Online copies of +this Introductory Guide and of the Manual may be found at +CTAN and the GELLMU web site.

+ +

To use this document as an example for learning refer to its +source markup and to use the project manual +as an example refer to the +manual's source markup. +

+
+ +
+

2.  First Steps

+ +
+

2.1.  Acquiring and Installing

+ +

GELLMU is implemented as cross-platform free software licensed under +the GNU General Public +License. Its package is available from the +Comprehensive TeX Archive Network (CTAN) +and from the GELLMU web site.

+ +

The package requires a number of other cross-platform free software +packages including GNU Emacs, Perl, and some standard items of +SGML/XML software, chiefly Open SP. Locations may be +found in the Manual (key “requiredsoftware”).

+ +

Linux: The required packages are generally part of a full +GNU/Linux distribution. The package should be installed in +/usr/local/gellmu and symlinks to driver scripts should be +made from a suitable place in one's command path.

+ +

MacOS-X and other Unix variants: The only difference from +GNU/Linux is that some of the supporting packages may need +to be acquired and installed.

+ +

MS Windows: The best strategy is to acquire and install a +full Cygwin distribution. +Then proceed as with Linux.

+ +

Additional information may be found in the Manual. +

+
+ +
+

2.2.  Writing an Article

+ +

The minimal form of a regular GELLMU article is this:

+ +

+
+
+\documenttype{article}
+
+\title{Some title}
+
+
+\begin{document}
+
+
+First Paragraph.
+
+
+Second Paragraph.
+
+
+. . .
+
+
+\end{document}
+
+

+ +

An article must begin with \documenttype{article}. The initial +part of an article up to the required \begin{document} is the +article's preamble, and the rest of the article is the +article's body.

+ +

Almost everything in the body of an article must be part of +a paragraph. Most typically a paragraph is begun with a blank line. +Paragraphs themselves may be parts of sectional units.

+ +

Beware special characters. For example ‘%’ converts the rest +of its line to comment status. To use ‘%’ in text write +“\%”. The special characters are with small exceptions +the same as those in LaTeX. Note, however, that in dealing with +multiple downstream formats any character that is not alpha-numeric +becomes potentially special. Therefore, there is a named form for +every non-alphanumeric ASCII character. For example, +“\tld;” is the name of ASCII ‘~’, +which is sometimes handy when forming a URL.3

+ +

The names of special characters may be found by browsing the SGML +document type definition in the file gellmu.dtd at the top of +the distribution tree.4 +

+
+
+ +
+

3.  Basic Markup Within Sentences

+ +

Although there is no markup for a sentence as a unit, there is markup +for the end of a sentence or a “full stop”. The normal way to +indicate the end of a sentence is to use an ASCII period +‘.’ followed by either a newline or two or more blank spaces. +An end of sentence is marked up as the SGML empty element eos. +This is automatically generated under the condition indicated above. +For most purposes it will not matter if an ASCII period is followed +by only a single blank space, but in that case no eos will be +generated.

+ +

The foregoing paragraph provides several instances of markup within +sentences other than eos. There are (1) a quoted phrase, +(2) two abbreviations, (3) a quoted character, and (4) two instances +of emphasized text. The source for that paragraph is:

+ +

+
+
+Although there is no markup for a sentence as a unit, there is markup
+
+for the end of a sentence or a ``full stop''.  The normal way to
+
+indicate the end of a sentence is to use an \abbr{ASCII} period
+
+\quochar{.}  followed by either a newline or two or more blank spaces.
+
+An end of sentence is marked up as the \sgml empty element \emph{eos}.
+
+This is automatically generated under the condition indicated above.
+
+For most purposes it will not matter if an \ascii period is followed
+
+by only a single blank space, but in that case no \emph{eos} will be
+
+generated.
+
+

+ +

The ``full stop'' is a marked up quoted phrase. The named form of a +quoted phrase is quophrase. The markup \quophrase{full stop} +is the equivalent expanded form. An abbreviation is indicated with the +command abbr. There is, of course, no requirement that an +abbreviation be marked up; it is merely good practice.

+ +

The name of markup for emphasized text is emph. A common +alternate form of emphasis is called bold. One way the two +differ is that emph has order two effect, i.e., emph +within emph removes emphasis while bold is not permitted +within itself. Note that bold may be emphasized.

+ +

In the cited marked up text above the instances \sgml and \ascii +are user-defined newcommands occurring in the preamble (or at least +before the invocations): +

+
+
+\newcommand{\ascii}{\abbr{ASCII}}
+
+\newcommand{\sgml}{\abbr{SGML}}
+
+

+The command newcommand is a meta-command in GELLMU source. +All newcommand instances are fully expanded by the syntactic +translator before it writes any output.

+ +

The markup \quochar{x} produces a quoted character: in this case +‘x’. There is no compelling reason why quophrase could +not have been used instead of quochar, but it is customary in +technical documentation to use a different presentation style for +quoted characters than for quoted phrases. Beyond that for +non-traditional forms of processing it can be very useful to provide +for semantic distinctions such as the distinction between a quoted +phrase in normal discourse and a quoted string in technical discourse. +More particularly, it is significant that in some languages for +computer programming there is an important distinction between a +character and a string of unit length. Some of the markup commands +useful with technical documentation are +

+
+ +
commandexample in sourceexample rendered
quocharuse \quochar{\%} to commentuse ‘%’ to comment
quostr\quostr{unsigned long num;}unsigned long num;
qquostrtype \qquostr{done} to exittype “done” to exit
path\path{C:\bsl;TEX\bsl;TEXMF}C:\TEX\TEXMF
urlanchsee \urlanch{userdoc.glm}  see userdoc.glm
+
+

+With regular LaTeX standard practice is to use texttt for the +examples just cited involving quochar, quostr, +path, and, apart from web-related considerations, +urlanch. The name url has been used variously in +regular LaTeX; therefore, url has not been introduced as a +name in regular GELLMU so that an author may safely use it, if +desired, as a macro name. +

+
+ +
+

4.  Sectioning

+ +

Unless one wants fancy non-default behavior, one may provide +sections, subsections, and subsubsections as in LaTeX. Thus, +for example,

+ +

+
+
+\documenttype{article}
+
+\title{Some title}
+
+
+\begin{document}
+
+
+\section{Title of first section}
+
+First Paragraph.
+
+
+Second Paragraph.
+
+
+. . .
+
+
+\section{Title of second section}
+
+First Paragraph.
+
+
+Second Paragraph.
+
+
+. . .
+
+
+\end{document}
+
+

+ +

With this style of markup one does not indicate the end of a section +although there is a way described in the Manual (key “secusage”) to gain finer +control over sectional units. +

+
+ +
+

5.  Lists

+ +

As with LaTeX GELLMU article provides lists with the +names description, enumerate, and itemize. +For example, the markup +

+
+
+\begin{enumerate}
+
+\item bird
+
+\item cat
+
+\item dog
+
+\end{enumerate}
+
+

+yields: +

+
+
    +
  1. bird

    +
  2. +
  3. cat

    +
  4. +
  5. dog

    +
  6. +
+
+
+

+while the markup +

+
+
+\begin{description}
+
+\item[Parrot] a type of bird
+
+\item[Persian] a type of house cat
+
+\item[Pointer] a type of dog
+
+\end{description}
+
+

+yields: +

+
+
+
+Parrot
+
a type of bird
+Persian
+
a type of house cat
+Pointer
+
a type of dog
+
+
+

+ +

A list is normally part of a paragraph, but a list may occur outside +of a paragraph in a sectional unit or even at the top level of +an article's body.

+ +

An item in a list may contain paragraphs but, as the foregoing +examples show, may contain loose text.

+ +

While LaTeX provides an excellent construction facility for customized +lists through its list environment, which may be used in +conjunction with its newenvironment command, there is no facility +for the provision of on-the-fly markup in SGML. Therefore, the +article document type provides several other kinds of list.

+ +

The lists called menu and Menu consist of +items. These lists have no item labels. They differ only +in intention for spacing in presentation formats.

+ +

It often makes sense for menu to be used inside an item +of another list. Moreover, a single item menu will render in +either the LaTeX or HTML formattings as “hanging indentation”.

+ +

A defnlist is intended to be more like the list called dl +in HTML than like description. It must consist of one or +more term, desc pairs with term mandatory and +desc optional.

+ +

There are also other lists that will not be mentioned here except to +point out that when the name verbatim is enabled as a +metacommand, rather than as a command, by calling the syntactic +translator with a non-default function5 +such as verblist or latex-faq, the verbatim material +is organized as a verblist.

+ +

For more information about lists browse the document type definitions +gellmu.dtd and xml/xgellmu.dtd being mindful that +default processing in the didactic production system sometimes does +a small amount of list manipulation between the SGML and XML versions +of an article. +

+
+ +
+

6.  Tabular Environment Emulation

+ +

Most users having a LaTeX background will find that tabular +with column arguments limited to ‘l’, ‘r’, +‘c’, and ‘p’ is reasonably functional. +Improvement made during 2006 were made possible by the increased +availability to users of web browsers supporting version 2 of the +cascading style sheets (CSS) specification.

+ +

For example, the following markup underlies a small +lcc table in the section on mathematics. +

+
+
+\display{\begin{tabular}{lcc}
+
+\bold{Name} & \bold{Opener}       & \bold{Closer}   \\
+
+math        & \quostr{\bsl;(}     & \quostr{\bsl;)} \\
+
+tmath       & \quostr{\$}         & \quostr{\$}     \\
+
+displaymath & \quostr{\bsl\lsb;}  & \quostr{\bsl\rsb;}
+
+\end{tabular}}
+
+

+(In this markup bsl is a name for the backslash character +and lsb, rsb the names of the square brackets.)

+ +

There is presently no concept of “float”.

+ +

More information is available in the Manual (key “tabular”). +

+
+ +
+

7.  Labels, Cross References, and Anchors

+ +

The basic idea is very simple. Use +

+
+\label{mylabelkey}
+

+to mark a location that is associated with the named +label key, and use +

+
+\ref{mylabelkey}
+

+or one of several other methods to reference that location. +The command ref may be regarded as the default method. +In an online version, however, it has not been designed to +create a selectable anchor but rather simply to indicate section +number.

+ +

For example, in this document there is a label with the key +“math” at the beginning of the section (8) on +mathematics. The previous sentence contains a reference with +the markup \ref{math} to that section. This markup results +in the number of that section appearing in the first sentence. +For clarity the markup for the entire first sentence of this +paragraph is: +

+
+
+For example, in this document there is a label with the key
+
+\qquostr{math} at the beginning of the section (\ref{math}) on
+
+mathematics.
+
+

+ +

If, on the other hand, one wants an online version to contain +a selectable anchor to section 8 to the +section on math, then +in the preamble of the document one might place the newcommand +definition +

+
+\newcommand{\iref}[2]{\anch[iref="#1"]{#2}}
+

+and then, as in the foregoing portion of this sentence use +the markup +

+
+\iref{math}{selectable anchor to section \ref{math}} .
+

+Note that this markup uses the label key “math” twice: +once as the first argument to the newcommand called iref +and once as the sole argument of the command ref that +itself appears in the second argument of iref.

+ +

On the question of whether to use ref or one of several +other commands to make a reference, there are several considerations: +

+
    +
  1. How should the reference be indicated in an online format + that will be viewed in an ebook or a web browser?

    +
  2. +
  3. How should the reference be indicated in a typeset format + where there is neither a cursor nor the possibility of automatic + scrolling?

    +
  4. +
+

+More details on this subject may be found in the +Manual (key “labelref”). +

+
+ +
+

8.  Mathematics

+ +

GELLMU article provides 5 containers for mathematical +content: math, tmath, displaymath, equation, +eqnarray. All may be referenced by name. However, +LaTeX-like markup is supported: + +

+
+ +
NameOpenerCloser
math\(\)
tmath$$
displaymath\[\]
+
+

+ +

The containers math and tmath are essentially +equivalent non-displayed containers. The current LaTeX formatter +provides a tiny amount of extra horizontal space around math +but not around tmath.

+ +

Just as with ordinary LaTeX there can be difficulty locating +a missing ‘$’ if one uses these for tmath. Unbalanced +‘$’ characters usually lead the syntactic translator to +complain (correctly, though not with as much user-friendliness as one +might wish) about not being able to balance a brace. In this case +if tmath is seen in the displayed surrounding text, a missing +‘$’ is likely.

+ +

MathML rendering support (with MathML's presentation markup) in HTML +versions, i.e., the modern XML form of HTML extended with MathML, is +new in the summer of 2004.

+ +

A program to generate an output stream providing content-level MathML +markup, i.e., semantic markup transparent for computer algebra +systems, has not yet been written.

+ +

Those who use mathematics may find the following illustrations +instructive.

+ +

The markup +

+
+
+Just as with \tex; or \latex; it is easy to provide a mathematical
+
+formula, such as $y = x^3/(x^2 + 1)$\aoc either inline or displayed.
+
+

+produces: +

+
+
Just as with TeX or LaTeX it is easy to provide a mathematical +formula, such as y=x3x2+1, either inline or displayed.
+
+

+ +

This markup +

+
+
+Here the same formula is displayed.
+
+\[ y = \frac{x^3}{x^2 + 1} \eos\]
+
+

+yields: +

+
+
Here the same formula is displayed. + +y=x3x2+1. +
+
+

+The eos corresponds to an empty SGML element for “end of +sentence” (or “full stop”). Normally one simply uses ‘.’, +but inside a displayed math zone there is semantic-level risk of +confusion with various possible uses of ‘.’ as a mathematical +symbol.

+ +

Markup: +

+
+
+The square root of a compound fraction:
+
+\[ \sqrt{\frac{\frac{a}{b}}{\frac{c}{d}}} \eos \]
+
+

+Rendered: +

+
+
The square root of a compound fraction: + +abcd. +
+
+

+ +

In the current XHTML+MathML formatting by default radical signs in +source markup are converted by default to fractional exponents because +of an intellectual property issue with fonts available for use by the +open source Mozilla browser and its spinoffs including +Firefox, Galeon, and Nautilus.6

+ +

Using the markup for numbered equations +

+
+
+The quadratic equation
+
+\begin{equation} a x^2 + b x + c = 0 \end{equation}
+
+has roots
+
+\begin{equation}
+
+ x = \frac{-b \pm \sqrt{b^2 - 4 a c}}{2 a} \ \eos
+
+\end{equation}
+
+

+one obtains the rendering: +

+
+
The quadratic equation + +(1)ax2+bx+c=0 +has roots + +(2)x=b±b24ac2a.
+
+

+ +

Rule for subscripts and superscripts: A subscript or +superscript must be braced if keyboarding it involves more than +one character. Thus, one may use $C^2$ or $C^{2}$ +to produce C2, but one must use $C^{\infty}$ to +generate C.

+ +

The Taylor series of the exponential function is + +et=k=0tkk!. + +Note here that the sum markup \sum requires a formal +terminator \sum: (likewise with \int for integral and \prod +for product). +

+
+
+\[ e^t = \sum_{k = 0}^{\infty} \, \frac{t^k}{k!} \sum: \ \eos \]
+
+

+ +

The markup +

+
+
+The continued fraction expansion of the \emph{golden mean}:
+
+\[\frac{1 + \sqrt{5}}{2} =
+
+     1 + \frac{1}{1+\frac{1}{1+\frac{1}{1+\frac{1}{1+\ldots;}}}} \eos \]
+
+

+produces: +

+
+
The continued fraction expansion of the golden mean: + +1+52=1+11+11+11+11+. +
+
+

+while the markup +

+
+
+Mixed function application and multiplication:
+
+\[ {\func{sin}\aF;{ax}}\itimes;{\func{cos}\aF;{bx}} \eos \]
+
+

+yields +

+
+
Mixed function application and multiplication: + +sinaxcosbx. +
+
+

+ +

Markup: +

+
+
+Newton's binomial series:
+
+\[ (1 + t)^r = \sum_{k=0}^{\infty} \,
+
+  \frac{r(r - 1)(r - 2)\ldots(r - k + 1)}{k!}\, t^k \sum: \eos \]
+
+

+rendering: +

+
+
Newton's binomial series: + +1+tr=k=0rr1r2rk+1k!tk. +
+
+

+ +

Markup: +

+
+
+A differential equation:
+
+\[ D^2 y - 3 x (D y)^2 = x \func{cos} x \ \eos \]
+
+

+rendering: +

+
+
A differential equation: + +D2y3xDy2=xcosx. +
+
+

+ +

The statement of Stokes's Theorem in space + +ScurlF·Ndσ=SF·Tds. + +may be generated by the markup +

+
+
+\[ \int\int_S \, (\mbox{\bold{curl}}
+
+ \, \regch{\bold{F}} \,\cdot\, \regch{\bold{N}})\, d\sigma;
+
+\int:\int:
+
+ = 
+
+\int_{\partial S} \, (\regch{\bold{F}}
+
+\,\cdot\, \regch{\bold{T}})\, ds \int:\, \eos \]
+
+

+Note that each \int integral opener must be followed eventually +by a \int: closer (or braces could be used, i.e., \int{ ... }, +or \begin{int}\end{int} also could be used.

+ +

The branched definition of the absolute value of a real number may +be marked up with +

+
+
+\[ \absval{x} = \lbalbr{\begin{array}{rl}
+
+                x & \text{\ if\ } x \geq 0 \\
+
+               -x & \text{\ if\ } x < 0
+
+               \end{array}} \ \eos \]
+
+

+to yield + +x=x if x0x if x<0. +

+ +

The LaTeX-like command mathbf is new in GELLMU +article. It may only be used in math. The command +bold, which indicates bold-style emphasis, parallel to +strong in HTML and textbf in LaTeX, may be +used inside mathematical content as well as outside. However, +bold may not contain math-special symbols such as that given by +\alpha, while mathbf may.

+ +

A certain amount of attention to semantics is required in order to +have robust generation of the XHTML+MathML output. An absolutely +basic part of this is having unambiguous determination of what is a +single symbol. By long convention in TeX the string “abcd” in +math is understood as the product (in whatever sense of “product”) +of four symbols. If a string with more than one character — for +example, “Hom” — is to be a single symbol, it may be marked up +with mbox or, in GELLMU source, be assigned a symbol name +having custom print representation using mathsym in the preamble. +In GELLMU source mathbf should only contain a single symbol. + + +

+ +

The markup +

+
+
+\display{$\nabla\times\vec{\mbox{\bold{B}}}$
+
+         \ with ``mbox'' and ``bold'' versus
+
+         \ $\nabla\times\vec{\mathbf{B}}$ \ with ``mathbf''\,.}
+
+

+produces +

+
+×B + with “mbox” and “bold” versus + ×B with “mathbf”.
+

+ +

Diagrams are done using array. They must, therefore, be +rectangular. The markup +

+
+
+\newcommand{\ra}{\rightarrow}
+
+\newcommand{\da}{\downarrow}
+
+\[ \begin{array}{ccccccccc}
+
+0 & \ra  & A'  & \ra  & A   & \ra &  A''  & \ra & 0 \\
+
+~ &      & \da &      & \da &     & \da   &     &   \\
+
+0 & \ra  & B'  & \ra  & B   & \ra &  B''  & \ra & 0
+
+\end{array} \]
+
+

+yields + +0AAA′′00BBB′′0 + + +

+
+
Comments about array, eqnarray, tabular +
    +
  1. In this markup note the appearance of the character ‘~’ at +the beginning of the second row of the array. The modular design of +the didactic production system requires that the syntactic translator +may only deal with markup syntax. The ‘~’, which is markup +in GELLMU source as in LaTeX for “non-breaking space”, in the +first cell of the second row serves to keep the first cell from being +empty. There is a technical error in the SGML output of the +syntactic translator when the first cell in an array or +tabular row is empty unless there is an explicit opentag for +the first cell. The technical error will trigger a validation error +though it should not interfere with the generation of a correct parsed +output.7 +

    +
  2. +
  3. Also in the foregoing markup note that the LaTeX-like use of the +character ‘&’ as the introducer of a new cell must in GELLMU +source be followed by whitespace. Otherwise there is risk of +confusion with the alternative markup use of ‘&’ in GELLMU +source (though not in LaTeX source) to initiate an SGML entity +reference.

    +
  4. +
+
+
+

+ +

There is multiscript support. The command mscript takes 5 +arguments. The first is its base. The script order is counter-clockwise +beginning with upper-left. For example, + +C5+2214HomcdbaX,Y + +is produced by +

+
+
+\[
+
+\mscript{\mathbf{C}}{14}{2}{5+}{2}\quad
+
+\mscript{\mbox{Hom}}{a}{b}{c}{d}(X,Y)
+
+\]
+
+

+ +

AMSMath-like overset and underset: \overset{A}{B} + then \underset{A}{B} + +BABA +

+ +

The command overset is the AMSMath replacement in LaTeX +for LaTeX's native stackrel.

+ +

+
+
+A map may be labeled using \emph{overset}:
+
+\[ X \overset{f}{\longrightarrow} Y \]
+
+or using \emph{underset}:
+
+\[ X \underset{f}{\longrightarrow} Y \]
+
+

+

+
+
A map may be labeled using overset: + +XfY + +or using underset: + +XfY +
+
+

+ +

Binary or pseudo-binary operators: + +vee:setminus:ll:gg:approx:asymp: + + +rightarrow:leftarrow:implies:revimplies:iff: +

+ +

Other operators: + +uparrow:downarrow:triangle:abuts: +

+ +

The command vect is for vector generation. Its usage is: +

+
+\vect[open-close-separator spec]{coordinate}
+

+Thus, the markup \vect{x}{y}{z} produces xyz. +On the other hand the markup \vect[]{x}{y}{z} produces +xyz. This might be useful, for example, in +providing reasonably semantic (but visibly traditional) markup for a +tensor field. For example + +Tj1j2jqi1i2ip + +When vect's option is empty, vector opener, closer, and coordinate +separators are all nil. vect might be used to provide the stylized, +though semantically dubious, +inner product markup \vect[<>;]{v}{w} yielding + +vw, + +or with the markup \vect[\lsb;\rsb;:]{a}{b}{c} +to customize notation for the homogeneous coordinate triple +representing a point of P2: + +abc. +

+ +

Leray's spectral sequence: +

+
+
If + +XB + +with fibre F, then + +E2pq=HpB,HqFH*X. +
+
+

+is produced by +

+
+
+If
+
+\[ X \ \longrightarrow \  B \]
+
+with fibre $F$\@, then 
+
+\[ {\mscript{E}{}{}{2}{\vect[]{p}{q}} = H^p\aF(B, H^q\aF(F))}
+
+   \abuts H^{*}\aF(X) \ \eos \]
+
+

+In this markup the command \aF, is not strictly necessary. +It provides a deliberate way to indicate that, in the second +instance above, the symbol X is argument-like in relation to +the symbol H*. In MathML rendering aF gives rise to +presentation-level MathML's invisible operator ApplyFunction. +

+
+ +
+

9.  Beyond this Introductory Guide

+ +

More information about GELLMU is available in the Manual. +Some examples of topics to be found there include: +

+ +

+ +

The author tries to keep fresh information on the GELLMU web site. +

+
+
+

Footnotes

+
    +
  1. * This should not be construed to mean, however, that standard LaTeX +processing could not incorporate this type of source markup at some +time in the future.
  2. +
  3. * The author prefers the freely available cross-platform +browser Firefox (http://www.mozilla.com/) from the +Mozilla Project.
  4. +
  5. * In +GELLMU source, as in LaTeX source ‘~’ is markup for +“non-breaking space”. Note further that ASCII tilde +“\tld;” should not be confused with either the accent +command “\tilde” or the math command “\sim” +(rendered as ) that is typically used for mathematical +operators.
  6. +
  7. * The SGML document type definition is +more elaborately commented than its XML mirror found in the file +xml/xgellmu.dtd.
  8. +
  9. * The most convenient +way to call the syntactic translator with a non-default function is to +make the first line of the source file point to the name of the +special function. For example, the function “gellmu-verblist” will +be called if the first line of the source file is “%!verblist”.
  10. +
  11. * Similar intellectual property issues pertain more widely to fonts. +In particular, for this reason by default in the XHTML+MathML +output character coloring is used to cover possible font failures +for the blackboard bold, calligraphic, and fraktur math fonts; the +colors corresponding colors are, respectively, red, blue, and green.
  12. +
  13. * Beyond that in certain situations some web browsers +appear not to deal well with empty table cells, and placing an HTML +non-breaking space in such a cell is often a good thing for that +reason. Of course, the special character ‘~’ for +non-breaking space in GELLMU source gives rise in HTML output to the +SGML non-breaking space character denoted with the entity reference +“&#xA0;”.
  14. +
+ + + diff --git a/support/gellmu/webstyle/gellmuart.css b/support/gellmu/webstyle/gellmuart.css new file mode 100644 index 0000000000..cd4bf9368e --- /dev/null +++ b/support/gellmu/webstyle/gellmuart.css @@ -0,0 +1,1876 @@ +article { + margin: 1em; +} + +preamble:before { + display: block; + color: #770000; + font-style: italic; + font-size: 0.75em; + content: "Notice: This is a development-level crude formatting of the raw XML version of a GELLMU article using a CSS sheet that is still under construction (hence, incomplete). The CSS sheet is aiding presentation of an intermediate stage of the document that may be missing some pieces of information such as, for example, section numbers. For a better presentation consult the HTML, DVI, or PDF version. If math is involved, the best online version will likely be the XHTML version."; +} + +preamble { + display: block; + color: #000033; + font-family: sans-serif; + font-size: 1em; + margin: 1em 1em 1em 1em; +} + +body { + display: block; + color: #000033; + font-family: sans-serif; + font-size: 1em; + margin: 1em 1em 1em 1em; +} + +abbr { + display: inline; +} + +address { + display: block; + margin: 1em auto 1em auto; + text-align: center; +} + +addr { + display: block; + margin-top: 2em; + margin-left: 2em; + margin-right: 2em; + margin-bottom: 2em; +} + +aln { + display: list-item; + white-space: nowrap; +} + +anchref:before { + content: " ["; +} + +anchref { + display: inline; + color: blue; +} + +anchref:after { + content: "] "; +} + +urlanch { + display: inline; + color: blue; +} + +anchv { + display: inline; + background-color: #ccccff; + font-style: italic; +} + +assthead { + display: list-item; + margin-top: 0.1em; + list-style-type: none; +} + +asstkey { + display: none; +} + +asstser { + display: none; +} + +asstname { + display: inline; + font-weight: bold; + background-color: #ffcccc; +} + +asstid { + background-color: #ffcccc; +} + +asstbody { + display: list-item; + background-color: #ffffcc; +} + +thebibliography { + margin-top: 1em; +} + +thebibliography:before { + display: block; + margin: 1em auto 1em auto; + font-size: 150%; + font-weight: bold; + text-align: center; + content: "References" +} + +bibentry { + display: list-item; + margin: 0.5em; +} + +bibkey { + display: none; +} + +footnote:before { + display: inline; + font-size: 10pt; + content: " ["; +} + +footnote:after { + display: inline; + font-size: 10pt; + content: "] "; +} + +footnote { + display: inline; + font-size: 10pt; + font-weight: normal; +} + +latexcommand { + display: none; +} + +date { + display: inline; +} + +today:before { + content: "[today]"; +} + +emph { + display: inline; + font-style: italic; +} + +Emph { + display: inline; + font-family: oblique; +} + +slnt { + display: inline; + font-style: italic; +} + +bold { + display: inline; + font-weight: bold; +} + +quostr { + display: inline; + font-family: monospace; +} + +quophrase:before { + display: inline; + content: "\201C"; +} + +quophrase:after { + display: inline; + content: "\201D"; +} + +squophrase:before { + display: inline; + content: "\2018"; +} + +squophrase:after { + display: inline; + content: "\2019"; +} + +eaddr { + display: inline; + font-family: monospace; +} + +email { + display: block; + margin: 0.7em auto 0.7em auto; + text-align: center; + font-family: monospace; +} + +qquostr { + display: inline; + font-family: monospace; +} + +qquostr:before { + display: inline; + font-family: monospace; + content: '"'; +} + +qquostr:after { + display: inline; + font-family: monospace; + content: '"'; +} + +quochar { + display: inline; + font-family: monospace; +} + +quochar:before { + display: inline; + font-family: monospace; + content: "`"; +} + +quochar:after { + display: inline; + font-family: monospace; + content: "'"; +} + +item { + display: list-item; + margin: 1ex 0 1ex 0; +} + +ditem { + display: list-item; + margin: 1ex 0 1ex 0; +} + +itemlabel:after { + content: " "; +} + +description { + margin: 1ex 0 1ex 1em; +} + +description > item > itemlabel { + font-weight: bold; +} + +enumerate { + display: block; + list-style-type: none; + counter-reset:enumeratei; + margin: 1ex 0 1ex 1em; +} + +enumerate > item:before { + counter-increment: enumeratei 1; + content: counter(enumeratei, decimal) ". "; +} + +enumerate > item { + display: list-item; + margin: 1ex 0 1ex 0; +} + +enumerate > item > itembody > enumerate { + display: block; + list-style-type: none; + counter-reset: enumerateii; + margin: 1ex 0 1ex 1em; +} + +enumerate > item > itembody > enumerate > item:before { + counter-increment: enumerateii 1; + content: counter(enumerateii, lower-alpha) ". "; +} + +enumerate > item > itembody > enumerate > item { + display: list-item; + margin: 1ex 0 ex 0; +} + +menu { + display: block; + list-style-type: none; + margin: 1ex 0 1ex 1em; +} + +Menu { + display: block; + list-style-type: none; + margin: 1ex 0 1ex 1em; +} + +Menu > item:before { + display: none; +} + +Menu > item { + display: list-item; + margin: 1.5ex 0 1.5ex 0; +} + +itemize { + display: block; + list-style-type: disc; + margin: 1ex 0 1ex 1em; +} + +itemize > itemize { + display: block; + list-style-type: square; + margin: 1ex 0 1ex 0; +} + +itemize > item:before { + content: attr(n); +} + +defnlist { + display: block; + list-style-type: none; + margin-left: 1em; + margin-top: 1em; + margin-bottom: 1em; +} + +term { + display: list-item; + font-family: sans-serif; + color: blue; + margin: 1ex 0 1ex 0; +} + +desc { + display: list-item; + margin: 1ex 0 1ex 0; +} + +label { + display: inline; + background-color: #ffccff; +} + +label:before { + content: "(id: "; +} + +label:after { + content: ") "; +} + +pageref:before { + content: "("; +} + +pageref:after { + content: ") "; +} + +mathsym { + display: none; +} + +par { + display: block; + text-align: left; + margin-bottom: 0.5em; +} + +parb { + display: block; + margin-bottom: 0.5em; +} + +table { + text-align: center; + display: table; + margin-left: 2em; + margin-right: 2em; +} + +verbatim { + display: block; + background-color: #d0d0d0; + margin-top: 1em; + margin-bottom: 1em; + text-align: left; + white-space: pre; +} + +verblist { + display: block; + font-family: monospace; + background-color: #e0e0e0; + margin: 1em; +} + +nln { + display: block; + text-align: left; + white-space: nowrap; +} + +verb { + display: inline; + font-family: monospace; + white-space: nowrap; +} + +secnumdepth { + display: none; +} + +base { + display: none; +} + +baseloc { + display: block; + color: blue; + text-align: right; + font-weight: bold; + margin-bottom: 0.5em; +} + +surtitle:before { + font-weight: normal; + color: #770000; + content: "Surtitle: " +} + +surtitle { + display: block; + color: green; + text-align: left; + font-weight: bold; + margin-top: 1em; + margin-bottom: 1em; +} + +title { + display: block; + color: #000066; + font-size: 2em; + font-weight: bold; + text-align: center; + margin-top: 5%; + margin-bottom: 5%; +} + +subtitle { + display: block; + color: #000066; + font-size: 1.3em; + font-weight: bold; + text-align: center; + margin-bottom: 1em; +} + +TableOfContents:before { + display: block; + font-size: 150%; + font-weight: bold; + text-align: center; + margin-top: 1em; + margin-bottom: 1em; + margin-left: auto; + margin-right: auto; + content: "Table of Contents"; +} + +TableOfContents { + display: block; + margin-left: 3em; + margin-bottom: 2ex; +} + +tocitem { + display: list-item; + list-style-type: none; +} + +tocunit { + display: inline; +} + +tocunit:after { + content: ". "; +} + +author { + display: block; + color: #000066; + font-size: 1.7em; + font-weight: bold; + text-align: center; + margin-bottom: 1em; +} + +date { + display: block; + color: #000066; + font-size: 1.2em; + font-weight: bold; + text-align: center; + margin-bottom: 1em; +} + +draftlabel { + margin: 1em auto 1em auto; +} + +draftlabel:before { + display: block; + font-size: 100%; + font-weight: bold; + font-family: monospace; + text-align: center; + content: "D R A F T"; +} + +copyright:before { + display: inline; + content: "\0000A9"; +} + +copynotice { + display: block; + font-size: 1em; + margin: 1em auto 1em auto; + text-align: center; +} + +keywords { + display: block; + font-size: 1em; + margin: 1em auto 1em auto; + text-align: center; +} + +abstract:before { + display: block; + font-size: 150%; + font-weight: bold; + text-align: center; + content: "Abstract"; +} + +abstract { + display: block; + margin-top: 0.5em; + margin-bottom: 0.5em; + margin-left: 10%; + margin-right: 10%; +} + +sunit:after { + content: ". " +} + +section, Section > prefix, Section > shead, Section > sunit { + display: block; + color: #000050; + font-size: 1.3em; + font-weight: bold; + text-align: left; + margin-top: 1.5em; + margin-bottom: 0.5em; +} + +subsection, Subsection > prefix, Subsection > shead, Subsection > sunit { + display: block; + color: #000050; + font-size: 1.2em; + font-weight: bold; + text-align: left; + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +subsubsection, Subsubsection > prefix, Subsubsection > shead, Subsubsection > sunit { + display: block; + color: #000050; + font-size: 1em; + font-weight: bold; + text-align: left; + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +hdr { + display: block; + font-size: 150%; + font-weight: bold; + text-align: left; + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +subhdr { + display: block; + font-size: 135%; + font-weight: bold; + text-align: left; + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +subsubhdr { + display: block; + font-size: 1.1em; + font-weight: bold; + text-align: left; + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +subsubsubhdr { + display: block; + font-size: 1em; + font-weight: bold; + text-align: left; + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +suphdr { + display: block; + font-size: 1.5em; + font-weight: bold; + text-align: left; + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +supsuphdr { + display: block; + font-size: 2em; + font-weight: bold; + text-align: left; + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +hdrc { + display: block; + font-size: 1.5em; + font-weight: bold; + text-align: center; + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +subhdrc { + display: block; + font-size: 1.3em; + font-weight: bold; + text-align: center; + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +subsubhdrc { + display: block; + font-size: 1.2em; + font-weight: bold; + text-align: center; + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +subsubsubhdrc { + display: block; + font-size: 1em; + font-weight: bold; + text-align: center; + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +suphdrc { + display: block; + font-size: 1.5em; + font-weight: bold; + text-align: center; + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +supsuphdrc { + display: block; + font-size: 2em; + font-weight: bold; + text-align: center; + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +brk { + display: block; + clear: both; +} + +bsl:before { + display: inline; + content: "\\"; +} + +eoq:before { + display: inline; + content: "?"; +} + +eoe:before { + display: inline; + content: "!"; +} + +per:before { + display: inline; + content: "."; +} + +lbr:before { + display: inline; + content: "\{"; +} + +rbr:before { + display: inline; + content: "\}"; +} + +lsb:before { + display: inline; + content: "["; +} + +rsb:before { + display: inline; + content: "]"; +} + +quo:before { + display: inline; + content: '"'; +} + +hsh:before { + display: inline; + content: "#"; +} + +cln:before { + display: inline; + content: ":"; +} + +sol:before { + display: inline; + content: "/"; +} + +scl:before { + display: inline; + content: ";"; +} + +qum:before { + display: inline; + content: "?"; +} + +tld:before { + display: inline; + content: "~"; +} + +eqc:before { + display: inline; + content: "="; +} + +exc:before { + display: inline; + content: "!"; +} + +dol:before { + display: inline; + content: "$"; +} + +pct:before { + display: inline; + content: "%"; +} + +amp:before { + display: inline; + content: "&"; +} + +crt:before { + display: inline; + content: "^"; +} + +ast:before { + display: inline; + content: "*"; +} + +eqs:before { + display: inline; + content: "="; +} + +vbr:before { + display: inline; + content: "|"; +} + +lpr:before { + display: inline; + content: "("; +} + +rpr:before { + display: inline; + content: ")"; +} + +ltc:before { + display: inline; + content: "<"; +} + +gtc:before { + display: inline; + content: ">"; +} + +apos:before { + display: inline; + content: "'"; +} + +leq:before { + display: inline; + content: "\2264"; +} + +geq:before { + display: inline; + content: "\2265"; +} + +/* + + + + +*/ + +equals:before { + display: inline; + content: " = "; +} + +atc:before { + display: inline; + content: "@"; +} + +hyp:before { + display: inline; + content: "-"; +} + +hy0:before { + display: inline; + content: "\00AD"; +} + +und:before { + display: inline; + content: "_"; +} + +rdash:before { + display: inline; + content: " - "; +} + +pdash:before { + display: inline; + content: " -- "; +} + +plu:before { + display: inline; + content: " + "; +} + +plus:before { + display: inline; + content: " + "; +} + +minus:before { + display: inline; + content: " \2212 "; +} + +quotient:before { + display: inline; + content: "/"; +} + +times:before { + display: inline; + font-family: monospace; + content: "X"; +} + +cup:before { + display: inline; + content: "\222A"; +} + +cap:before { + display: inline; + content: "\2229"; +} + +oplus:before { + display: inline; + content: "\2295"; +} + +otimes:before { + display: inline; + content: "\2297"; +} + +ominus:before { + display: inline; + content: "\2296"; +} + +infty:before { + display: inline; + content: "\221E"; +} + +sup { + display: inline; + font-size: 0.7em; + position: relative; + top: -1ex; +} + +sup1 { + vertical-align: super; +} + +sub { + display: inline; + font-size: 0.7em; + position: relative; + bottom: -1ex; +} + +sub1 { + vertical-align: sub; +} + +msup1:before { + display: inline; + content: "^\{"; +} + +msup1:after { + display: inline; + content: "\}"; +} + +msup { + display: inline; + font-size: 0.7em; + position: relative; + top: -1ex; +} + +sum, int, prod msup { + font-size: 100%; +} + +msub1:before { + display: inline; + content: "_\{"; +} + +msub1:after { + display: inline; + content: "\}"; +} + +msub { + display: inline; + font-size: 0.7em; + position: relative; + bottom: -1ex; +} + +pow1:before { + display: inline; + content: "^\{"; +} + +pow1:after { + display: inline; + content: "\}"; +} + +pow { + display: inline; + font-size: 0.7em; + position: relative; + top: -1ex; +} + +sqrt:before { + display: inline; + font-weight: bold; + content: " sqrt\{"; +} + +sqrt:after { + display: inline; + font-weight: bold; + content: "\} "; +} + +radx:before { + display: inline; + content: "^\{"; +} + +radx:after { + display: inline; + content: "\}"; +} + +radicand:before { + display: inline; + content: "\{"; +} + +radicand:after { + display: inline; + content: "\}"; +} + +sum:before { + display: inline; + font-weight: bold; + content: "\2211"; +} + +int:before { + display: inline; + font-weight: bold; + content: "\222B"; +} + +prod:before { + display: inline; + font-weight: bold; + content: "\220F"; +} + +numr:before { + display: inline; + content: "\{"; +} + +numr:after { + display: inline; + content: "\}"; +} + +denm:before { + display: inline; + content: "/\{"; +} + +denm:after { + display: inline; + content: "\}"; +} + +aos:before { + display: inline; + content: ". "; +} + +aoc:before { + display: inline; + content: ", "; +} + +cma:before { + display: inline; + content: ", "; +} + +spc:before { + display: inline; + content: " "; +} + +verblist spc:before { + content: "\00A0"; +} + +text spc:before { + content: "\00A0"; +} + +hsp { + display: none; +} + +latex:before { + display: inline; + content: "LaTeX"; +} + +tex:before { + display: inline; + content: "TeX"; +} + +cdot:before { + display: inline; + content: "\b7"; +} + +nbs:before { + display: inline; + content: "\a0"; +} + +eos:before { + display: inline; + position: relative; + left: -0.1em; + content: "."; +} + +eos:after { + display: inline; + content: "\a0"; +} + +ldots:before { + display: inline; + content: "\2026"; +} + +alpha:before { + display: inline; + content: "\03b1"; +} + +beta:before { + display: inline; + content: "\03b2"; +} + +chi:before { + display: inline; + content: "\03C7"; +} + +Delta:before { + display: inline; + content: "\0394"; +} + +delta:before { + display: inline; + content: "\03B4"; +} + +epsilon:before { + display: inline; + content: "\03B5"; +} + +varepsilon:before { + display: inline; + content: "\025B"; +} + +Gamma:before { + display: inline; + content: "\0393"; +} + +gamma:before { + display: inline; + content: "\03b3"; +} + +iota:before { + display: inline; + content: "\03B9"; +} + +kappa:before { + display: inline; + content: "\03BA"; +} + +Lambda:before { + display: inline; + content: "\039B"; +} + +lambda:before { + display: inline; + content: "\03BB"; +} + +mu:before { + display: inline; + content: "\03BC"; +} + +nu:before { + display: inline; + content: "\03BD"; +} + +Omega:before { + display: inline; + content: "\03A9"; +} + +omega:before { + display: inline; + content: "\03C9"; +} + +omicron:before { + display: inline; + content: "\03BF"; +} + +Phi:before { + display: inline; + content: "\03A6"; +} + +phi:before { + display: inline; + content: "\03D5"; +} + +varphi:before { + display: inline; + content: "\03C6"; +} + +Pi:before { + display: inline; + content: "\03A0"; +} + +pi:before { + display: inline; + content: "\03C0"; +} + +Psi:before { + display: inline; + content: "\03A8"; +} + +psi:before { + display: inline; + content: "\03C8"; +} + +rho:before { + display: inline; + content: "\03C1"; +} + +Sigma:before { + display: inline; + content: "\03A3"; +} + +sigma:before { + display: inline; + content: "\03C3"; +} + +tau:before { + display: inline; + content: "\03C4"; +} + +Theta:before { + display: inline; + content: "\0398"; +} + +theta:before { + display: inline; + content: "\03B8"; +} + +vartheta:before { + display: inline; + content: "\03D1"; +} + +Upsilon:before { + display: inline; + content: "\03A5"; +} + +upsilon:before { + display: inline; + content: "\03C5"; +} + +Xi:before { + display: inline; + content: "\039E"; +} + +xi:before { + display: inline; + content: "\03BE"; +} + +zeta:before { + display: inline; + content: "\03B6"; +} + +wp:before { + display: inline; + content: "\2118"; +} + +ell:before { + display: inline; + content: "\2113"; +} + +i:before { + display: inline; + content: "\0131"; +} + +j:before { + display: inline; + content: "j"; +} + +display { + display: block; + text-align: center; + width: 80%; + margin: 1em auto 1em auto; +} + +math, tmath { + display: inline; +} + +displaymath, eqnline, eqnrow { + display: block; + text-align: center; + width: 80%; + margin: 1em auto 1em auto; +} + +eqnkey, eqnser { + display: none; +} + +mbox{ + display: inline; + font-style: normal; +} + +regch{ + display: inline; + font-style: normal; +} + +text { + display: inline; + font-style: normal; +} + +bal:before { + display: inline-block; + vertical-align: middle; + content: " ("; +} + +bal:after { + display: inline-block; + vertical-align: middle; + content: ") "; +} + +balsb:before { + display: inline; + content: "["; +} + +balsb:after { + display: inline; + content: "]"; +} + +balbr:before { + display: inline; + content: "{"; +} + +balbr:after { + display: inline; + content: "}"; +} + +balab:before { + display: inline; + content: "<"; +} + +balab:after { + display: inline; + content: ">"; +} + +balvbr:before { + display: inline; + content: "|"; +} + +balvbr:after { + display: inline; + content: "|"; +} + +equiv:before { + display: inline; + content: " \2261 " +} + +cong:before { + display: inline; + content: " \2245 " +} + +mapsto:before { + display: inline; + content: " \21A6 " +} + +longmapsto:before { + display: inline; + content: "\21A6"; +} + +leftarrow:before { + display: inline; + content: " \2190 " +} + +uparrow:before { + display: inline; + content: " \2191 " +} + +rightarrow:before { + display: inline; + content: " \2192 " +} + +downarrow:before { + display: inline; + content: " \2193 " +} + +longleftarrow:before { + display: inline; + content: " \2190 " +} + +longrightarrow:before { + display: inline; + content: " \2192 " +} + +nwarrow:before { + display: inline; + content: " \2196 " +} + +nearrow:before { + display: inline; + content: " \2197 " +} + +/* searrow and swarrow may be switched in Firefox outside of MathML */ + +searrow:before { + display: inline; + content: " \2198 " +} + +/* searrow and swarrow may be switched in Firefox outside of MathML */ + +swarrow:before { + display: inline; + content: " \2199 " +} + +iff:before { + display: inline; + content: " \21D4 " +} + +in:before { + display: inline; + content: " \2208 " +} + +pm:before { + display: inline; + content: " \00B1 " +} + +mathcal { + font-family: "Euclid Math One"; + color: blue; +} + +mathfrak { + font-family: "Euclid Fraktur"; + color: green; +} + +mathbb { + font-family: "Euclid Math Two"; + color: red; +} + +Cd0 { + display: inline; + position: relative; + right: +0.2em; + left: +0.1em; +} + +lbalbr:before { + content: "\{"; +} + +rbalbr:after { + content: "\}"; +} + +array { + display: inline-table; + vertical-align: middle; +} + +arrcols { + display: none; +} + +arrayrow { + display: table-row; +} + +firstacell { + display: table-cell; +} + +arraycell { + display: table-cell; +} + +table, tableb, tablec, tablech { + display: table; + margin: 1em; +} + +tabarg, tabharg { + display: none; +} + +tabular { + display: table; +} + +taburow { + display: table-row; +} + +tr { + display: table-row; +} + +firstcell { + display: table-cell; +} + +tabucell { + display: table-cell; +} + +tabampcell { + display: table-cell; +} + +td { + display: table-cell; +} + +tdp { + display: table-cell; +} + +tdr { + display: table-cell; +} + +langle:before { + display: inline; + content: "\2329"; +} + +rangle:before { + display: inline; + content: "\232A"; +} + +pmod:before { + content: " (mod "; +} + +pmod:after { + content: ") "; +} + +bmod:before { + content: " mod "; +} + +ldq:before { + content: "\201C"; +} + +rdq:after { + content: "\201D"; +} + +lsq:before { + content: "\2018"; +} + +rsq:after { + content: "\2019"; +} + +nabla:before { + content: "\2207"; +} + +uright { + display: inline; + font-size: 0.7em; + position: relative; + top: -1ex; +} + +lright { + display: inline; + font-size: 0.7em; + position: relative; + bottom: -1ex; +} + +uleft { + display: inline; + font-size: 0.7em; + position: relative; + top: -1ex; +} + +lleft { + display: inline; + font-size: 0.7em; + position: relative; + bottom: -1ex; +} + +quad:before { + content: " \00A0\00A0"; +} + +quad:after { + content: "\00A0\00A0 "; +} + +abuts:before { + content: " \21D2 "; +} + +prime:before { + content: "\2032"; +} + +backprime:before { + content: "\2035"; +} + +sprime:before { + content: "\2032"; + font-size: 0.7em; + position: relative; + bottom: -1ex; +} + +dprime:before { + content: "\2033"; + font-size: 0.7em; + position: relative; + bottom: -1ex; +} + +tprime:before { + content: "\2034"; + font-size: 0.7em; + position: relative; + bottom: -1ex; +} + +qprime:before { + content: "\2057"; + font-size: 0.7em; + position: relative; + bottom: -1ex; +} + +bprime:before { + content: "\2035"; + font-size: 0.7em; + position: relative; + bottom: -1ex; +} + +emptyset:before { + content: "\00D8"; +} + +reg:before { + content: "\00AE"; +} + +trade:before { + content: "\2122"; +} + +dag:before { + content: "\2020"; +} + +ddag:before { + content: "\2021"; +} + +backslash:before { + content: "\005C"; +} + +lessdot:before { + content: "\22D6"; +} + +gtrdot:before { + content: "\22D7"; +} + +setminus:before { + content: "\2216"; +} + +absval:before { + content: "|"; +} + +absval:after { + content: "|"; +} + +norm:before { + content: "||"; +} + +norm:after { + content: "||"; +} + +aF { + display: none; +} + +icomma { + display: none; +} + +itimes { + display: none; +} + +lower { + display: inline; + font-size: 0.7em; + position: relative; + bottom: -1ex; +} + +upper { + display: inline; + font-size: 0.7em; + position: relative; + top: -1ex; +} + diff --git a/support/gellmu/webstyle/mxh.css b/support/gellmu/webstyle/mxh.css new file mode 100644 index 0000000000..ac7c682e71 --- /dev/null +++ b/support/gellmu/webstyle/mxh.css @@ -0,0 +1,433 @@ +body { + display: block; + margin: 2ex 1em 2ex 1em; + color: #000033; + background-color: #fcfcfc; + font-family: Arial, sans-serif; + font-size: 1em; +} + +h1 { + display: block; + margin-left: auto; + margin-right: auto; + text-align: center; + color: #000066; + background-color: #fcfcfc; + font-size: 2.00em; +} + + +.display { + display: block; + margin-left: auto; + margin-right: auto; + text-align: center; +} + +.bold { + font-weight: bold; +} + +emph { + font-style: italic; +} + +.bold-italic { + font-style: italic; + font-weight: bold; +} + +.italic { + font-style: italic; +} + +.altemph { + font-family: "luxi sans", freesans, sans-serif; + font-style: oblique; +} + +h2 { + display: block; + font-size: 1.75em; + font-weight: bold; + color: #000066; + background-color: #fcfcfc; +} + +h3 { + display: block; + font-size: 1.50em; + font-weight: bold; + color: #000066; + background-color: #fcfcfc; +} + +h4 { + display: block; + font-size: 1.25em; + font-weight: bold; + color: #000066; + background-color: #fcfcfc; +} + +h5 { + display: block; + font-size: 1.00em; + font-weight: bold; + color: #000066; + background-color: #fcfcfc; +} + +kbd { + display: inline; + font-family: monospace; + font-weight: bold; +} + +p { + margin: 2ex 0em 2ex 0em; +} + +dl, ol, ul { + margin: 1ex 1em 1ex 1em; +} + +dt { + margin-left: 1em; + margin-right: 1em; + margin-bottom: 1ex; +} + +dd { + margin-left: 2em; + margin-right: 1em; + margin-bottom: 1ex; +} + +dl.Menu > dd { + margin-bottom: 2ex; +} + +li { + margin-left: 1em; + margin-right: 1em; + margin-bottom: 1ex; +} + +ul > li { + list-style-type: disc; +} + +ul > li li { + list-style-type: circle; +} + +ul > li li li { + list-style-type: square; +} + +ol.decimal > li { + list-style-type: decimal; + margin-bottom: 1ex; +} + +ol.lower-alpha > li { + list-style-type: lower-alpha; + margin-bottom: 0.5ex; +} + +ol.lower-roman > li { + list-style-type: lower-roman; + margin-bottom: 0.5ex; +} + +ol.upper-alpha > li { + list-style-type: upper-alpha; + margin-bottom: 0.5ex; +} + +dl.verblist { + display: block; + margin: 1ex 2em 1ex 1em; + border-style: none; + padding: 1em 0em 1em 0em; + font-family: monospace; + font-weight: bold; +} + +dl.verblist > dd { + list-style-type: none; + margin: 0ex 0em 0.25ex 0em; +} + +dl.verblist > dd kbd { + font-size: 1em; +} + +dl.tableofcontents > dd { + list-style-type: none; + margin-left: 2em; + margin-right: 2em; + margin-top: 0.5ex; + margin-bottom: 0.5ex; +} + +dl.tableofcontents > dd dd { + list-style-type: none; + margin-top: 0.2ex; + margin-bottom: 0.2ex; +} + +dl.assertion { + margin: 1ex 0em 1ex 0em; +} + +dl.assertion > dt { + margin-left: 0em; + margin-right: 0em; +} + +dl.assertion > dd { + margin-left: 0em; + margin-right: 0em; + font-style: italic; +} + +dl.assertion > dd b { + font-style: normal; + font-weight: bold; +} + +dl.definition { + margin: 1ex 0em 1ex 0em; +} + +dl.definition > dt { + margin-left: 0em; + margin-right: 0em; +} + +dl.definition > dd { + margin-left: 0em; + margin-right: 0em; + font-style: normal; +} + +table { + border-collapse: collapse; +} + +.display table { + margin-left: auto; + margin-right: auto; +} + +table tbody { + text-align: left; +} + +div { + margin: 1em 0 1em 0; +} + +div.tableofcontents { + margin: 2ex 2em 2ex 2em; +} + +div.section { + margin: 3em 0 3em 0; +} + +div.subsection { + margin: 2em 0 2em 0; +} + +div.subsubsection { + margin: 1em 0 1em 0; +} + +table.gdisplay { + margin-left: auto; + margin-right: auto; +} + +td { + empty-cells: show; + padding-left: 0.6em; + padding-right: 0.6em; + padding-top: 0.4ex; + padding-bottom: 0.4ex; +} + +table.boxed { + border-style: solid; + border-width: 0.1em; +} + +table.boxed td { + border-style: solid; + border-width: 0.1em; +} + +table.chart { + margin: 0px; +} + +table.chart > tbody >tr > td:first-child { + padding-left: 0px; + font-size: 1.25em; + color: #000066; + background-color: inherit; +} + +tr.boxed { + border-top-style: solid; + border-top-width: 0.1em; + border-bottom-style: solid; + border-bottom-width: 0.1em; +} + +tr.truled { + border-top-style: solid; + border-top-width: 0.1em; +} + +tr.bruled { + border-bottom-style: solid; + border-bottom-width: 0.1em; +} + +td.boxed { + border-left-style: solid; + border-left-width: 0.1em; + border-right-style: solid; + border-right-width: 0.1em; +} + +td.lruled { + border-left-style: solid; + border-left-width: 0.1em; +} + +td.rruled { + border-right-style: solid; + border-right-width: 0.1em; +} + +pre { + font-family: monospace; + font-weight: bold; + font-size: 0.8em; +} + +mlabeledtr { + display: table-row; +} + +math { + white-space: nowrap; +} + +math[class="display"], math[display="block"], math[mode="display"] { + display: block; + margin-top: 1ex; + margin-bottom: 1ex; + margin-left: auto; + margin-right: auto; + text-align: center; +} + +mlabeledtr > mtd:first-child { + color: #005500; + background-color: #fcfcfc; +} + +mtr[class="labeled"] > mtd:first-child { + color: #005500; + background-color: #fcfcfc; +} + +mi[class="invisible"] { + display: none; +} + +[mathvariant="script"] { + font-family: "Euclid Math One", serif; +} +[mathvariant="fraktur"] { + font-family: "Euclid Fraktur", serif; +} +[mathvariant="double-struck"] { + font-family: "Euclid Math Two", serif; +} + +a:link { + color: #0000B0; + background-color: #fcfcfc; +} + +a:visited { + color: #000077; + background-color: #fcfcfc; +} + +a:active { + color: #B00000; + background-color: #fcfc00; +} + +a:hover { + color: #800000; + background-color: #fcfc00; +} + +mtd[columnalign="left"] { + text-align: left; +} + +mtd[columnalign="center"] { + text-align: center; +} + +mtd[columnalign="right"] { + text-align: right; +} + +mtable[class="boxed"] { + border-style: solid; + border-width: 0.1em; + padding: 1ex 1em 1ex 1em; +} + +mtable[class="substack"] { + font-size: 0.7em; +} + +mtable[class="substack"] mtr { + margin: 0 ; + padding: 0 ; +} + +mtable[class="substack"] mtr mtd { + margin: 0 ; + padding: 0 ; +} + +mo[class="prime"] { + font-size: 0.6em; + vertical-align: super; +} + +mtext[class="strong"] { + font-weight: bold; +} + +mtext[class="emphasized"] { + font-style: italic; +} + +mtext[class="stringtext"] { + font-family: monospace; +} + -- cgit v1.2.3