\documenttype{article} % % This, the outer, document requires that GELLMU be run with % gellmu-latex-faq, i.e., with gellmu.elc in your load-path or % else with an explict pathname to it, % % emacs -batch -l gellmu.elc -f gellmu-latex-faq teaser.glm . % % It is intended to convey some idea of what can be done with GELLMU. % First release should be about a month away. % Late pre-release tarball: % % http://www.albany.edu/~hammond/gellmu/tarball.html % % Various forms of this document: /~hammond/gellmu/teaser/ % \surtitle{HTML Marked Up with GELLMU} \title{What Kind of Document is This?} \author{William F. Hammond} \address{Department of Mathematics \& Statistics\brk; The University at Albany\brk; Albany, New York \ \ 12222 \ \ (USA)} % Import the markup used for HTML in the inside basic GELLMU doc \newcommand{\p}{\parb} \newcommand{\em}[1]{\emph{#1}} \newcommand{\h1c}[1]{\supsuphdrc{#1}} \newcommand{\center}[1]{\display{#1}} \newcommand{\qa}[2]{\begin{anch}[href="#1"]{#2}\end{anch}} \newcommand{\ua}[1]{\urlanch{#1}} \newcommand{\latex}{\latex;} % Now if there happens to be a blank line before an imported \p, % then we'll get \n since "parb" is not in gellmu-parb-nogo. % (Why not? Because "parb" is not intended for authors except in % unusual circumstances. And this is an unusual circumstance.) % The extra parb can be blocked with a late macro (capitalized \macro) % as follows: \Macro{ \parb}{ % \parb} % In the value string the nul is preceded by two spaces to prevent eos % blocking. This type of thing arises only with "importing". % The preceding will be the active newcommands for this umbrella doc. % % Taller pages will help \latexcommand{\bsl;setlength\{\bsl;topmargin\}\{-36bp\}} \latexcommand{\bsl;setlength\{\bsl;textheight\}\{704bp\}} % % Turn off the GELLMU banner \nobanner \begin{document} \section{Some Markup} The following is markup under \emph{basic} \abbr{GELLMU} for an \abbr{HTML} document: \begin{verbatim} \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}. \end{verbatim} \section{Approximate Rendering} Now follows a rendering of how the \abbr{HTML} should appear. \latexcommand{\bsl;pagebreak} \hrule \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/\tld;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/\tld;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/\tld;hammond/gellmu/}{The GELLMU Web}. \hrule \section{What is Going On?} First observe that the verbatim section is an \abbr{HTML} document marked up with \abbr{GELLMU}. It may be converted to \abbr{HTML} with \display{|emacs -batch -l gellmu.elc -f gellmu-html htease.glm|} if it is saved to the name |htease.glm|. This document overall is a \latex-like document prepared for \qa{http://www.albany.edu/\tld;hammond/gellmu/iglm.html}{\emph{regular} \abbr{GELLMU}} under the didactic \abbr{GELLMU} \emph{article} document type, a document type that has both \abbr{SGML} and \abbr{XML} existence. It makes extensive use of the \emph{newcommand} meta-command in \abbr{GELLMU}, which is macro expansion with arguments. Moreover, it begins by using the \emph{verbatim} pseudo-environment to present \latex;-like source under \emph{basic} \abbr{GELLMU} for an \abbr{HTML} document. That document itself makes use of \emph{newcommand}. The use of \emph{newcommand} in the ``internal'' document is exported to this document using \emph{newcommand} in this document, recasting \abbr{HTML} constructions into equivalent markup under \emph{article}. The source that appeared inside \emph{verbatim} wraps is then used again without wrapping, and appears between horizontal rules. While the didactic production system for \emph{article} comes with formatters for the \abbr{XML} version only toward the targets \iseq{(1)} \abbr{HTML} and \iseq{(2)} \latex;, the document type is suitable for handling by any general purpose \abbr{XML} processor. Would someone care to format the \abbr{XML} version to \iseq{(3)} DocBook? \ \iseq{(4)} SGMLTexi? \ \iseq{(5)} TEI? There only about 50 tags in the \abbr{XML}, many of which are easy empties and a few of which should be thrown away. \end{document}