<!-- \nul; -->
<!DOCTYPE article SYSTEM "gellmu.dtd"><article stem="mathbench">
<nul/>
<nul/>
<nul/>
<nul/>
<nul/>
<nul/>
<surtitle>Univ at Albany: W. F. Hammond: The <abbr>GELLMU</abbr> Archive</surtitle>
<title>What is a Reasonable Authoring <abbr>DTD</abbr><brk> under <abbr>SGML</abbr> or <abbr>XML</abbr> for <abbr>MathML</abbr>?</title>
<author>William F. Hammond</author>
<email>hammond<atc/>math.albany.edu</email>
<nocustomlengths>
<nobaseprint>
<mathsym>Q</mathsym>
<nul/>
<nul/>
<nul/>
<nul/>
<nul/>

<nul/>
<mathsym>Qbar type="R" mml="mi"</mathsym>
<mathsym>Gal type="(R,R)" mml="mo"</mathsym>
<nul/>
<nul/>
<nul/>
<mathsym>galQ

 type="G"</mathsym>
<body>

<section>Introduction</section>
<parb>
There has been a recent resurgence of interest in
<anch><op0>href="http:<sol/><sol/>www.w3.org<sol/>Math<sol/>"</op0><ag0><abbr>MathML</abbr></ag0></anch>, the rather
granular XML language developed by the World Wide Web Consortium (W3C)
<abbr>HTML</abbr> Math Working Group during the period 1996<hyp/>2000, due to the
availability of <abbr>MathML</abbr><hyp/>capable builds of the browser
<anch><op0>href="http:<sol/><sol/>www.mozilla.org<sol/>"</op0><ag0>Mozilla</ag0></anch>, the
open<hyp/>source development version of the popular browser NetScape<eos/>

<section>A Few Examples</section>

<enumerate>
<item> Compound fractions:
<displaymath> <frac><ag0><frac><ag0>a</ag0><ag0>b</ag0></frac></ag0><ag0><frac><ag0>c</ag0><ag0>d</ag0></frac></ag0></frac> <eqs/> <frac><ag0>a d</ag0><ag0>b c</ag0></frac> <eos> </displaymath>

<item> The formula for solving the quadratic
equation <hsp/><tmath>a x<sup>2</sup> <plu/> b x <plu/> c <eqs/> 0</tmath><hsp/>
(in a field of characteristic <tmath><neq> 2</tmath>):
<displaymath> x <eqs/> <frac><ag0><neg>b</neg> <pm> <sqrt>b<sup>2</sup> <hyp/> 4 a c</sqrt></ag0><ag0>2 a</ag0></frac> <spc/><eos> </displaymath>

<item> Mixed function application and multiplication:
<displaymath> <func>sin</func> a x <func>cos</func> b x <eos> </displaymath>

<item> Newton<apos/>s binomial series:
<displaymath> (1 <plu/> t)<sup>r</sup> <eqs/> <sum><sub>k<eqs/>0</sub><sup><infty></sup> <hsp/>
  <frac><ag0>r(r <hyp/> 1)(r <hyp/> 2)<ldots>(r <hyp/> k <plu/> 1)</ag0><ag0>k<exc/></ag0><hsp/> t<sup>k</sup> </sum> <eos> </displaymath>

<item> A differential equation:
<displaymath> D<sup>2</sup> y <hyp/> 3 x (D y)<sup>2</sup> <eqs/> x <func>cos</func> x <spc/><eos> </displaymath>

<item> Stokes<apos/>s Theorem in space:
<displaymath> <int><int><sub>S</sub> <hsp/> (<mbox><bold>curl</bold></mbox>
 <hsp/> <regch><bold>F</bold></regch> <hsp/><cdot><hsp/> <regch><bold>N</bold></regch>)<hsp/> d <sigma/>
</int></int>
 <eqs/>
<int><sub><partial> S</sub> <hsp/> (<regch><bold>F</bold></regch>
<hsp/><cdot><hsp/> <regch><bold>T</bold></regch>)<hsp/> d s </int><hsp/> <eos> </displaymath>

<item> The continued fraction for the golden mean:
<displaymath> <frac><ag0>1 <plu/> <sqrt>5</sqrt></ag0><ag0>2</ag0></frac> <eqs/>
    <frac><ag0>1</ag0><ag0>1<plu/><frac><ag0>1</ag0><ag0>1<plu/><frac><ag0>1</ag0><ag0>1<plu/><frac><ag0>1</ag0><ag0>1<plu/><ldots/></ag0></frac></ag0></frac></ag0></frac></ag0></frac> <eos> </displaymath>

<item> The representation
<nul/>
<nul/>
<nul/>
<nul/>
<displaymath> <Sym key="Gal"><mbox>Gal</mbox></Sym>(<Sym key="Qbar"><ovbar><regch><bold>Q</bold></regch></ovbar></Sym> <sol/> <Sym key="Q"><regch><bold>Q</bold></regch></Sym>) </displaymath>
of a centrally important object that one might choose to declare
as the symbol <qquostr>galQ</qquostr><eos/>  In this instance, however the expression
is formed using the following three declared symbols:<footnote>The command
<emph>regch</emph> is a variant of <emph>mbox</emph> that is intended to denote
the normal version of a <quophrase>regular</quophrase> character found in a
mathematical context when that character is suitable for a
hypothetical algorithmic application of an accent such as
<emph>ovbar</emph><eos/>  A general <emph>mbox</emph> is regarded as not suitable for
hypothetical algorithmic accenting.</footnote>
<tablec><ag0>lcl</ag0>
<tr> <th><tdbc>Name</tdbc> <th><tdbc>Rendering</tdbc> <th><tdbc><abbr>GELLMU</abbr> expansion</tdbc>
<tr> <td><quostr>Q</quostr>     <td> <tmath><Sym key="Q"><regch><bold>Q</bold></regch></Sym></tmath>
       <td><quostr><bsl/>regch<lbr/><bsl/>bold<lbr/>Q<rbr/><rbr/></quostr>
<tr> <td><quostr>Qbar</quostr>  <td> <tmath><Sym key="Qbar"><ovbar><regch><bold>Q</bold></regch></ovbar></Sym></tmath>
       <td><quostr><bsl/>ovbar<lbr/><bsl/>regch<lbr/><bsl/>bold<lbr/>Q<rbr/><rbr/><rbr/></quostr>
<tr> <td><quostr>Gal</quostr>   <td> <tmath><Sym key="Gal"><mbox>Gal</mbox></Sym></tmath>
       <td><quostr><bsl/>mbox<lbr/>Gal<rbr/></quostr>
</tablec>
Here the example is repeated
<displaymath> <Sym key="galQ"><mbox>Gal</mbox>(<ovbar><regch><bold>Q</bold></regch></ovbar> <sol/> <regch><bold>Q</bold></regch>)</Sym> </displaymath>
with the same presented appearance but this time as the declared
symbol <emph>galQ</emph>, which is defined without using other
declared symbols in its definition<eos/>

</enumerate>

<section>Generating <abbr>MathML</abbr></section>
<parb>
There is a serious issue surrounding how one might migrate from
traditional <tex/><hyp/>like mathematical markup, which uses reasonably
succinct mathematical notation based on the long tradition of Western
mathematical notation, to an authoring markup that is fully adequate
for translation to <abbr>MathML</abbr><eos/>  For example, how can we automatically
translate, with full confidence, the <abbr>XML</abbr> versions of the above
mathematical examples into <abbr>MathML</abbr><eoq/>  Or, if we cannot, what additional
information needs to be added<eoq/>
<parb>
One possibility is offered by my draft on mathematical notation at the
URL <display><urlanch>http:<sol/><sol/>www.albany.edu<sol/><tld/>hammond<sol/>gellmu<sol/>notation</urlanch>
<eos/></display>  It attempts to explain what additional information is needed in
this document to eliminate the need for guessing by an automated
rendering system at work on these examples, as marked up in the <abbr>XML</abbr>
version of this document<eos/>  Note that no guessing is needed to render
this document in either <abbr>HTML</abbr>, with mathematics set crudely but
reasonably, nor to render it in <latex/><eos/>  (Perhaps one may not fully
appreciate this latter point without examining the <anch><op0>
href="http:<sol/><sol/>www.albany.edu<sol/><tld/>hammond<sol/>gellmu<sol/>authordtd<sol/>mathbench.xml"
</op0><ag0>XML version of this document</ag0></anch>.)
<parb>
For the purpose of assistance in automated rendering to <abbr>MathML</abbr> as well
as for the purpose of supplying semantic information for computer
algebra systems, <abbr>GELLMU</abbr> provides a metacommand <emph>mathsym</emph><footnote>The
name <emph>mathsym</emph> is the default value of the variable
<emph>gellmu<hyp/>mathsym<hyp/>name</emph> in the syntactic translator.</footnote> for the
formal declaration of mathematical symbols with the usage:
<display>
<quostr><bsl/>mathsym<lbr/>symbol<hyp/>name<rbr/><lbr/>symbol<hyp/>rendering<rbr/>[symbol<hyp/>meta<hyp/>info]</quostr>
<eos></display>
Here <emph>symbol<hyp/>name</emph> is an alphanumeric string (case<hyp/>sensitive)
beginning with a letter<eos/>  The second argument is the presentation
rendering of the symbol in <abbr>GELLMU</abbr> markup<eos/>  It is like the definition
of a <emph>newcommand</emph> except that it may not involve
arguments.<footnote>However, a declared math symbol may be invoked in
a <emph>newcommand</emph> that takes arguments.</footnote>
The optional third argument <emph>symbol<hyp/>meta<hyp/>info</emph> is
an alpha<hyp/>numeric string that might also include possibly a few other
string characters such as <quochar><sol/></quochar>, <quochar><hyp/></quochar>, <quochar>,</quochar>,
<quochar>.</quochar>, <quochar><ast/></quochar>, etc<eos/>  Its exact structure depends on the
production system<eos/>  For example, it might consist of (name, value) pairs
for conveying meta<hyp/>information about the symbol<eos/>
<parb>
The syntactic translator replaces each invocation of a given
<emph>mathsym</emph> with the specified rendering and writes for each
<emph>mathsym</emph> definition a corresponding element in the <abbr>SGML</abbr> output
whose content consists solely of the declared symbol name if there is
no meta information but otherwise consists of the symbol name followed
by a blank space and then whatever string of meta information is
provided in the optional argument<eos/>  Additionally, each invocation is
wrapped in a rendering<hyp/>inert <emph>Sym</emph> element whose <emph>key</emph>
attribute reveals the name given to the symbol at the point of
declaration (and by which the symbol is invoked)<eos/>  This makes it
possible for a downstream authoring platform processor that has
remembered the list of declared symbol names to match each invocation
of a declared symbol with its associated meta information, if any,
provided by the author in the symbol declaration<eos/>
<parb>
A related feature in the didactic <abbr>GELLMU</abbr> document type is the
<emph>mlg</emph> tag for marking mathematical logical groups<eos/>  This is
somewhat akin to the <emph>lgg</emph> tag for <tex/><hyp/>like logical groups,
traditionally created in <tex/> markup with braces that are not
attached to a command.<footnote>Such unattached braces in <abbr>GELLMU</abbr>
markup lead to an <emph>lg0</emph> tag in the output of the syntactic
translator that is translated to an <emph>lgg</emph> tag in the <abbr>XML</abbr> version
of the didactic document type.</footnote>  As with <emph>lgg</emph> there is no
obvious evidence of an <emph>mlg</emph> tag in a typeset rendering, but the
presence of such a tag is intended as a signal to downstream
mathematical parsers that the contents of the tag be given grouping
priority as, say, with visible parentheses<eos/>  Furthermore, the
<emph>mtype</emph> and <emph>mml</emph> attributes of the <emph>mlg</emph> tag may be
used to pass semantic information about the tag<apos/>s contents to a
processor<eos/>
<parb>
The reader is invited to do one or more of the following:
<itemize>
<item> point out inadequacies in my draft on notation<eos/>
<item> improve my draft on notation<eos/>
<item> provide code to format the above examples in <abbr>MathML</abbr><eos/>

</itemize>

</body>
</article><!-- GELLMU version 0.7.4.4 (03-Jun-2007) -->
