From: Hans Hagen <pragma@wxs.nl>
Subject: Re: Units and XML
Date: Fri, 07 Apr 2006 09:36:34 +0200 [thread overview]
Message-ID: <44361682.70302@wxs.nl> (raw)
In-Reply-To: <e151fu$438$2@sea.gmane.org>
Johannes Graumann wrote:
> Hello,
>
> Has anyone come up with a sense making way of coding units in XML and
> mapping them onto ConTeXt's 'units' module ... makes a knot in my brain ...
>
there is a manual on the website ... physml
the old module:
\usemodule[physml]
the new one (newmml):
\usemodule[newmmu]
as in:
\usemodule[newmmu]
\starttext
Quick and dirty in||line units:
\startbuffer
<phys>
<cn> 10 </cn>
<cu> <Newton/> <Square/> <Meter/> <Per/> <Sec/> </cu>
</phys>
\stopbuffer
\typebuffer \processXMLbuffer
A more \MATHML||like unit application:
\startbuffer
<phys> <apply> <unit/>
<cn> 10 </cn>
<csymbol> <Square/> <Meter/> <Per/> <Sec/> </csymbol>
</apply> </phys>
\stopbuffer
\typebuffer \processXMLbuffer
A bit more compact:
\startbuffer
<phys> <apply> <unit/>
<cn> 10 </cn>
<cu> <Square/> <Meter/> <Per/> <Sec/> </cu>
</apply> </phys>
\stopbuffer
\typebuffer \processXMLbuffer
A bit more complicated:
\startbuffer
<phys> <apply> <unit/>
<apply> <divide/> <ci> a </ci> <cn> 10 </cn> </apply>
<cu> <Square/> <Meter/> <Per/> <Sec/> </cu>
</apply> </phys>
\stopbuffer
\typebuffer \processXMLbuffer
An alternative (equivalent) for \type {</cu>}:
\startbuffer
<phys> <apply> <unit/>
<cn> 10 </cn> <cunseq> <Square/> <Meter/> <Per/> <Sec/> </cunseq>
</apply> </phys>
\stopbuffer
\typebuffer \processXMLbuffer
\stoptext
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
next prev parent reply other threads:[~2006-04-07 7:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-07 6:36 Johannes Graumann
2006-04-07 7:36 ` Hans Hagen [this message]
2006-04-07 17:10 ` Johannes Graumann
2006-04-07 17:24 ` Johannes Graumann
2006-04-11 21:21 ` Hans Hagen
2006-04-08 8:52 ` Hans Hagen
2006-04-09 18:02 ` Johannes Graumann
2006-04-09 20:11 ` Hans Hagen
2006-04-09 20:36 ` Johannes Graumann
2006-04-10 17:45 ` Hans Hagen
2006-04-10 21:26 ` Johannes Graumann
2006-04-10 22:10 ` Hans Hagen
2006-04-10 22:14 ` Johannes Graumann
2006-04-10 22:38 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44361682.70302@wxs.nl \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).