What Kind of Document is This?

William F. Hammond

Department of Mathematics & Statistics The University at Albany Albany, New York 12222 (USA)

1 Some Markup

The following is markup under basic GELLMU for an HTML document:

\documenttype{html}
\newcommand{\h1c}[1]{\h1[align="center"]{#1}}
\newcommand{\qa}[2]{\a[href="#1"]{#2}}
\newcommand{\ua}[1]{\a[href="#1"]{#1}}
\newcommand{\latex}{\em{LaTeX}}
\title{HTML Marked Up with GELLMU}
\h1c{Is \em{This} an HTML Document?}
\p Although this looks, more or less, like a \latex document,
it is really a document written in the HTML language using
\latex-like syntax.
\p
This document may be easily converted to a normal HTML document
using the \em{basic} mode of the GELLMU syntactic translator,
which is an Emacs Lisp program available on the web through
\center{\ua{http://www.albany.edu/~hammond/gellmu/} .}
\p
GELLMU stands for ``Generalized Extensible \latex-Like Markup''.
Its primary purpose is to serve as a bridge for authors from
\latex to the world of XML.
\p
Thus, this usage of GELLMU is basically recreational compared to
its more serious purpose: using \latex-like markup to write
for a much richer XML document type than HTML.  Actually, this
document is written for ``old'' HTML, which is an SGML application
that does not come under XML.  But there is a canonical way to
translate ``old'' HTML to the XML version of HTML.
\p
For more information on writing HTML this way see the short article
\qa{http://www.albany.edu/~hammond/gellmu/ghtml.html}{\em{Using
GELLMU to Write HTML}}.
\p
For more information on the serious purpose of GELLMU please visit
\qa{http://www.albany.edu/~hammond/gellmu/}{The GELLMU Web}.

2 Approximate Rendering

Now follows a rendering of how the HTML should appear.

Is This an HTML Document?

Although this looks, more or less, like a L^{A}TEX document, it is really a document written in the HTML language using L^{A}TEX-like syntax.

This document may be easily converted to a normal HTML document using the basic mode of the GELLMU syntactic translator, which is an Emacs Lisp program available on the web through

                     http://www.albany.edu/~hammond/gellmu/ .

GELLMU stands for “Generalized Extensible L^{A}TEX-Like Markup”. Its primary purpose is to serve as a bridge for authors from L^{A}TEX to the world of XML.

Thus, this usage of GELLMU is basically recreational compared to its more serious purpose: using L^{A}TEX-like markup to write for a much richer XML document type than HTML. Actually, this document is written for “old” HTML, which is an SGML application that does not come under XML. But there is a canonical way to translate “old” HTML to the XML version of HTML.

For more information on writing HTML this way see the short article Using GELLMU to Write HTML^{1}.

For more information on the serious purpose of GELLMU please visit The GELLMU Web^{2}.

3 What is Going On?

First observe that the verbatim section is an HTML document marked up with GELLMU. It may be converted to HTML with

              emacs -batch -l gellmu.elc -f gellmu-html htease.glm

if it is saved to the name htease.glm.

This document overall is a L^{A}TEX-like document prepared for regular GELLMU^{3} under the didactic GELLMU article document type, a document type that has both SGML and XML existence.

It makes extensive use of the newcommand meta-command in GELLMU, which is macro expansion with arguments. Moreover, it begins by using the verbatim pseudo-environment to present L^{A}TEX-like source under basic GELLMU for an HTML document. That document itself makes use of newcommand.

The use of newcommand in the “internal” document is exported to this document using newcommand in this document, recasting HTML constructions into equivalent markup under article. The source that appeared inside verbatim wraps is then used again without wrapping, and appears between horizontal rules.

While the didactic production system for article comes with formatters for the XML version only toward the targets (1) HTML and (2) L^{A}TEX, the document type is suitable for handling by any general purpose XML processor.

Would someone care to format the XML version to (3) DocBook? (4) SGMLTexi? (5) TEI? There only about 50 tags in the XML, many of which are easy empties and a few of which should be thrown away.

1URI: http://www.albany.edu/˜ hammond/gellmu/ghtml.html

2URI: http://www.albany.edu/˜ hammond/gellmu/

3URI: http://www.albany.edu/˜ hammond/gellmu/iglm.html