W3C home > Mailing lists > Public > www-math@w3.org > May 2006

How do I encode negative numbers in content MathML?

From: <juanrgonzaleza@canonicalscience.com>
Date: Tue, 16 May 2006 05:36:22 -0700 (PDT)
Message-ID: <4319.217.124.88.134.1147782982.squirrel@webmail.canonicalscience.com>
To: <www-math@w3.org>


The chapter 4 of MathML 2.0 specification is far from precise at this point.

Moreover, the tutorial

[http://cnx.org/content/m9008/latest/]

recommends next code

	  <m:math>
	    <m:apply>
	      <m:minus/>
	      <m:ci>x</m:ci>
	    </m:apply>
	  </m:math>

to representing the negative of a variable, and recommends

<m:math><m:cn>-1</m:cn></m:math>

for the negative of a number.

Whereas the next MathML tutorial

[http://www.pragma-ade.com/general/manuals/mmlprime.pdf]

says

<blockquote>
Although <cn>-37</cn> is valid, using minus is sometimes more clear.

<math>
<apply> <minus/>
<cn> 37 </cn>
</apply>
</math>
</blockquote>

What is the difference if any between both encodings?

What may be preferred? (I personally prefer unary usage of <minus/>)


Juan R.

Center for CANONICAL |SCIENCE)
Received on Tuesday, 16 May 2006 12:36:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 20 February 2010 06:12:58 GMT