I Schema

I.8 Module LaTeXML-math

Add to Inline.class

The math module defines LaTeXML’s internal representation of mathematical content, including the basic math container Math. This element is considered inline, as it will be contained within some other block-level element, eg. equation for display-math.

|=
Pattern Math.class

This class defines the content of the Math element. Additionally, it could contain MathML or OpenMath, after postprocessing.

Content:
Expansion:

(XMath)

Used by:
Pattern XMath.class

These elements comprise the internal math representation, being the content of the XMath element.

Content:

(XMApp  |  XMTok  |  XMRef  |  XMHint  |  XMArg  |  XMWrap  |  XMDual  |  XMText  |  XMArray  |  ERROR)

Expansion:

((XMApp  |  XMTok  |  XMRef  |  XMHint  |  XMArg  |  XMWrap  |  XMDual  |  XMText  |  XMArray  |  ERROR))

Used by:
Element Math

Outer container for all math. This holds the internal XMath representation, as well as image data and other representations.

Used by:
Pattern Math_attributes

Attributes for Math.

Attributes:
Attribute mode

= (display  |  inline)

display or inline mode.

Attribute tex

text

reconstruction of the TeX that generated the math.

Attribute content-tex

text

more semantic version of tex.

Attribute text

text

a textified representation of the math.

Pattern Math_model

Content model for Math.

Content:
Expansion:
Pattern XMath.attributes

Common attributes for the various XMath elements.

Attributes:
Attribute role

text

The role that this item plays in the Grammar.

Attribute enclose

text

an enclose style to enclose the object with legitimate values being those of MathML’s menclose notations;

Attribute lpadding

text

left, or leading, (presumably non-semantic) padding space.

Attribute rpadding

text

right, or trailing, (presumably non-semantic) padding space.

Attribute possibleFunction

text

an annotation placed by the parser when it suspects this token may be used as a function.

Attribute href

text

reference to an arbitrary url.

Used by:
Element XMath

Internal representation of mathematics.

Used by:
Pattern XMath_attributes

Attributes for XMath.

Attributes:
Pattern XMath_model

Content model for XMath.

Content:
Expansion:
Element XMTok

General mathematical token.

Used by:
Pattern XMTok_attributes

Attributes for XMTok.

Attributes:
Attribute name

text

The name of the token, typically the control sequence that created it.

Attribute meaning

text

A more semantic name corresponding to the intended meaning, such as the OpenMath name.

Attribute omcd

text

The OpenMath CD for which meaning is a symbol.

Attribute scriptpos

text

An encoding of the position of this token as a sub/superscript, used to handle aligned and nested scripts, both pre and post. It is a concatenation of (pre—mid—post), which indicates the horizontal positioning of the script with relation to it’s base, and a counter indicating the level. These are used to position the scripts, and to pair up aligned sub- and superscripts. NOTE: Clarify where this appears: token, base, script operator, apply?

Attribute thickness

text

A thickness used for drawing any lines which are part of presenting the token, such as the fraction line for the fraction operator.

Attribute stretchy

boolean

Whether or not the symbol should be stretchy. This shares MathML’s ambiguity about horizontal versus vertical stretchiness. When not set, defaults to whatever MathML’s operator dictionary says.

Attribute mathstyle

= (display  |  text  |  script  |  scriptscript)

The math style used for displaying the application of this token when it represents some sort of fraction, variable-sized operator or stack of expressions (note that this applies to binomials or other stacks of expressions as well as fractions). Values of display or text correspond to TeX’s displaystyle or textstyle, while inline indicates the stack should be arranged horizontally (the layout may depend on the operator).

Pattern XMTok_model

Content model for XMTok.

Content:

text*

Expansion:

(text*)

Element XMApp

Generalized application of a function, operator, whatever (the first child) to arguments (the remaining children). The attributes are a subset of those for XMTok.

Used by:
Pattern XMApp_attributes

Attributes for XMApp.

Attributes:
Attribute name

text

The name of the token, typically the control sequence that created it.

Attribute meaning

text

A more semantic name corresponding to the intended meaning, such as the OpenMath name.

Attribute scriptpos

text

An encoding of the position of this token as a sub/superscript, used to handle aligned and nested scripts, both pre and post. (See XMTok for details)

Pattern XMApp_model

Content model for XMApp.

Content:
Expansion:
Element XMDual

Parallel markup of content (first child) and presentation (second child) of a mathematical object. Typically, the arguments are shared between the two branches: they appear in the content branch, with id’s, and XMRef is used in the presentation branch

Used by:
Pattern XMDual_attributes

Attributes for XMDual.

Attributes:
Pattern XMDual_model

Content model for XMDual.

Content:
Expansion:
Element XMHint

Various layout hints, usually spacing, generally ignored in parsing. The attributes are a subset of those for XMTok.

Used by:
Pattern XMHint_attributes

Attributes for XMHint.

Attributes:
Attribute name

text

The name of the kind of hint.

Pattern XMHint_model

Content model for XMHint.

Content:

empty

Expansion:

()

Element XMText

Text appearing within math.

Used by:
Pattern XMText_attributes

Attributes for XMText.

Attributes:
Attribute scriptpos

text

An encoding of the position of this token as a sub/superscript, used to handle aligned and nested scripts, both pre and post. (See XMTok for details)

Pattern XMText_model

Content model for XMText.

Content:

(text  |  Inline.class  |  Misc.class)*

Expansion:

((text  |  Inline.class  |  Misc.class)*)

Element XMWrap

Wrapper for a sequence of tokens used to assert the role of the contents in its parent. This element generally disappears after parsing. The attributes are a subset of those for XMTok.

Used by:
Pattern XMWrap_attributes

Attributes for XMWrap.

Attributes:
Attribute rule

text

The grammatical rule that should apply to the contained sequence

Attribute name

text

Attribute meaning

text

A more semantic name corresponding to the intended meaning, such as the OpenMath name.

Attribute style

text

Attribute scriptpos

text

An encoding of the position of this token as a sub/superscript, used to handle aligned and nested scripts, both pre and post. (See XMTok for details)

Pattern XMWrap_model

Content model for XMWrap.

Content:
Expansion:
Element XMArg

Wrapper for an argument to a structured macro. It implies that its content can be parsed independently of its parent, and thus generally disappears after parsing.

Used by:
Pattern XMArg_attributes

Attributes for XMArg.

Attributes:
Attribute rule

text

The grammatical rule that should apply to the contained sequence

Attribute scriptpos

text

An encoding of the position of this token as a sub/superscript, used to handle aligned and nested scripts, both pre and post. (See XMTok for details)

Pattern XMArg_model

Content model for XMArg.

Content:
Expansion:
Element XMRef

Structure sharing element typically used in the presentation branch of an XMDual to refer to the arguments present in the content branch.

Used by:
Pattern XMRef_attributes
Pattern XMRef_model

Content model for XMRef.

Content:

empty

Expansion:

()

Element XMArray

Math Array/Alignment structure.

Used by:
Pattern XMArray_attributes

Attributes for XMArray.

Attributes:
Attribute name

text

The name of the object, typically the control sequence that created it.

Attribute meaning

text

A more semantic name corresponding to the intended meaning of the object, such as the OpenMath name.

Attribute omcd

text

The OpenMath CD for which meaning is a symbol.

Attribute rowsep

the spacing between rows

Attribute colsep

the spacing between columns

Pattern XMArray_model

Content model for XMArray.

Content:
Expansion:

(XMRow*)

Element XMRow

A row in a math alignment.

Used by:
Pattern XMRow_attributes
Pattern XMRow_model

Content model for XMRow.

Content:
Expansion:

(XMCell*)

Element XMCell

A cell in a row of a math alignment.

Used by:
Pattern XMCell_attributes

Attributes for XMCell.

Attributes:
Attribute colspan

nonNegativeInteger

indicates how many columns this cell spans or covers.

Attribute rowspan

nonNegativeInteger

indicates how many rows this cell spans or covers.

Attribute align

text

specifies the alignment of the content.

Attribute width

text

specifies the desired width for the column.

Attribute border

text

records a sequence of t or tt, r or rr, b or bb and l or ll for borders or doubled borders on any side of the cell.

Attribute thead

= (column  |  column row  |  row)

whether this cell corresponds to a table row or column heading or both

Pattern XMCell_model

Content model for XMCell.

Content:
Expansion: