XML-Technologien / MathML / Presentation elements / mstyle
(Excerpt from "The MathML Handbook" by Pavi Sandhu)
Syntax
<mstyle>(child)*</mstyle>
Description
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.
Attributes
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 |
|---|---|---|
| [+ | -] unsigned-integer | inherited |
| | inherited |
| number |
|
| number v-unit | |
| inherited | |
| #rgb | #rrggbb | | |
| number h-unit | |
| number h-unit |
|
| number h-unit | |
| number h-unit |
|
| number h-unit |
|
| number h-unit |
|
| number h-unit | |
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 attributescriptsizemultiplier.displaystyle: controls the value of two other attributes inmoelements, namelylargeopandmovablescripts. These attributes can take one of several values, depending on the value of thedisplaystyleattribute in their environment. In general, thedisplaystyleattribute has the valuetruefor equations intended for display andfalsefor 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 setdisplaystyletofalseand increase the value ofscriptlevel. Ten elements change the value of eitherdisplaystyleorscriptlevel:msub,msup,msubsup,munder,mover,munderover,mmultiscripts,mfrac,mroot, andmtable.scriptsizemultiplier: is a number that determines the change in font size caused byscriptlevel. The new font size is equal to the old font size multiplied by thescriptsizemultiplierto the power of the change inscriptlevel.scriptminsize: is the minimum size to which a font can be reduced as a consequence of changes inscriptlevel.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:
veryverythinmathspaceverythinmathspacethinmathspacemediummathspacethickmathspaceverythickmathspaceveryverythickmathspace
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.
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