% LaTeX \documentclass[leqno]{article} \usepackage{url} \usepackage{graphicx} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsfonts} \usepackage{bm} \usepackage{gellmu} \usepackage[margin=100bp,nohead]{geometry} \setlength{\parskip}{6bp} \setlength{\parindent}{0bp} \thispagestyle{empty} \title{The Use of SGML Entities in GELLMU} \date{21 July 2000} \newlength{\centerskip} \setlength{\centerskip}{\topsep} \newcommand{\hsf}{\hspace*{\fill}} \newcommand{\tdbc}[1]{\hsf\textbf{#1}\hsf} \newenvironment{menulist}{ \begin{list}{}{ \setlength{\topsep}{0bp} \setlength{\labelwidth}{0.03\linewidth} \setlength{\leftmargin}{0.06\linewidth} \setlength{\itemindent}{0bp} \setlength{\itemsep}{-6bp} \setlength{\parsep}{6bp}} }{\end{list}} \newenvironment{Menulist}{ \begin{list}{}{ \setlength{\topsep}{0bp} \setlength{\labelwidth}{0.03\linewidth} \setlength{\leftmargin}{0.06\linewidth} \setlength{\itemindent}{0bp} \setlength{\itemsep}{3bp} \setlength{\parsep}{6bp}} }{\end{list}} \newenvironment{toclist}{\normalsize \begin{list}{}{ }}{\end{list}} \newenvironment{Toclist}{\large \begin{list}{}{ }}{\end{list}} \newenvironment{citations}{ \begin{list}{}{ \setlength{\topsep}{0bp} \setlength{\labelwidth}{0bp} \setlength{\leftmargin}{0.04\linewidth} \setlength{\labelsep}{0bp} \setlength{\itemindent}{-0.2\leftmargin} \setlength{\itemsep}{3bp} \setlength{\parsep}{0bp}} }{\end{list}} \author{William F. Hammond} \begin{document} \begin{center}\LARGE\bfseries{} The Use of SGML Entities in GELLMU \end{center} \begin{center}\Large\bfseries{} \textsl{William F. Hammond} \end{center} \begin{center} \large\bfseries{} 21 July 2000 \end{center} \medskip \section*{1\ \ \label{SU-1}Introduction} \par{\textsc{GELLMU} now has provision for the incorporation of an internal declaration subset with either \textsc{SGML} or direct \textsc{XML} output from the syntactic translator \textsl{gellmu.el}. \ (The didatic \emph{article} document type is first written as \textsc{SGML} and then re-formatted with some normalization, including ``argument naming'', as \textsc{XML}.) } \par{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. \ } \par{As things stand with the didactic document type, all entity expansion takes place when the SGML created by \textsl{gellmu.el} is first parsed. \ } \par{With an appropriate \textsc{SGML} document type defintion, one might provide for an ``internal'' command in the article preamble that spawns an internal declaration subset in the \textsc{XML} image. \ For direct production of \textsc{XML} this is not an issue. \ } \par{These two ways of handling entities could be used in the same document. \ } \section*{2\ \ \label{SU-2}A Few Simple Examples} \par{The quoted phrase at the end of this sentence is produced with entity markup under the name \emph{foo}: ``a \textless{}sample\textgreater{} string''. \ The GELLMU source used for this phrase is \texttt{"\&foo"}. \ } \par{The \textsc{GELLMU} source for the definition of the entity \emph{foo} is \begin{center} \verb+\entity{foo "a &oltc;sample&ogtc; string"}+\ . \ \end{center} 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 \begin{center} \verb+\entity{oltc STARTTAG "ltc"}+\ . \ \end{center} It invokes at parse-time the starttag for the empty element \emph{ltc} in the didactic \textsc{GELLMU} document type that gives rise in most formattings to the character \texttt{`\string<'}. \ Note that this layer of indirection is only required for an \textsc{SGML} (or \textsc{XML}) document that is going to be subjected to a formatting pipeline that involves at least one target language under \textsc{SGML} or \textsc{XML} where an instance of the character \texttt{`\string<'} might not be intended as markup. \ } \par{The \textsc{GELLMU} source for the definition of \emph{foo} translates under \textsl{gellmu.el} to SGML as \begin{center} \verb++\ . \ \end{center} The display of this translation is marked up with still another entity \emph{foosgml}. \ } \end{document}