The GELLMU ArchiveThe Use of SGML Entities in GELLMUWilliam F. Hammond21 July 20001IntroductionGELLMU now has provision for the incorporation of an
internal declaration subset with either SGML or direct XML
output from the syntactic translator gellmu.el (The didatic
article document type is first written as SGML and then
reformatted with some normalization, including argument
naming, as 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 somelike
macro functionalityAs things stand with the didactic document type, all entity expansion
takes place when the SGML created by gellmu.el is first
parsedWith an appropriate SGML document type defintion, one might
provide for an internal command in the article preamble
that spawns an internal declaration subset in the XML image
For direct production of XML this is not an issueThese two ways of handling entities could be used in the same
document2A Few Simple ExamplesThe quoted phrase at the end of this sentence is produced with entity
markup under the name foo: a sample string The GELLMU source
used for this phrase is fooThe GELLMU source for the definition of the entity foo
is entity{foo "a oltc;sampleogtc; string"} Note that sample is not
markup The expansion of this definition uses another entity
fooglm The entity oltc is defined in the source with
entityoltc STARTTAG "ltc"
It invokes at parsetime the starttag for the empty element ltc
in the didactic GELLMU document type that gives rise in most
formattings to the character Note that this layer of
indirection is only required for an SGML (or XML) document
that is going to be subjected to a formatting pipeline that involves
at least one target language under SGML or XML where
an instance of the character might not be intended as markupThe GELLMU source for the definition of foo translates
under gellmu.el to SGML as !ENTITY foo "a oltc;sampleogtc; string" The
display of this translation is marked up with still another entity
foosgml