ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* xml support in context / mathml
@ 2001-01-19 16:04 Hans Hagen
  2001-01-22 14:38 ` Taco Hoekwater
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2001-01-19 16:04 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]

Hi, 

The latest beta has xml support build in. If you follow the xml link at our
homepage, you arrive at a page where the topmost link will bring you to the
preliminary "xml in context" manual. 

XML support is build in layers: 

- an xml parser thtat can handle raw xml, as well as xml that si part of a
normal tex document, this parser is normally all you need

- a remapper that maps xml elements onto tex elements, this si for
fanatics, and not yet in the beta; it's used for the mathml xml filter i'm
working on

- filters that suport specific dtd's 

Attached is a file that shows how (currently) the content mathml filter
performs. I got most of it working [as with presentattional) but for very
complicated math, i will have to map onto math macros that i guess are now
living on taco's machine, but that will be sorted out later. I will release
the mml filters when i can handle the outpus as mentioned in the mathml
draft [some things in there still puzzle me since i don't know all those
math concepts in detail]

One application of mathml is, that when in the tex file you use mathml,
combined with the html output style that berend is working on, in due time
context can produce html with math, but from the same source also normal
docs. The advantage is that you then can also share math code with other
apps like mathematica as well as use output from those programs [that i
don't have btw].  

Much is still experimental and you may expect some cleaner and leaner code
later.

Hans

[-- Attachment #2: mml.zip --]
[-- Type: application/zip, Size: 27012 bytes --]

[-- Attachment #3: Type: text/plain, Size: 370 bytes --]

-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xml support in context / mathml
  2001-01-19 16:04 xml support in context / mathml Hans Hagen
@ 2001-01-22 14:38 ` Taco Hoekwater
  2001-01-22 15:54   ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Taco Hoekwater @ 2001-01-22 14:38 UTC (permalink / raw)
  Cc: ntg-context

Hans Hagen wrote:
> 
> Hi,
> 
> The latest beta has xml support build in. If you follow the xml link at our
> homepage, you arrive at a page where the topmost link will bring you to the
> preliminary "xml in context" manual.

> Attached is a file that shows how (currently) the content mathml filter
> performs. I got most of it working [as with presentattional) but for very
> complicated math, i will have to map onto math macros that i guess are now
> living on taco's machine, but that will be sorted out later. I will release
> the mml filters when i can handle the outpus as mentioned in the mathml
> draft [some things in there still puzzle me since i don't know all those
> math concepts in detail]

Some parts of the spec apparently have been written with the precise
purpose 
of being as confusing as possible. Mayhap they had some internal dispute
over 
some of the options/syntax that they have not resolved yet. 

-- 
groeten,

Taco


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xml support in context / mathml
  2001-01-22 14:38 ` Taco Hoekwater
@ 2001-01-22 15:54   ` Hans Hagen
  2001-03-04 20:26     ` Johannes Huesing
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2001-01-22 15:54 UTC (permalink / raw)
  Cc: ntg-context

At 03:38 PM 1/22/01 +0100, Taco Hoekwater wrote:
>Hans Hagen wrote:
>> 
>> Hi,
>> 
>> The latest beta has xml support build in. If you follow the xml link at our
>> homepage, you arrive at a page where the topmost link will bring you to the
>> preliminary "xml in context" manual.
>
>> Attached is a file that shows how (currently) the content mathml filter
>> performs. I got most of it working [as with presentattional) but for very
>> complicated math, i will have to map onto math macros that i guess are now
>> living on taco's machine, but that will be sorted out later. I will release
>> the mml filters when i can handle the outpus as mentioned in the mathml
>> draft [some things in there still puzzle me since i don't know all those
>> math concepts in detail]
>
>Some parts of the spec apparently have been written with the precise
>purpose 
>of being as confusing as possible. Mayhap they had some internal dispute
>over 
>some of the options/syntax that they have not resolved yet. 

I can now reasonably well process the 280 examples in the draft,
presentation as well as content, and extending things is not that hard. 

I just downloaded the demo suite from w3c and (surprise) some examples
there are rendered different than the draft. I'm not sure if we need to
support all the crappy attributes. 

I expect that we need to map more complicated constructs onto the more
advanced display math macros you must have on your machine. So, we need
aproper in-between-tex layer for the real tough jobs. 

Somehow, when i look at the specs, i cannot get by the feeling that some
important aspects have been overlooked -) 

Hans    
-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xml support in context / mathml
  2001-01-22 15:54   ` Hans Hagen
@ 2001-03-04 20:26     ` Johannes Huesing
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Huesing @ 2001-03-04 20:26 UTC (permalink / raw)


On Mon, Jan 22, 2001 at 04:54:19PM +0100, Hans Hagen wrote:
> 
> Somehow, when i look at the specs, i cannot get by the feeling that some
> important aspects have been overlooked -) 
> 

Hi Hans and all,

I skimmed the examples in the MathML manual (which Hans distributed
some printed copies of during the Dante meeting) and I have some
remarks regarding the statistics examples on pp. 131 to 134.

In the examples empirically gained values and their expectations are
mistaken for one another. The first example (which spells in TeX as
$\bar{x} = \frac1n\sum x_i$) is ok (the mean being the sum of the
values over the observations divided by the number of obs). Statistic
2 is not really wrong
($\sigma(x)\approx\sqrt{\frac{\sum(x_i-\bar{x})^2}{n-1}$) but a bit
weak: I would take the expectation of the right expression and put an
equal sign between the two expressions. For statisticians, there is
definitely the need for an <expectation> element which would spell as
an upright E which is strongly right associative so you could drop the
parentheses around the X in E(X) or in E(sin X) (although I would rather
put the parentheses around here) but not in E(XY). Physicists would
put angle brackets around the argument and drop the E so the
expectation tag is not uninteresting.

The third example is plain wrong as it really messes up the
theoretical value "variance" $\sigma^2 =
\expectation((X-\expectation(X))^2)$ and its unbiased estimate $s^2$,
which is equal to the term on the right (the square of the right
expression in example 2) but only approxiamtely equal to the
expression in the middle (so you have to swap the \approx and the = in
the example). Moreover, I find the notation of overbarring a whole
expression unusual (and inconsistent with the i index since you don't
write $\bar{x}_i$ either) but I do not know of a notation other than
$\frac1n\sum\cdots$ for that. And this notation has the disadvantage
that it had to be flexible wrt the number of observations (n here).  

And thank you very much for the lift back to Duisburg: I managed to
make it home from there before Linux was updated on the laptop
:-). Hope you made it home safely.

Greetings

Johannes
-- 
"Human Genome" may be a binary file. See it anyway?


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-03-04 20:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-19 16:04 xml support in context / mathml Hans Hagen
2001-01-22 14:38 ` Taco Hoekwater
2001-01-22 15:54   ` Hans Hagen
2001-03-04 20:26     ` Johannes Huesing

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).