W3C home > Mailing lists > Public > www-math@w3.org > October 1998

Re: What are your plans for MathML macros?

From: William F. Hammond <hammond@csc.albany.edu>
Date: Sat, 31 Oct 1998 09:07:36 -0500 (EST)
Message-Id: <199810311407.JAA17805@hilbert.math.albany.edu>
To: hutch@psfc.mit.edu, jjramsey_6x9eq42@yahoo.com
Cc: emj@cnsibm.albany.edu, www-math@w3.org
This discussion is about "authoring", which remains largely
without provision, and explicitly so to date, in the work of the W3C
Math WG.  MathML is browser fodder.

I would like to consider a simple example, namely the classical TeX
system-building benchmark "story.tex" in the standard web2c-TeX
distribution from Stanford, in relation to the question of how it
might be translated into HTML.

As I think about this, I ask the question why HTML rather than the
SGML language known as "DocBook"?  It seems to be widely accepted
that HTML is more of a "sink" than a "source".

The "sink" v. "source" thing is, of course, relative.  DVI is a sink
relative to TeX, while DVI is a source relative to PostScript.  (And,
yes, both DVI and PostScript are formally specified languages.)

"DocBook", in which I am not fluent, is said to be a source relative
to languages in which I might choose to author as source, including both
LaTeX and HTML.  In fact, a visible demonstration of this is available
if one acquires the archive (from CPAN, the Comprehensive Perl Archive
Network) for David Megginson's Perl library SGMLSpm.  (Megginson has
other newer things for XML at "www.megginson.com" that may wind up
being useful for us.)

So why not try to set "story.tex" in "DocBook"?

Beyond that, why not try to set it in a DTD that is a bit closer to
the world of LaTeX that I know?

I come up with this:

     <!DOCTYPE article SYSTEM "gellmu.dtd">
     <article>
     <preamble>
     <title>A Short Story</title>
     <author>A. U. Thor</author>
     </preamble><body>
     
     <hrule>
     
     <parb>
     Once upon a time, in a distant
       galaxy called <umlau>O</umlau><umlau>o</umlau><cedil>c</cedil>,
     there lived a computer
     named R.<nbs/J. Drofnats<eos/
     <parb>
     Mr.<nbs/Drofnats<pdash/or <quophrase>R. J.,</quophrase> as
     he preferred to be called<pdash/<nul/
     was happiest when he was at work
     typesetting beautiful documents<eos/
     <hrule>
     
     </body>
     </article>

Perhaps I should comment on three of these tags: "<eos/",
"<nbs/", and "<nul/".

These are empty SGML elements, like HTML's "<br>".  They *could* be
tagged, and with more standard SGML usage, *would* be tagged as
"<eos>", "<nbs>", and "<nul>".  Moreover, in XML, they *must* be
tagged as "<eos/>", "<nbs/>", and "<nul/>".  My usage is enabled by
tweeking the SGML DECLARATION [I began with that for HTML 2.0, found
in Internet RFC 1866, section 9.5, rather than manually copy the
reference declaration from Charles Goldfarb's "SGML Handbook".]  to
enable "SHORTTAG".  Other features not in the default reference
declaration (the foundation of SGML and SGML DTD syntax) were already
there.  I gain thereby the advantage of having my parser know about
the emptiness of these tags before I put them in my DTD, which is
useful if I want to use sgmlspm to make a format chart of tag logic.
The price is that the character "/" needs to be made special (in one
of several possible ways).  I say all of this just in case the Math WG
is still working with an outside SGML consultant.

"eos" is a formal end-of-sentence mark.  "nbs" is non-breaking space
like "~" in LaTeX and "&nbsp;" in HTML, and "nul" is comment residue.
Comment?  What comment?

Due to my persistent LaTeX habit, I actually set this as follows for
simple transliteration.  But it's GELLMU, not LaTeX.  After all,
"\hrule" is not (Lamport) LaTeX, and "\documenttype" is neither LaTeX
nor TeX.

     \documenttype{article}
     \title{A Short Story}
     \author{A. U. Thor}
     \begin{document}
     
     \hrule
     
     
     Once upon a time, in a distant
       galaxy called \umlau{O}\umlau{o}\cedil{c},
     there lived a computer
     named R.~J. Drofnats.
     
     Mr.~Drofnats---or \quophrase{R. J.,} as
     he preferred to be called---% error has been fixed!
     was happiest when he was at work
     typesetting beautiful documents.
     \hrule
     
     \end{document}

Oh, by the way, didn't Thor used to be reachable as
"author@cs.:o:o,c" ?   ;-----)

                                   -- Bill
Received on Saturday, 31 October 1998 09:07:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 20 February 2010 06:12:48 GMT