% LaTeX \documentclass[leqno]{article} \usepackage[utf8x]{inputenc} \usepackage{ucs} \usepackage{url} \usepackage{braket} \usepackage{graphicx} \usepackage[intlimits]{amsmath} \usepackage{amssymb} \usepackage{amsfonts} \usepackage{bm} \usepackage{gellmu2} \usepackage[margin=100bp,nohead]{geometry} \setlength{\parskip}{6bp} \setlength{\parindent}{0bp} \pagestyle{plain} \thispagestyle{empty} \title{A Brief Introduction to Regular GELLMU} \date{September 2000\$0.25\baselineskip] Last revision: \today{} \\[0.25\baselineskip] (still needs revision as well as a better proof reading)} \newlength{\centerskip} \setlength{\centerskip}{\topsep} \newcommand{\hsf}{\hspace*{\fill}} \newcommand{\tdbc}[1]{\hsf\textbf{#1}\hsf} \author{William F. Hammond\\{}Department of Mathematics \& Statistics\\[0.25\baselineskip] The University at Albany\\[0.25\baselineskip] Albany, NY 12222, USA} \begin{document} \begin{center} {\LARGE\bfseries{}A Brief Introduction to Regular GELLMU} \\[4\partopsep]{\Large\bfseries{}\textsl{William F. Hammond}} \\[0.25\baselineskip]{\large\bfseries{}Department of Mathematics \& Statistics\\[0.25\baselineskip] The University at Albany\\[0.25\baselineskip] Albany, NY 12222, USA} \\[4\partopsep]{\large\bfseries{}September 2000\\[0.25\baselineskip] Last revision: \today{} \\[0.25\baselineskip] (still needs revision as well as a better proof reading)} \\[4\partopsep]{\small\bfseries{}D R A F T } \end{center} \vspace*{-\centerskip} \begin{quotation} \textbf{Note:} Since this document was written, there have been some enhancements to the system it describes. For more information see the \emph{\textsc{GELLMU} Manual}\footnote{URI: http://www.albany.edu/\textasciitilde{}hammond/gellmu/glman/glman.html}. \end{quotation}\section*{Table of Contents} \begin{Toclist} \item[]{1\ \ Another Mark-Up Language?\dotfill{}~\pageref{SU-1}} \item[]{2\ \ How did \textsc{GELLMU} arise?\dotfill{}~\pageref{SU-2}} \item[]{3\ \ Translation of \textsc{GELLMU} Markup\dotfill{}~\pageref{SU-3}} \item[]{4\ \ Advanced \textsc{GELLMU} vs. Basic \textsc{GELLMU}\dotfill{}~\pageref{SU-4}} \item[]{5\ \ Some Fundamentals on Regular \textsc{GELLMU}\dotfill{}~\pageref{SU-5}} \begin{toclist}\normalsize \item[]{5.1\ \ The Markup Commands\dotfill{}~\pageref{SU-5.1}} \item[]{5.2\ \ Multiple Argument/Option Syntax\dotfill{}~\pageref{SU-5.2}} \item[]{5.3\ \ Mathematics\dotfill{}~\pageref{SU-5.3}} \item[]{5.4\ \ Examples\dotfill{}~\pageref{SU-5.4}} \end{toclist} \item[]{6\ \ Notes\dotfill{}~\pageref{SU-6}} \end{Toclist} \section*{1\ \ \label{SU-1}Another Mark-Up Language?} \par{The purpose of \emph{regular} \textsc{GELLMU}\footnote{\textsc{GELLMU} stands for Generalized Extensible \LaTeX{}-like MarkUp''} is to provide a markup language with provision for mathematics under a system design that is \emph{structured enough} to admit rigorous, modularly-staged, automatic processing into many other formats while at the same time being a comfortable input format for those accustomed to using \LaTeX{}. There is not a set list of translation target formats. Examples of possible translation targets include: \begin{itemize} \item \LaTeX{} . \item \textsc{HTML}. \item \textsc{HTML} as enhanced by \textsc{MathML}. \item \textsc{Texinfo}. \item \textsc{ME} (a *-roff package). \item \texttt{text/plain} (for optimal de-\TeX{}ing''). \item audio stream. \item search engine. \item index engine. \end{itemize} } \par{\textsc{GELLMU} is not \LaTeX{} although its style of markup resembles that of \LaTeX{}. An example of how there is provision for enrichment of information'' lies in the markup used for a quoted phrase in the source\footnote{URI: http://www.albany.edu/\textasciitilde{}hammond/gellmu/igl/iglm.glm} for this document.\footnote{The base for relative \textsc{URI} references given here may be found at the end of the printed form of this document.} Whereas the usual \LaTeX{} way of writing the phrase in the last sentence would be \begin{center} \texttt{enrichment of information''}, \end{center} and that markup would be meaningful in regular \textsc{GELLMU}, the markup \begin{center} \texttt{}\verb+\+\texttt{quophrase}\verb+{+\texttt{enrichment of information}\verb+}+\texttt{} \end{center} can be detected more easily by a processor looking for \emph{quophrase} contents, while the separate double-quoting indicators may or may not be adequate for such a processor seeking to glean similar information. Furthermore, the effort by a processor to glean such information might be spoiled by the occurrence of one or more unbalanced double-quoting indicators. Possibly even more useful ways of marking the same phrase that still would yield the same printed appearance, depending on the overall context, might be: \begin{center} \texttt{}\verb+\+\texttt{jargon}\verb+{+\texttt{enrichment of information}\verb+}+\texttt{} \end{center} or \begin{center} \texttt{}\verb+\+\texttt{topic}\verb+{+\texttt{enrichment of information}\verb+}+\texttt{}. \end{center} } \par{An important characteristic of this markup is that the processing of a document always begins with a faithful translation to an instance under the umbrella of Standard Generalized Markup Language (\textsc{SGML})''. It is widely known in the text processing community (though not widely observed in the mathematical community) that sufficiently structured markup languages under \textsc{SGML} can be robustly converted to many other formats. \textsc{GELLMU} has been designed to provide a bridge from LaTeX-like markup to the world of \textsc{SGML}. } \par{The translation from source markup to \textsc{SGML} markup is performed by my program called the \textsc{GELLMU} Syntactic Translator. Once that translation is performed the author's document exists in the world of \textsc{SGML}, and in that world many programs, almost all of which are very highly configurable, are available for automatic processing. } \par{Beyond the syntactic translation from source markup to \textsc{SGML} the first release of materials from this project will contain a didactic \emph{article} \textsc{SGML} document type, and some of the statements herein are, for illustration, non-explicit allusions to the article document type, which is just one example of an \textsc{SGML} document type in the \emph{advanced} \textsc{GELLMU} category. } \par{Realistically today, \textsc{SGML} is a document standard for in-house work, and its subset'' \textsc{XML}\footnote{\emph{Subcategory} might be a better term here than \emph{subset}.} has become the only shareable form of \textsc{SGML}. Major \textsc{SGML} document types such as \emph{DocBook} and \emph{TEI} have canonical translations to \textsc{XML}. Still one does not abandon \textsc{SGML} in an authoring environment, because some of the features of full \textsc{SGML} provide substantial convenience for authors. } \par{What added convenience there is in using \LaTeX{}-like markup as a writing interface for \textsc{XML} is greatly aided by taking advantage of a few of the features in full \textsc{SGML} that are not available in \textsc{XML}. On the other hand, \emph{basic} \textsc{GELLMU} is available for the direct preparation of an \textsc{XML} document as the direct output of the syntactic translator. } \section*{2\ \ \label{SU-2}How did GELLMU arise?} \par{Aside from markup languages under \textsc{SGML} another example of a markup language that is structured enough to admit robust conversion is \textsc{Texinfo}, which is the markup language of The \textsc{GNU}\footnote{URI: http://www.gnu.org/} Documentation System. The Info'' side of \textsc{Texinfo} is the \emph{Info} hypertext self-documentation system within the popular fully programmable editing system \emph{GNU Emacs}. Documents authored in \textsc{Texinfo} can be automatically converted into both \emph{Info} (for viewing in an \emph{GNU Emacs} buffer) and \TeX{} (for printing). } \par{The \emph{Info} system is a hypertext system that pre-dates the World Wide Web (WWW) and the latter's default presentation markup language known as \textsc{HTML}, which falls under the \textsc{SGML} regime. One should, therefore, not be surprised to learn that with the dawn of \textsc{HTML} Lionel Cons of \textsc{CERN} (the birthplace of the World Wide Web) furnished the world with a \textsc{PERL} program for converting a \textsc{Texinfo} document into \textsc{HTML} with (internal) hypertext references. } \par{Although \textsc{Texinfo} is a \TeX{}-like markup language, it makes wide use of the character \verb+@+ as command-introducer where in \TeX{} one would (normally) use \verb+\+. It seems that many authors find this superficial difference uncomfortable. Ulrik Vieth of The \TeX{} Users Group (\textsc{TUG})\footnote{URI: http://www.tug.org/} wrote an \emph{Emacs Lisp} program that served to convert into \textsc{Texinfo} a \LaTeX{} file written in January 1998 as the draft report\footnote{URI: ftp://ctan.tug.org/tex-archive/tds/draft-standard/tds-0.9995.tar.gz} of the \textsc{TUG} Working Group on a directory structure for \TeX{} systems. } \par{This example, which was an \emph{ad hoc} conversion, played an important role in my arrival at this design for a bridge from \LaTeX{} to \textsc{SGML}. } \section*{3\ \ \label{SU-3}Translation of GELLMU Markup} \par{\textsc{GELLMU} is essentially, but for appearance, a markup language under \textsc{SGML}. This means that after a document is translated by the syntactic translator into the corresponding markup language falling formally under \textsc{SGML}, any general-purpose \textsc{SGML} processing tool can be used. } \par{The project's prototype production system is built around \emph{Regular \textsc{GELLMU}}, which uses features for enhanced authoring convenience in the syntactic translator that require some assumptions about the \textsc{SGML} document type under which the author is writing. \emph{Basic \textsc{GELLMU}}, on the other hand, may be used as a simple \LaTeX{}-like markup interface with a large number of document types, including \textsc{XML} document types. } \par{Two \textsc{SGML} processing tools that are easily available form the core of the prototype production system. \begin{enumerate} \item James Clark's \texttt{nsgmls}, an \textsc{SGML} parser that is part of his \texttt{SP} library package\footnote{URI: ftp://ftp.jclark.com/pub/sp/}. \item David Megginson's \textsc{PERL} program \textsl{sgmlspl} that is an interface for his Perl library \textsl{SGMLSPM}. It may be found at CPAN\footnote{URI: http://www.cpan.org/modules/by-authors/David\_Megginson/} or at his office\footnote{URI: http://www.megginson.com/}. \textsl{sgmlspl} is a programmer-friendly interface for writing simple or complex event-driven'' translators (to other formats) that operate on \texttt{nsgmls} output. \end{enumerate} } \par{In the prototype production system a document under the didactic \emph{article} \textsc{SGML} document type made with the \textsc{GELLMU} Syntactic Translator from \LaTeX{}-like source markup is parsed by \textsl{nsgmls} and then passed through a simple \textsl{sgmlspl} translation to yield an instance under the corresponding \textsc{XML} document type. } \par{In the prototype production system the \textsc{XML} version of an article may be translated either to \textsc{HTML} or to \LaTeX{}. Other translations are possible. The two existing translations are done with \textsl{sgmlspl}. } \par{But a number of other freely available translation tools may be considered for the \textsc{XML} version of a \textsc{GELLMU} article including: \begin{enumerate} \item James Clark's \textsl{jade}, an engine for \textsc{DSSSL} with a wide variety of possible translation targets. \item James Clark's \textsl{xt}, an \textsc{XSLT} engine also with a wide variety of possible translation targets. \item David Carlisle's \textsl{xmltex}, a package for \textsl{TeX}, the Program, that enables its user to write what amounts to a style sheet'' in \TeX{}, rather than, say, \textsc{XSL}, for formatting (with its own parse) an instance of an \textsc{XML} document type in \TeX{} (actually \textsc{DVI} since one does not get a chance to see'' a \TeX{} source image). \end{enumerate} } \section*{4\ \ \label{SU-4}Advanced GELLMU vs. Basic GELLMU} \par{This document is about the \emph{regular} \textsc{GELLMU}. It is important first to know a bit about \emph{basic} mode and \emph{advanced} mode. What is called \emph{regular} in this document is an instance of \emph{advanced} mode. The term \emph{regular} is being used here to reference the didactic \emph{article} document type, which is an \textsc{SGML} document type that admits the more elaborate and succinct handling of \emph{advanced} mode while not being in any way incompatible with \emph{basic} mode. } \par{Neither the basic nor the advanced mode involves in any way adoption of the language of \LaTeX{}. (But many command names under the didactic document type, mimic \LaTeX{} command names.) } \par{To use either \emph{basic} or \emph{advanced} mode one must be familiar with the \textsc{SGML} document type for which one is writing. Ordinary \textsc{HTML} is an example where the use of \emph{basic} mode is indicated. Only a very few of the features in advanced markup not part of basic markup\footnote{With several minor exceptions, one related to the direct writing of \textsc{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 \texttt{\textbackslash{}'}, everything about basic mode also applies to advanced mode.} make any sense for use in the direct preparation of \textsc{HTML} with \LaTeX{}-like input. } \par{Basic \textsc{GELLMU} uses the \LaTeX{} special characters \texttt{}\verb+\+\texttt{'}, \texttt{}\verb+{+\texttt{'}, and \texttt{}\verb+}+\texttt{'} along with \LaTeX{}-like argument/option syntax, where braces immediately following a command name indicate command arguments and square brackets, i.e., \texttt{['} and \texttt{]'}, indicate command options. A command corresponds to an \textsc{SGML} element, and in basic mode a command may have at most one argument, the content of which corresponds to \textsc{SGML} element content, and at most one option, the content of which corresponds to a list of \textsc{SGML} attribute specifications. Thus for example, in basic mode for \textsc{HTML} one may use the markup \begin{center} \verb+\a[href="http://www.w3.org/"]{The World Wide Web Consortium}+ \end{center} to form the \textsc{HTML} anchor: \begin{center} \verb+The World Wide Web Consortium+ \ . \end{center} (The formation of anchors with the didactic document type in advanced mode is slightly more complicated because the characters \texttt{='} and \texttt{/'}, 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 \emph{multiple} argument/option syntax, which is not part of basic mode.) } \par{An example of the distinction between basic and advanced \textsc{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 classical \textsc{HTML} one must\footnote{There is a way, with the setting of several variables for the syntactic translator, to have blank lines begin new paragraphs in basic input for \textsc{HTML}} use \texttt{"}\verb+\+\texttt{p"} to begin a paragraph, and for the \textsc{XML} version of \textsc{HTML} one must also provide markup for the end of every paragraph, which may be done in several ways. } \par{For some of the details on using the basic markup with \textsc{HTML} see \emph{Using the \textsc{GELLMU} Syntactic Translator to Write \textsc{HTML}}\footnote{URI: http://www.albany.edu/\textasciitilde{}hammond/gellmu/ghtml.html}. } \section*{5\ \ \label{SU-5}Some Fundamentals on Regular GELLMU} \subsection*{5.1\ \ \label{SU-5.1}The Markup Commands} \par{There are several kinds of commands: } \begin{itemize} \item \textbf{A maximal string introduced by} \verb+\+ \textbf{followed by a letter\footnote{For the first alpha release letter'' means something matching the regular expression \texttt{"[A-Za-z]"}. This will not be a limitation of the syntactic translator after the alpha releases. I believe that \textsl{GNU Emacs}, from version 20, is fully capable of meeting the needs of \textsc{GELLMU} for supporting international character sets. At present, it is possible to use \textsl{Emacs} word constituent characters'' in names defined with \emph{newcommand}, and there is no reason why the definition strings cannot involve standard \textsc{SGML} entity notation. It is also possible to define symbolic \textsc{SGML} entities in the \textsc{SGML} internal declaration subset, which is the content of an option (at most one) that follows the unique argument to the meta-command \texttt{"\textbackslash{}documenttype"}. Additionally, the \textsc{SGML} version of the didactic \emph{article} document type provides commands for the document preamble that may be used to construct an internal declaration subset for the \textsc{XML} version of the document. (Of course, someone using this markup to edit directly for a document type under \textsc{XML} would need to use the \texttt{"\textbackslash{}documenttype"} option provided for the \textsc{SGML} internal declaration subset.)} and otherwise consisting only of letters and numbers.} \textbf{The first number, if any, must not be 0'' since such names are reserved for use by the syntactic translator.} \newline{} Command names are case sensitive. Such a command is a \emph{container}, corresponding to an \textsc{SGML} \emph{element}, if it is immediately followed, without intervening white space, by the character \verb+{+. In that case the delimited zone of containment normally ends with the subsequent balancing character'' \verb+}+. (\LaTeX{}-like multiple argument/option chains deserve more discussion; for now it will suffice to point out that the use of the \verb+\anch+ command in this document for making anchors'' is an example, and, of course, \LaTeX{}'s \verb+\frac+ command is another example. For the present discussion these commands are considered to be containers.) Such a command corresponds to an \textsc{SGML} \emph{defined-empty element} if it is followed immediately without intervening white space by the character \verb+;+. In any other case there is syntactical ambiguity. However, the syntactic translator will produce a corresponding \textsc{SGML} open tag unless the logical variable \emph{gellmu-xml-strict} has been set. (This variable is normally not set for advanced \textsc{GELLMU}.) \item \textbf{Certain single characters.} \newline{} \verb+\+, \verb+{+, \verb+}+, \verb+^+, \verb+_+, \verb++, \verb+%+, and \verb+~+ have command meanings that are similar to their meanings in \LaTeX{}. The characters \verb+;+ and \verb+:+ are ordinary characters that have special meaning at the end of a command name. The character \verb+#+ is also a special character used, as with \LaTeX{}, in \emph{newcommand} templates. In source for the didactic \emph{article} document type any non-alpha-numeric \textsc{ASCII} character may be escaped (referenced for itself) with a named command, e.g. \verb+%+ may be referenced for itself as \verb+\pct;+. This is \textbf{necessary} in order to provide delayed evaluation for ultimate translation to one of many possible ultimate formats. \par{The following language meanings apply to both basic and regular markup: \begin{enumerate} \item \verb+"\"+: \textbf{Command introducer}. Escape in basic mode: \verb+"\\"+. This escape is incorrect in regular mode. For the didactic \emph{article} document type the escape is \verb+"\bsl;"+. For other document types one may resort to an entity reference if there is an aversion to the provision of a corresponding defined-empty element or if one lacks control of the document type. \item \verb+"{"+: \textbf{Command argument opener}. Escape: \verb+"\{"+. \item \verb+"}"+: \textbf{Command argument closer}. Escape: \verb+"\}"+. \item \verb+"["+: \textbf{Command option opener}. \item \verb+"]"+: \textbf{Command option closer}. \item \verb+";"+: \textbf{Command terminator} for commands corresponding to defined-empty \textsc{SGML} elements; otherwise 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 \texttt{;'} as an entity reference terminator in \textsc{HTML}. \item \verb+":"+: \textbf{Special purpose command terminator} used for indicating the close of a command-zone; otherwise an ordinary character. Its use as a command terminator is invisible. \item \verb+"%"+: \textbf{Comment introducer} (in force to end of line). \end{enumerate} } \par{Any command is terminated by a non-alpha-numeric character. There is syntactic ambiguity unless the terminator is one of \texttt{}\verb+{+\texttt{'}, \texttt{['}, \texttt{;'}, or \texttt{:'}. This kind of syntactic ambiguity is not permitted in the direct editing for an \textsc{XML} document type with \textsc{GELLMU} input. The terminator can be a blank space, but, if so, the blank space becomes invisible. } \par{The following language meanings apply to regular markup with allusion to the didactic \emph{article} document type. \begin{enumerate} \item \verb+"~"+: \textbf{Non-breaking interword space}. Equivalent: \verb+\nbs;+, cf. \verb+ + in \textsc{HTML}. \item \verb+"^"+: \textbf{Superscript command}. Equivalent: \verb+\sup+. \item \verb+"_"+: \textbf{Subscript command}. Equivalent: \verb+\sub+. \item \verb+"&"+: \textbf{Dual use: tabular cells and entity introducer}. \texttt{\&'} introduces an entity reference if it is followed by anything other than white space. It is used, as in \LaTeX{}, as a \emph{tabular} cell delineator when it is followed by white space. \item \verb+""+: \textbf{Toggle inline math mode}. \newline{} Equivalent: \begin{menulist} \item \verb+"\tmath{ . . . }"+ \end{menulist} Nearly equivalent: \begin{menulist} \item \verb+"$$. . .$$"+ or \item \verb+"\math{ . . . }"+.\footnote{It is possible to merge the inline \emph{math} and \emph{tmath} zones at any level of processing beyond the syntactic translator. (These are indeed the same in \LaTeX{}.) The syntactic translator resists the temptation here to go beyond syntax, and with the didactic \emph{article} document type the formatting to \LaTeX{} inserts the \LaTeX{} markup \texttt{"\textbackslash{},"} for a small horizontal space before and after \emph{math}, but not before and after \emph{tmath}.} \end{menulist} \end{enumerate} } \item \textbf{Certain strings of plain text in regular \textsc{GELLMU} that are part of legacy practice under \LaTeX{}.} \begin{enumerate} \item \verb+"--"+ \newline{}\textbf{A short dash} as used with a range of numbers, e.g., 1--2. Equivalent: \verb+\rdash+. \item \verb+"---"+ \newline{}\textbf{A long dash} as used for punctuation, e.g., a dash --- like this. Equivalent: \verb+\pdash+. \item \verb+"\ "+ \newline{}\textbf{Blank interword space}. Equivalent: \verb+\spc;+ \item \verb+"\,"+ \newline{}\textbf{Small horizontal space}. Equivalent: \verb+\hsp;+ \item \verb+"\\"+ \newline{}\textbf{A forced line break}. \texttt{"}\verb+\+\texttt{}\verb+\+\texttt{"} may be used at the end of a line of input for a forced line break. In a \emph{tabular} environment (with the didactic \emph{article} document type, as in \LaTeX{}) it begins a new \emph{tabular} row. Any other use is deprecated, and will result in translation to the defined-empty element \emph{bsl} corresponding to the \textsc{ASCII} character \texttt{}\verb+\+\texttt{'} with a warning from the syntactic translator. The use of \emph{tabular} is deprecated and is not supported beyond lrc''. Use \emph{table}, which is not similar to \LaTeX{}'s \emph{table}, instead of \emph{tabular}. Equivalents: \verb+\brk;+ for a line break outside of a \emph{tabular} environment.\footnote{The syntactic translator simply outputs the \textsc{SGML} defined-empty element \emph{brk0}, which belongs to its reserved name space. The dual use of \emph{brk0} involves some \textsc{SGML} chicanery that is resolved during translation to the \textsc{XML} version of the \emph{article} document type, where \emph{tabular} is converted to \emph{table} and non-tabular use of \emph{brk0} is converted to \emph{brk}.} \item A blank line. \newline{}\textbf{Begin new paragraph} command. Equivalent: \verb+\parb+. Nearly equivalent: \verb+\par+. \item \verb+""+ \newline{}\textbf{Left (double) quotation mark}. Equivalent: \verb+\ldq+. \item \verb+"''"+ \newline{}\textbf{Right (double) quotation mark}. Equivalent: \verb+\rdq+. \item \verb+"$$"+ \newline{}\textbf{Begin} \emph{math mode} \textbf{command}. Equivalent: \verb+\begin{math}+. \item \verb+"$$"+ \newline{}\textbf{End} \emph{math mode} \textbf{command}. Equivalent: \verb+\end{math}+. \item \verb+"\["+ \newline{}\textbf{Begin} \emph{displaymath mode} \textbf{command}. Equivalent: \verb+\begin{displaymath}+. \item \verb+"$"+ \newline{}\textbf{End} \emph{displaymath mode} \textbf{command}. Equivalent: \verb+\end{displaymath}+. \end{enumerate} \item \texttt{}\verb+\+\texttt{begin}\verb+{+\texttt{}\emph{name}\texttt{}\verb+}+\texttt{} \texttt{. . .} \texttt{}\verb+\+\texttt{end}\verb+{+\texttt{}\emph{name}\texttt{}\verb+}+\texttt{} \par{This usage is equivalent to \texttt{\texttt{"}}\verb+\+\texttt{}\emph{name} \texttt{. . .} \texttt{}\verb+\+\texttt{}\emph{name}\texttt{:\texttt{"}}, which, in turn, is equivalent to \texttt{\texttt{"}}\verb+\+\texttt{}\emph{name}\texttt{}\verb+{+\texttt{} \texttt{...} \texttt{}\verb+}+\texttt{\texttt{"}}. } \end{itemize} \subsection*{5.2\ \ \label{SU-5.2}Multiple Argument/Option Syntax} \par{An essential point in the present design is that the whole system is built from components, each of which has its own function\footnote{In the prototype production system based on the didactic \emph{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 \textsc{GELLMU} system is being designed or enhanced. As with \LaTeX{}, enhancement is an ongoing process. }. Consistent with this design the syntactic translator operates with knowledge of syntax but little or no knowledge of language. } \par{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 \textsc{SGML} and \textsc{XML}. } \par{What are the rules for converting the multiple argument/option syntax in source markup into \textsc{SGML}? Direct conversion by the syntactic translator of this type of usage into \textsc{XML} is not available because such conversion requires some language knowledge and the program does not operate with knowledge of language at that level. One obtains an \textsc{XML} version of a document in the prototype production system by using a translator with minimal knowledge of the command vocabulary to create the \textsc{XML} version from an \textsc{SGML} version that is the immediate output of the syntactic translator. } \par{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., \texttt{}\verb+{+\texttt{'} and \texttt{}\verb+}+\texttt{'} and options by square brackets, i.e., \texttt{['} and \texttt{]'}. 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. } \par{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 \emph{ag0} element and each option to an \emph{op0} element lying in \textsc{GELLMU}'s reserved name space. There are two exceptional cases. \begin{enumerate} \item The first argument or option is an option inside which the very first character is a colon, i.e., \texttt{:'}. This is the method provided in advanced mode for the direct entry of an \textsc{SGML} attribute sequence. The entire contents of the option string, apart from the leading \texttt{:'}, which is discarded, are understood to be a sequence of \textsc{SGML} attributes for the \textsc{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 \emph{attribute option} is not treated as an \emph{op0} element. In particular, an attribute option is correctly followed immediately by a semi-colon, i.e., the character \texttt{;'}, if and only if the corresponding \textsc{SGML} element is a defined-empty element under the \textsc{SGML} document type. Since \textsc{SGML} attributes correspond to very little of classical \LaTeX{}, attribute options may be entirely ignored. \item 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 \emph{ag0} wrapper. \end{enumerate} } \subsection*{5.3\ \ \label{SU-5.3}Mathematics} \par{The Greek letter $$\Gamma{}$$ is marked, up as in \LaTeX{}, with \begin{center} \verb+\Gamma+. \end{center} } \par{The didactic \emph{article} document type provides mathematical markup that is similar to that of \LaTeX{}. For example, one may use the markup \begin{center} \texttt{}\verb+\+\texttt{[ 2\string^}\verb+{+\texttt{p-1}\verb+}+\texttt{ }\verb+\+\texttt{equiv 1 }\verb+\+\texttt{pmod}\verb+{+\texttt{p\string^2}\verb+}+\texttt{ }\verb+\+\texttt{eos}\verb+\+\texttt{]} \end{center} to speak of the congruence $2^{p-1} \equiv{} 1 \pmod{p^{2}} \ \ .$ In this example the markup \texttt{"}\verb+\+\texttt{eos"} is a formal end-of-sentence\footnote{Regular \textsc{GELLMU} recognizes \texttt{.'} followed by two blank spaces or by a newline as ends-of-sentence markup when these occur outside of mathematical contexts.}. } \par{In a \LaTeX{} math environment, input text \texttt{abc}'' is set the same as the the input text `\texttt{a b c}'' following the presumption that each glyph is a separate symbol. At one point I had planned to provide for a distinction between these two forms of input for \emph{article}. However, I am concerned about author confusion; so there will be provision for having \texttt{"abc"} be a math symbol, but an instance will be invoked as \texttt{"}\verb+\+\texttt{abc"}. } \par{In math mode all symbols are assumed to be single-characters as in \LaTeX{}. A \verb+\mathsym+ command (part of language design that, for the moment, has no extant implementation) in the document preamble may be used to specify that a string is to be regarded as a single mathematical entity whenever it occurs in math mode. This contrasts with \LaTeX{} in that there is no formal declaration of math symbols. } \par{\emph{mathsym} will be a variant of \emph{newcommand}, which is a meta-command that is handled entirely by the syntactic translator with no trace in the output. However, the design of \emph{mathsym}, which will also be a meta-command but which will leave marks in the output, is not yet decided. The design issues surround how to provide the author who is its user with fexible open means of planting semantic information in the output without undue verbosity. The syntax might be simply \begin{center} \texttt{}\verb+\+\texttt{mathsym}\verb+{+\texttt{}\emph{symbol-name}\texttt{}\verb+}+\texttt{} \texttt{}\verb+{+\texttt{}\emph{presentation-defintion}\texttt{}\verb+}+\texttt{} \texttt{[}\emph{semantic-information-without-markup}\texttt{]} \end{center} Omitting the option could make author usage equivalent to that of \emph{newcommand}, but still trace information planted in the output of the syntactic translator could be sufficient that in the future a derived \textsc{MathML} object or a derived \textsc{XML} formatted object produced by translation and viewed in \textsl{Mozilla}\footnote{URI: http://www.mozilla.org/} might enable the reader to ascertain the \emph{symbol-name} and then launch a search for other occurrences. The option would serve as a mechanism for the author to pass semantic enrichment information to downstream formatters. } \subsection*{5.4\ \ \label{SU-5.4}Examples} \par{The following table refers to the didatic \emph{article} document type. It demonstrates how source is translated by the \textsc{GELLMU} Syntactic Translator to the \textsc{SGML} version of \emph{article} and from there is translated using \textsl{sgmlspl} to the \textsc{XML} version of \emph{article}. \begin{center} \begin{tabular}{ll} {}\tdbc{Source} & \texttt{}\verb+\+\texttt{emph}\verb+{+\texttt{this}\verb+}+\texttt{} \\ {}\tdbc{\textsc{SGML}} & \texttt{\stringthis\string} \\ {}\tdbc{\textsc{XML}} & \texttt{\stringthis\string} \\ \ {}~\hsf \\ {}\tdbc{Source} & \texttt{}\verb+\+\texttt{tex;} \\ {}\tdbc{\textsc{SGML}} & \texttt{\string} \\ {}\tdbc{\textsc{XML}} & \texttt{\string} \\ \ {}~\hsf \\ {}\tdbc{Source} & \texttt{\$}\verb+\+\texttt{frac}\verb+{+\texttt{2}\verb+}+\texttt{}\verb+{+\texttt{3}\verb+}+\texttt{ \$} \\ {}\tdbc{\textsc{SGML}} & \texttt{\string \string\string2\string\string3\string \string} \\ {}\tdbc{\textsc{XML}} & \texttt{\string \string\string2\string\string3\string\string\string} \\ \ {}~\hsf \\ {}\tdbc{Source} & \texttt{}\verb+\+\texttt{anch[href="nil"]}\verb+{+\texttt{Null}\verb+}+\texttt{}\verb+\+\texttt{anch:} \\ {}\tdbc{\textsc{SGML}} & \texttt{\string\stringhref\string"nil"\string\stringNull\string\string} \\ {}\tdbc{\textsc{XML}} & \texttt{\string\stringhref="nil"\string\stringNull\string\string} \end{tabular} \end{center} } \par{One may find many other examples of \textsc{GELLMU} markup in the project archive\footnote{URI: http://www.albany.edu/\textasciitilde{}hammond/gellmu/}. } \section*{6\ \ \label{SU-6}Notes} \par{Although the meta-command \emph{newcommand}, which is handled internally by the syntactic translator, is now available, the variant meta-command \emph{mathsym} is not yet available. } \par{This document is still at draft stage. } \par{It is itself a \textsc{GELLMU} document. The following versions are available: \begin{menulist} \item source\footnote{URI: http://www.albany.edu/\textasciitilde{}hammond/gellmu/igl/iglm.glm}. \item SGML\footnote{URI: http://www.albany.edu/\textasciitilde{}hammond/gellmu/igl/iglm.sgml}. \item XML\footnote{URI: http://www.albany.edu/\textasciitilde{}hammond/gellmu/igl/iglm.xml}. \item XHTML with MathML\footnote{URI: http://www.albany.edu/\textasciitilde{}hammond/gellmu/igl/iglm.xhtml}. \item classic HTML\footnote{URI: http://www.albany.edu/\textasciitilde{}hammond/gellmu/igl/iglm.html}. \item \LaTeX{}\footnote{URI: http://www.albany.edu/\textasciitilde{}hammond/gellmu/igl/iglm.ltx}. \item DVI\footnote{URI: http://www.albany.edu/\textasciitilde{}hammond/gellmu/igl/iglm.dvi}. \end{menulist} } \end{document}