The MathML Handbook (Charles River Media Internet & Web Design)

 < Day Day Up > 


13.2 Listing of Presentation Elements

For brevity, attributes common to all token elements are listed only once, in this section. They are not included in the list of attributes for each token element but are implied. Table 13.1 shows the style attributes of token elements.

Table 13.1: Style Attributes of Token Elements

Attribute

Values

Default

mathbackground

#rgb | #rrggbb | html-color name

inherited

mathcolor

#rgb | #rrggbb | html-color name

inherited

mathsize,

small | normal | big | number v-unit

inherited

mathvariant

normal | bold | italic | script | bold-fraktur | double-struck | bold-script | fraktur | sans-serif | bold-sans-serif | sans-serif-italic | sans-serif-bold-italic | monospace normal

(except on <mi>)

fontsize

number v-unit

inherited

fontweight

normal | bold

inherited

fontstyle

normal | italic

normal (except on <mi>)

fontfamily

string | css-fontfamily

inherited

color

#rgb | #rrggbb | html-colorname

inherited

html-colorname refers to one of the named color keywords defined in HTML 4 (that is, aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow).

maction

Syntax

<maction>(child)*</maction>

Description

The maction element is used to associate interactive actions with specific parts of a MathML expression. This element is provided as a means of hooking up interactivity features implemented in a specific application to a MathML expression. Hence, the type of actions supported, if any, depend on the rendering application.

Attributes

This element accepts the two attributes shown in Table 13.2.

Table 13.2: Attributes of maction

Attribute

Values

Default

selection,

number

1

actiontype

Depends on application

Depends on application

These attributes have the following meaning:

maligngroup

Syntax

<maligngroup/>

Description

The maligngroup element is used to indicate the start of a new alignment group in a table column.

Attributes

None.

malignmark

Syntax

<malignmark/>

Description

The malignmark element is used to indicate an alignment point inside an alignment group in a table column.

Attributes

This element accepts the one attribute shown in Table 13.3.

Table 13.3: Attributes of malignmark

Attribute

Values

Default

edge

left | right

{left}

If edge="left", the alignment point is the left edge of the nearest element to the right of the malignmark element. If edge="right", the alignment point is the right edge of the nearest element to the left of the malignmark element.

menclose

Syntax

<menclose>(child)</menclose>

Description

The menclose element encloses its contents inside a notational symbol of a type specified by the value of its notation attribute.

Attributes

This element accepts the one attribute shown in Table 13.4.

Table 13.4: Attributes of menclose

Attribute

Values

Default

notation

longdiv | actuarial | radical

radical

The notation attribute determines the type of symbol placed around the contents.

merror

Syntax

<merror>(child)*</merror>

Description

The merror element is used to enclose information about syntax errors found when MathML markup is processed. The contents of the element are typically rendered in a different color or font style, to distinguish them from the surrounding text. The exact details of rendering depend on the specific processing application.

Attributes

None.

mfenced

Syntax

<mfenced>(child)*</mfenced>

Description

The mfenced element is used as a compact way to express common notational constructs involving fences, such as braces, brackets, or parentheses. By default, this element renders its contents enclosed in parentheses with arguments separated by commas.

Attributes

This element accepts the three attributes shown in Table 13.5.

Table 13.5: Attributes of mfenced

Attribute

Values

Default

open

string

(

close

string

)

separators

character*

,

These attributes have the following meaning:

mfrac

Syntax

<mfrac>numerator denominator</mfrac>

Description

The mfrac element is used to display fractions or fraction-like notation, such as binomial coefficients.

Attributes

This element accepts the four attributes shown in Table 13.6.

Table 13.6: Attributes of mfrac

Attribute

Values

Default

linethickness

number [v-unit] | thin | medium | thick

axis

numalign

left | center | right

center

denomalign

(left | center | right)+

center

bevelled

true | false

false

These attributes have the following meaning:

mglyph

Syntax

<mglyph fontfamily="..." index="..." alt="..."/>

Description

The mglyph element is provided as an extension mechanism to allow arbitrary symbols and other extended characters to be displayed. It is displayed as a specific glyph in a specific font, the values of which are determined by its attributes.

Attributes

This element accepts the nine attributes common to all token elements. In addition, it accepts the three attributes shown in Table 13.7.

Table 13.7: Attributes of mglyph

Attribute

Values

Default

fontfamily

string | css-fontfamily

required

index

integer

required

alt

string

required

These attributes have the following meaning:

mi

Syntax

<mi>PCDATA</mi>

Description

This element is used to represent identifiers such as names of variables and functions. The content of an mi element is displayed in italics if it is a single character and in an upright font otherwise.

Attributes

This element accepts the nine attributes common to all token elements.

mlabeledtr

Syntax

<mlabeledtr>label (<mtd>)*</mlabeledtr>

Description

The mlabeledtr element is used to represent a single labeled row in a table or matrix. It can occur only as a child element of an mtable element. It takes zero or more mtd elements, each of which corresponds to a single cell of the table or matrix.

Attributes

This element accepts the three attributes shown in Table 13.8.

Table 13.8: Attributes of mlabeledtr

Attribute

Values

Default

rowalign

(top | bottom | center | baseline | axis)+

baseline

columnalign

(left | center | right)+

center

groupalign

groupalignment-list-list

{left}

These attributes have the same meaning as in the mtable element.

mmultiscripts

Syntax

<mmultiscripts> base (subscript superscript)* [<mprescripts/> (presubscript presuperscript)*] </mmultiscripts>

Description

The mmultiscripts element is used to attach prescripts and tensor indices to a base. It increments scriptlevel by 1, and sets displaystyle to false, within each of its arguments except base. It leaves both attributes unchanged within base.

Attributes

This element has the two attributes shown in Table 13.9.

Table 13.9: Attributes of mmultiscripts

Attribute

Values

Default

subscriptshift

number v-unit

automatic

superscriptshift

number v-unit

automatic

These attributes have the following meaning:

mn

Syntax

<mn>PCDATA</mn>

Description

The mn element is used to represent a numeric literal; that is, a string that represents a number. A numeric literal can consist of an optional "+" or "-" sign followed by an arbitrary number of digits, possibly separated by a decimal point. The number can be in any base and any standard notation. The contents of the mn element are typically displayed in an upright font.

Numbers that have some structure (such as negative numbers, complex numbers, fractions, and symbolic constants) cannot be specified as simple mn elements and require additional presentation elements.

Attributes

The mn element accepts the nine attributes common to all token elements.

mo

Syntax

<mo>PCDATA</mo>

Description

The mo element is used to represent operators, fences, separators, and accents. Fences include all characters used as delimiters such as braces, brackets, parentheses, and absolute value bars.

This element has a large collection of attributes that affect the details of how it is rendered. An operator dictionary, which specifies the values of attributes for most common operators, determines the default value of the attributes. If an attribute value is not specified in the operator dictionary, the attribute takes a generic default value, specified in Table 13.10.

Attributes

The mo element accepts the nine attributes common to all token elements. In addition, it has twelve other attributes, shown in Table 13.10. The default values for most of these attributes are typically determined from the operator dictionary. Some default values in Table 13.10 are shown with an asterisk to indicate that they are generic default values, to be used only if no match is found for that attribute in the operator dictionary.

Table 13.10: Attributes of mo

Attribute

Values

Default

form

prefix | infix | postfix

Determined by position in <mrow>

lspace

number h-unit | namedspace

thickmathspace*

rspace

number h-unit | namedspace

thickmathspace*

stretchy

true | false

false*

symmetric

true | false

true*

maxsize

number [v-unit | h-unit] | namedspace | infinity

infinity*

minsize

number | namedspace

1*

largeop

true | false

false*

movablelimits

true | false

false*

fence

true | false

false*

separator

true | false

false*

accent

true | false

false*

These attributes have the following meaning:

mover

Syntax

<mover> base overscript </mover>

Description

The mover element is used for representing an overscript attached to a base.

By default, the mover element sets displaystyle to false in overscript and increments scriptlevel by 1 if accent="false". It leaves both attributes unchanged within base.

Attributes

This element has the one attribute shown in Table 13.11.

Table 13.11: Attributes of mover

Attribute

Values

Default

accent

true | false

automatic

The accent attribute specifies whether the expression that appears in the overscript position should be treated as an accent or a limit. Accents are rendered in normal size and closer to the base, while limits are rendered in a smaller size and farther away from the base.

mpadded

Syntax

<mpadded>(child)*</mpadded>

Description

The mpadded element is used to make precise adjustments to the position of an expression relative to its surrounding elements. It changes the position of the bounding box used for rendering its contents by an amount determined by its attributes.

Attributes

This element accepts the four attributes shown in Table 13.12.

Table 13.12: Attributes of mpadded

Attribute

Values

Default

width

[+ | -] number | (%[pseudo-unit] | pseudo-unit | h-unit | namedspace)

same as content

lspace

[+ | -] number | (%[pseudo-unit] | pseudo-unit | h-unit)

same as the element's content

height

[+ | -] number | (%[pseudo-unit] | pseudo-unit | h-unit)

same as the element's content

depth

[+ | -] number | (%[pseudo-unit] | pseudo-unit | h-unit)

same as the element's content

These attributes have the following meaning:

mphantom

Syntax

<mphantom>(child)*</mphantom>

Description

The mphantom element is used to render an expression invisibly. It inserts an amount of blank space equal to the space that would have been needed to render its contents if they were not enclosed in an mphantom element. This property is useful in aligning certain types of expressions.

Attributes

None.

mprescripts

Syntax

<mmultiscripts> base (subscript superscript)* [<mprescripts/> (presubscript presuperscript)*] </mmultiscripts>

Description

This is an empty element used as a child element of the <mmultiscripts> element to indicate that the elements after it should be displayed in the prescript position.

Attributes

None.

mroot

Syntax

<mroot>base index</mroot>

Description

The mroot element is used to display arbitrary roots. The base is displayed enclosed in a radical sign with the index placed outside the radical sign, which is the conventional notation for roots.

Attributes

None.

mrow

Syntax

<mrow>(child)*</mrow>

Description

The mrow element is used to group any number of subexpressions. Its elements are displayed in a horizontal row, from left to right.

Attributes

None.

ms

Syntax

<ms>PCDATA</ms>

Description

The ms element is used to represent string literals, a concept of importance for programming languages and computer algebra systems. By default, its contents are rendered enclosed in quotation marks.

Attributes

This element accepts the nine attributes common to all token elements. In addition, it accepts the two attributes shown in Table 13.13.

Table 13.13: Attributes of ms

Attribute

Values

Default

lquote

character

&quot;

rquote

character

&quot;

These attributes have the following meaning:

mspace

Syntax

<mspace/>

Description

The mspace element is used to insert a blank space of arbitrary size. The size of the space inserted is determined by the value of its attributes. The default values of the attributes are chosen to have no effect on visual rendering. Hence, to insert any additional space, you must use this element with explicit attribute values specified.

Attributes

This element accepts the nine attributes common to all token elements. In addition, it accepts the three attributes shown in Table 13.14.

Table 13.14: Attributes of mspace

Attribute

Values

Default

width

number h-unit | namedspace

0 em

height

number v-unit

0 ex

depth

number v-unit

0 ex

These attributes have the following meaning:

msqrt

Syntax

<msqrt>base</msqrt>

Description

The msqrt element is used to display square roots. It takes a single child element, which is displayed with a square root sign around its contents. If it is written with more than one child element, an mrow element is inferred around the contents.

Attributes

None.

mstyle

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 Table 13.15. In addition, it accepts all attributes of all other presentation elements, except for those attributes that have a required value.

Table 13.15: 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:

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:

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.

msub

Syntax

<msub>base subscript</msub>

Description

The msub element is used for representing a subscript attached to a base.

By default, the msub element automatically increments scriptlevel by 1 and sets displaystyle to false in subscript but leaves both attributes unchanged within base.

Attributes

This element has the one attribute shown in Table 13.16.

Table 13.16: Attributes of msub

Attribute

Values

Default

subscriptshift

number v-unit

automatic

The subscriptshift attribute specifies the minimum amount by which the subscript should be shifted down relative to the baseline of the base expression.

msubsup

Syntax

<msubsup>base subscript superscript</msubsup>

Description

The msubsup element is used for representing a subscript attached to a base.

By default, the msubsup element automatically increments scriptlevel by 1 and sets displaystyle to false in both subscript and superscript but leaves both attributes unchanged within base.

Attributes

This element has the two attributes shown in Table 13.17.

Table 13.17: Attributes of msubsup

Attribute

Values

Default

subscriptshift

number v-unit

automatic

superscriptshift

number v-unit

automatic

These attributes have the following meaning:

msup

Syntax

<msup>base superscript</msup>

Description

The msup element is used for representing a superscript attached to a base.

By default, the msup element automatically increments scriptlevel by 1 and sets displaystyle to false in superscript but leaves both attributes unchanged within base.

Attributes

This element has the one attribute shown in Table 13.18.

Table 13.18: Attributes of msup

Attribute

Values

Default

superscriptshift

number v-unit

automatic

The superscriptshift attribute specifies the minimum amount by which the superscript should be shifted up relative to the baseline of the base expression.

mtable

Syntax

<mtable>(child)*</mtable>

Description

The mtable element is used to represent tables or matrices. It takes zero or more mtr or mlabeledtr elements, each of which corresponds to a single row of the table or matrix.

Attributes

This element accepts the eighteen attributes shown in Table 13.19.

Table 13.19: Attributes of mtable

Attribute

Values

Default

align

(top | bottom | center | baseline | axis)

[rownumber] axis

rowalign

(top | bottom | center | baseline | axis)+

baseline

columnalign

(left | center | right)+

center

columnwidth

(auto | number h-unit | namedspace | fit ) +

auto

width

auto | number h-unit

auto

rowspacing

(number v-unit ) +

1.0 ex

columnspacing

(number h-unit | namedspace ) +

0.8 em

rowlines

(none | solid | dashed) +

none

columnlines

(none | solid | dashed) +

none

equalrows

true | false

false

equalcolumns

true | false

false

frame

(none | solid | dashed) +

none

framespacing

(number h-unit | namedspace) (number v-unit | namedspace)

0.4 em 0.5 ex

displaystyle

true | false

false

side

left | right | leftoverlap | rightoverlap

right

minlabelspacing

number h-unit

0.8 em

groupalign

groupalignment-list-list

{left}

alignmentscope

true | false

true

For several of these attributes, the value can be a sequence of zero or more entries. In such cases, the first entry applies to the first row or column, the second entry to the second row/column, and so on. If there are fewer entries than rows/columns in the table, the last entry is repeated as many times as necessary. If there are more entries than rows/columns, the extra entries are ignored.

These attributes have the following meaning:

Possible values are:

mtd

Syntax

<mtd>(child)*</mtd>

Description

The mtd element is used to represent a single cell in a table or matrix. It can occur only as a child element of an mtr or mlabeledtr element.

Attributes

This element accepts the five attributes shown in Table 13.20.

Table 13.20: Attributes of mtd

Attribute

Values

Default

rowalign

(top | bottom | center | baseline | axis)+

baseline

columnalign

(left | center | right)+

center

groupalign

groupalignment-list-list

{left}

rowspan

number

1

columnspan

number

1

These attributes have the following meaning:

mtext

Syntax

<mtext>PCDATA</mtext>

Description

The mtext element is used to represent plain text that must be included literally in a mathematical expression.

Attributes

The mtext element accepts the nine attributes common to all token elements.

mtr

Syntax

<mtr>(<mtd>)*</mtr>

Description

The mtr element is used to represent a single row in a table or matrix. It takes zero or more mtd elements, each of which corresponds to a single cell of the table or matrix.

Attributes

This element accepts the three attributes shown in Table 13.21.

Table 13.21: Attributes of mtr

Attribute

Values

Default

rowalign

(top | bottom | center | baseline | axis)+

baseline

columnalign

(left | center | right)+

center

groupalign

groupalignment-list-list

{left}

These attributes have the same meaning as in the mtable element.

munder

Syntax

<munder>base underscript</munder>

Description

The munder element is used for representing an underscript attached to a base.

By default, the munder element sets displaystyle to false in underscript and increments scriptlevel by 1 if accentunder="false". It leaves both attributes unchanged within base.

Attributes

This element has the one attribute shown in Table 13.22.

Table 13.22: Attributes of munder

Attribute

Values

Default

accentunder

true | false

automatic

The accentunder attribute specifies whether the expression that appears in the underscript position should be treated as an accent or a limit. Accents are rendered in normal size and closer to the base, while limits are rendered in a smaller size and farther away from the base.

munderover

Syntax

<munderover>base underscript overscript</munderover>

Description

The munderover element is used for representing an underscript and overscript attached to a base.

By default, the munderover element sets displaystyle to false in underscript and overscript and increments scriptlevel by 1 only when accentunder="false". It leaves both attributes unchanged within base.

Attributes

This element has the two attributes shown in Table 13.23.

Table 13.23: Attributes of munderover

Attribute

Values

Default

accentunder

true | false

automatic

accent

true | false

automatic

These attributes have the following meaning:

none

Syntax

<mmultiscripts> base (subscript|<none/> superscript|<none/>)* [<mprescripts/> (presubscript|<none/> presuperscript|<none/>)*] </mmultiscripts>

Description

The none element is used as a child element of the mmultiscripts element to indicate that the position opposite to a particular subscript or superscript is blank.

Attributes

None.


 < Day Day Up > 

Категории