<< Chapter < Page Chapter >> Page >

"&InvisibleTime;", "&InvisibleComma;" and "&ApplyFunction;"

These non-marking characters must be distinguished from space or blank rendering characters, which are used to format display for improving readability like "&nbsp;", "&ThinSpace;" ,"&emsp4;", "&emsp13;" etc. In addition to these space rendering elements, “mspace” token element is handy, where we need to implement and manage space.

Managing attributes

MathML elements, including token elements, support an array of attributes. Its management is greatly simplified in a structured manner. There are four attribute classes and a specialized tool to manage attributes of the elements in MathML. It must, however, be emphasized these are not exclusive groups, but only they represent groups having certain common implementation features.

    Attribute class

  • Attributes common to all MathML elements
  • Attributes inherited from the rendering enviornment
  • Attributes common to a group of token elements
  • Attributes specific to an element (additional attributes)

All MathML elements supports “class”, “style”, “id”, “xlink:href” and “xref” attributes in order to use style sheet mechanism. If the renderer does not use a style sheet, then these attributes may simply be ignored.

The style attributes of MathML elements are inherited from the rendering environment. We can change these inherited attributes from the environment in two ways. First mechanism is provided by common attribute design for token elements. Second mechanism involves using “mstyle” element belonging to layout presentation category.

Attributes common to a group of token elements

Rendering by token elements is characterized by the default values used for attributes of these elements. Most of these attributes are inherited from the environment of renderer like a particular browser.

The style attributes of the individual element can, however, be set different to default values via a set of style attributes. To keep the matter simple, there is a group of attributes, which applies to five of the token elements all capable to render characters(“mi”, “mn”,”mo”, “mtext”, “ms”) and one layout element “mstyle”.

The common attribute mechanism is a great help in managing and studying style attributes for the content display. This feature allows us to concentrate on specific attributes of the element while common attributes are managed with common names for six elements.

The common style attribute values are :

    Attribute values types

  • mathvariant (default =normal for all, italic for “mi”) : normal | bold | italic | bold-italic | double-struck | bold-fraktur | script | bold-script | fraktur | sans-serif | bold-sans-serif | sans-serif-italic | sans-serif-bold-italic | monospace
  • mathsize (default = inherited) : small | normal | big | number vertical unit
  • mathcolor (default = inherited) : #rgb | #rrggbb | html-color-name
  • mathbackground (default = inherited) : #rgb | #rrggbb | html-color-name

The example below sets most of these attribute values and is suggestive of the ways attributes are set, using common attributes.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, A primer in mathml. OpenStax CNX. Apr 19, 2006 Download for free at http://cnx.org/content/col10345/1.16
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'A primer in mathml' conversation and receive update notifications?

Ask