(Excerpt from "The MathML Handbook" by Pavi Sandhu)




The mstyle element is used to set the default value of an attribute throughout a given piece of presentation markup. If an attribute is specified explicitly on an mstyle element, the specified value is inherited by all elements contained within the mstyle element directly or indirectly. In other words, that value will be used as the default on every element contained within that mstyle element, unless the value is explicitly changed by another attribute specification.

The mstyle element displays its children in a horizontal row aligned along the baseline, similar to the mrow element.


This element accepts the thirteen attributes shown in the following table. In addition, it accepts all attributes of all other presentation elements, except for those attributes that have a required value.

Table: Attributes of mstyle.

Attribute Values Default
scriptlevel [+ | -] unsigned-integer inherited
displaystyle true | false inherited
scriptsizemultiplier number 0.71
scriptminsize number v-unit 8 pt
color #rgb | #rrggbb | transparent | html-color-name inherited
background #rgb | #rrggbb | transparent | html-color-name transparent
veryverythinmathspace number h-unit 1/18 em
verythinmathspace number h-unit 1/9 em
thinmathspace number h-unit 1/6 em
mediummathspace number h-unit 2/9 em
thickmathspace number h-unit 5/18 em
verythickmathspace number h-unit 1/3 em
veryverythickmathspace number h-unit 7/18 em

The first six of these attributes have the following meaning:

  • scriptlevel: controls the font size. The higher the script level, the smaller the font size. The change in the font size depends on the value of the attribute scriptsizemultiplier.
  • displaystyle: controls the value of two other attributes in mo elements, namely largeop and movablescripts. These attributes can take one of several values, depending on the value of the displaystyle attribute in their environment. In general, the displaystyle attribute has the value true for equations intended for display and false for equations that occur inline as well as for tables, fractions, or scripts. Presentation elements that typically cause their content to be displayed in a smaller size or with less vertical spacing (such as subscripts, superscripts, fractions, square roots, and tables) typically set displaystyle to false and increase the value of scriptlevel. Ten elements change the value of either displaystyle or scriptlevel: msub, msup, msubsup, munder, mover, munderover, mmultiscripts, mfrac, mroot, and mtable.
  • scriptsizemultiplier: is a number that determines the change in font size caused by scriptlevel. The new font size is equal to the old font size multiplied by the scriptsizemultiplier to the power of the change in scriptlevel.
  • scriptminsize: is the minimum size to which a font can be reduced as a consequence of changes in scriptlevel.
  • color: specifies the color in which the markup is rendered in RGB notation.
  • background: specifies the background color in RGB notation.

Spacing between operators is typically one of a small set of values. The <mstyle> element has the following seven named attributes that set the size of these values:

  • veryverythinmathspace
  • verythinmathspace
  • thinmathspace
  • mediummathspace
  • thickmathspace
  • verythickmathspace
  • veryverythickmathspace

Each of these attributes defines a fixed horizontal space, with the default value ranging between 1/18 em to 7/18 em. Since the spacing between operators in the operator dictionary is defined in terms of these values, setting these values to a larger or smaller value can make the spacing between all operators looser or tighter.


<< back next >>




Tipp der data2type-Redaktion:
Zum Thema MathML bieten wir auch folgende Schulungen zur Vertiefung und professionellen Fortbildung an:


Copyright © CHARLES RIVER MEDIA, INC., Massachusetts (USA) 2003
Printing of the online version is permitted exclusively for private use. Otherwise this chapter from the book "The MathML Handbook" is subject to the same provisions as those applicable for the hardcover edition: The work including all its components is protected by copyright. All rights reserved, including reproduction, translation, microfilming as well as storage and processing in electronic systems.

CHARLES RIVER MEDIA, INC., 20 Downer Avenue, Suite 3, Hingham, Massachusetts 02043, United States of America