Re: Combining markup


> Interesting.
> (I presume it only works with WebEQ "installed" in the VM-extensions 
> for permission purposes)

Right.  That's life with applets.

> This seeems to have a drawback: people would only see that you copy 
> content if they "select correctly" which is somewhat random depending 
> on the difficulty in selecting...
> My favourite example where visual selection can have problems with 
> "content-selection" is the "3 = -2 mod 5": if you have operator 
> selection (i.e. you can select an operator without its operands, a 
> highly wished feature) then you should be able to select the "mod" but 
> you should only be able to do so by selecting at the same time the "=" 
> as, at least in classical semantic of such an expression, the operator 
> "... = ... mod ..." is the operator and not just the "=".
> What does WebEQ do then ?

The way the WebEQ Viewer works is as follows:  When a content
expression is parsed, WebEQ creates two trees.  One is the parse tree
for the content, and the other is the presentation markup to display.
Behind the scenes, these corresponding nodes in these trees are

Selection then operates on the presentation tree, so that selection is
"visually intuitive".  If the selection is a subtree in the
presentation markup whose root corresponds to a subtree in the content
markup, the content markup is returned.  This is the situation where
the selection is mathematically meaningful (hopefully).  If the
selection doesn't correspond to a content subtree, then the
presentation is returned, on the hypothesis that what you wanted was
markup for what you visually selected.

It's a bit more complicated than that, since the selection might be a
collection of subtrees, all of which correspond to content
expressions, etc.  But that gives the basic idea.

In the specific case of your 3 = -2 mod 5 example, WebEQ Viewer will
do the wrong thing, since it's semantics aren't nearly that subtle.
If the content markup was


then the corresponding presentation tree will be 


If you select "mod", you will get <rem/> since that corresponds to the
<mo>mod</mo> presentation subtree.

If you select "-2 mod" you will get "<cn>-2</cn><rem/>" (a collection
of corresponding subtrees, not very ideal in this case I admit)

If you select "-2 mod 5", the viewer is smart enough to include the
mrow in the selection, and you get 


for the selection.

Hope this helps.


Dr. Robert Miner                      
W3C Math Interest Group Co-Chair                      651-223-2883
Design Science, Inc.   "How Science Communicates"

Received on Monday, 19 April 2004 16:24:00 UTC