\documenttype{article}[ \entity{lt CDATA "<"} \entity{gt CDATA ">"} \entity{obsl STARTTAG "bsl"} \entity{oamp STARTTAG "amp"} \entity{oltc STARTTAG "ltc"} \entity{ogtc STARTTAG "gtc"} \entity{foo "a &oltc;sample&ogtc; string"} \entity{fooglm '&obsl;entity{foo "a &oamp;oltc;sample&oamp;ogtc; string"}'} \entity{foosgml '&oltc;!ENTITY foo "a &oamp;oltc;sample&oamp;ogtc; string"&ogtc;'} ] \surtitle{The GELLMU Archive} \title{The Use of SGML Entities in GELLMU} \author{William F. Hammond} \date{21 July 2000} \begin{document} \section{Introduction} \abbr{GELLMU} now has provision for the incorporation of an internal declaration subset with either \abbr{SGML} or direct \abbr{XML} output from the syntactic translator \softw{gellmu.el}. (The didatic \emph{article} document type is first written as \abbr{SGML} and then re-formatted with some normalization, including \quophrase{argument naming}, as \abbr{XML}.) SGML entities do not correspond in any obvious way to classical LaTeX markup. However, as things unfold, it is expected that use of SGML entities may accommodate \emph{some} \latex;-like macro functionality. As things stand with the didactic document type, all entity expansion takes place when the SGML created by \softw{gellmu.el} is first parsed. With an appropriate \abbr{SGML} document type defintion, one might provide for an \quophrase{internal} command in the article preamble that spawns an internal declaration subset in the \abbr{XML} image. For direct production of \abbr{XML} this is not an issue. These two ways of handling entities could be used in the same document. \section{A Few Simple Examples} The quoted phrase at the end of this sentence is produced with entity markup under the name \emph{foo}: \quophrase{&foo}. The GELLMU source used for this phrase is \qquostr{\&foo}. The \abbr{GELLMU} source for the definition of the entity \emph{foo} is \display{\verb{&fooglm;}\ \eos} Note that \emph{sample} is not markup. The expansion of this definition uses another entity \emph{fooglm}. The entity \emph{oltc} is defined in the source with \display{\verb{\bsl;entity\{oltc STARTTAG "ltc"\}}\ \eos} It invokes at parse-time the starttag for the empty element \emph{ltc} in the didactic \abbr{GELLMU} document type that gives rise in most formattings to the character \quochar{\ltc;}. Note that this layer of indirection is only required for an \abbr{SGML} (or \abbr{XML}) document that is going to be subjected to a formatting pipeline that involves at least one target language under \abbr{SGML} or \abbr{XML} where an instance of the character \quochar{\ltc;} might not be intended as markup. The \abbr{GELLMU} source for the definition of \emph{foo} translates under \softw{gellmu.el} to SGML as \display{\verb{&foosgml}\ \eos} The display of this translation is marked up with still another entity \emph{foosgml}. \end{document}