MathML:OperatorDictionary

From MozillaWiki
Revision as of 11:02, 6 April 2010 by Fred.wang (talk | contribs) (operator dictionary)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The MathML 3 Operator Dictionary indexes each operator by a character (an unicode code point) in a given form (prefix, infix or postfix). Each operator has the following attributes:

  • a priority
  • left and right spaces (in 1/18th of em). A value between 0 and 7.
  • minsize (in em). 1em by default.
  • properties (fence, separator, stretchy, symmetric, largeop, movablelimits, accent). Mentioned iff it is true.

Our implementation uses a property file with entries similar to what is described above. The property name is operator.\u[NNNN].[form] where [NNNN] is the unicode code point and [form] the operator form. The value of the property is a list of several AttributeName or AttributeName:AttributeValue (depending whether it is a boolean valued attributes or not) separated by whitespaces. Compared to the MathML3 dictionary, we do not have the "priority" attribute but the additional attributes below:

  • direction: horizontal, vertical (XXXfred add updiagonal, downdiagonal later?)
  • (XXXfred add mirrorable later?)

Finally, the end of the line after a sharp is considered as a comment: we use this to give the glyph or name of the character. Thus, a typical entry is:

operator.\u0028.prefix = direction:vertical stretchy fence symmetric lspace:0 rspace:0 # (

Our Operator Dictionary is stored in mathfont.properties.