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

The mpadded element provides a way to add extra space or "padding" around its content. It works by modifying the apparent size and position of the bounding box in which its content is rendered. The bounding box of the content is surrounded by an extra bounding box. The attributes of the mpadded element determine the size and position of this extra box.

The mpadded element has four attributes:

• width: determines the horizontal length of the bounding box. The bounding box of the mpadded element is rendered flush left with the bounding box of its contents. Hence, when you increase the width, you add space to the right of the box’s contents.

• lspace: specifies the amount of space between the left edge of the bounding box and the left edge of the bounding box of its contents.

• height: specifies the vertical space between the baseline of the contents (the line along the bottom of most letter glyphs in normal text rendering) and the top of the bounding box of the mpadded element.

• depth: specifies the vertical space between the baseline of the contents and the bottom of the bounding box of the mpadded element.

You can specify each of these attributes in several different ways: as a number followed by a unit, as a percentage, or as a multiple of the default value or a named space. Here are some examples of the mpadded element that show different ways of specifying the attribute values:

``````<mpadded width="+0em"> ... </mpadded>

``````

Each attribute value can take positive or negative values. You can use negative values of the attributes to fake the appearance of certain characters. For example, the open-face R character used to represent the set of all real numbers would normally be indicated using the character entity reference, as shown below:

<mi>&#x211D;</mi>

Alternatively, you could use the named entity reference for this character, &Ropf;. However, on a system where the appropriate font to display the open-face character is not available, you could approximate the appearance of this character using the following markup:

``````<mrow>
<mspace width="0.3em"/>
<mtext>|</mtext>
</mrow>
``````

However, this type of markup alters the meaning of the expression and hinders its interpretation by audio renderers and computer algebra systems. Hence, MathML specifically discourages the use of spacing to convey meaning.

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