\environment envexamp

\setvariables
  [document]
  [columns=1,
   color=darkblue,
   title=OpenMath in \ConTeXt]

\logo [OPENMATH]  {OpenMath}
\logo [MATHADORE] {MathAdore}
\logo [MATHML]    {MathML}

\startbuffer[colofon]

This manual demonstrates a bit of \OPENMATH\ as used in the \MATHADORE\
project. We show both raw \MATHADORE\ code and shortcuts. The shortcuts
are translated into \MATHADORE\ and after that all \OPENMATH\ is converted
to content \MATHML. The code snippets are collected in individal files
and processed on demand (when they have changed) using the following
setup (\type {jobname.ctx}):

\startXML
<?xml version='1.0' standalone='yes'?>

<ctx:job>
    <ctx:message>mathadore</ctx:message>
    <ctx:preprocess suffix='prep'>
        <ctx:processors>
            <ctx:processor name='openmath' suffix='om'>
                texmfstart --direct xsltproc --output <ctx:value name='new'/>
                kpse:x-sm2om.xsl <ctx:value name='old'/></ctx:processor>
            <ctx:processor name='mathadore' suffix='prep'>
                texmfstart --direct xsltproc --output <ctx:value name='new'/>
                kpse:x-openmath.xsl <ctx:value name='old'/>.om
        </ctx:processor>
        </ctx:processors>
        <ctx:files>
            <ctx:file processor='openmath,mathadore'>openmath-*.xml</ctx:file>
        </ctx:files>
    </ctx:preprocess>
    <ctx:process>
    </ctx:process>
    <ctx:postprocess>
    </ctx:postprocess>
</ctx:job>
\stopXML

The \type {example} element in the snippets is there for the sole purpose
of satisfying the \XSLT\ parser (we need a valid document).

Because \MATHADORE\ is rather verbose, the \MATHADORE\ project uses
shortcuts which are later translated into \MATHADORE.

\blank[2*big]

\startlines
Hans Hagen
Hasselt, January 2006
\goto{www.pragma-ade.com}[url(http://www.pragma-ade.com)]
\stoplines

\stopbuffer

\setups[document:start]

\section{Shortcuts}

\showXMLsample openmath-0001
\showXMLsample openmath-0002
\showXMLsample openmath-0003
\showXMLsample openmath-0004
%showXMLsample openmath-0005
%showXMLsample openmath-0006
%showXMLsample openmath-0007
%showXMLsample openmath-0008
%showXMLsample openmath-0009

\section{Extensions}

\showXMLsample openmath-1001
\showXMLsample openmath-1002
\showXMLsample openmath-1003
\showXMLsample openmath-1004
\showXMLsample openmath-1005
\showXMLsample openmath-1006
%showXMLsample openmath-1007
%showXMLsample openmath-1008
%showXMLsample openmath-1009

\section{Examples}

\showXMLsample openmath-2001
\showXMLsample openmath-2002
\showXMLsample openmath-2003
\showXMLsample openmath-2004
\showXMLsample openmath-2005
\showXMLsample openmath-2006
\showXMLsample openmath-2007
\showXMLsample openmath-2008

\setups[document:stop]
