Re: Rendering primes: <msup><mi>x</mi><mo>&#x2032;</mo></msup>

Karl Tomlinson <[email protected]>
Newsgroups gmane.comp.web.mathematics,gmane.comp.mozilla.devel.mathml
Message-ID <[email protected]>
On Fri, 27 Jun 2008 07:59:34 -0700, Robert Miner wrote:

> All renderers that take on the problem have to special
> case their layout algorithms, and look for isolated pseudoscripts in the
> superscript position (or presuperscript position).  By isolated, I mean
> that there are no other characters in the same token element with the
> pseudoscript, so that <msup> <mi>x</mi> <mo>&prime;!</mo> </msup> or
> whatever is not special-cased.

I'm trying to think of the best (perhaps easiest) way to detect
these special cases, while maintaining expected behavior for the
following:

> At the same time, clearly the data model for all MathML token elements
> is Unicode CDATA, so one cannot rule out the possibility of valid MathML
> markup containing constructions such as <mi>x&prime;</mi> or even
> <mi>x</mi><mo>&prime;</mo>.  So that has to work as expected too.

[email protected] writes:

> But what is "expected" here? If such markup is expected to yield
> superscript appearance, then one might use the original glyph at zero
> script level,

I imagine the author expects presentation similar to the normal
rendering of the Unicode characters, as you suggest.

> but this heuristic breaks down with nested/chained superscripts.

Wouldn't nested superscripts necessitate the use of msup, etc.?


What is the appropriate markup for multiple pseudoscript
characters within one superscript level?

I would have considered the characters to be separate operators
and so

  <msup>
    <mi>x</mi>
    <mrow>
      <mo>&prime;</mo>
      <mo>&prime;</mo>
      <mo>&prime;</mo>
    </mrow>
  </msup>

which makes special case detection based on infix (rather than
postfix) form impossible.

But at
http://www.w3.org/Math/testsuite/mml2-testsuite/Topics/Primes/primes1.xml

a single operator containing multiple characters is used:

  <msup>
    <mi> x </mi>
    <mo> '' </mo>
  </msup>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.