Name

math:mover (in formatting mode) — Formatting an overscript.

Synopsis

<xsl:template match="math:mover" mode="formatting">
<xsl:param name="x"/>
<xsl:param name="y"/>
<xsl:param name="baseline" select="0"/>
<xsl:param name="scriptlevel" tunnel="yes"/>
<xsl:param name="displayStyle" tunnel="yes"/>
<xsl:param name="overUnderSpace" tunnel="yes"/>
  ...
</xsl:template>

Description

It consists of two children: the base is the first child and the overscript is the second. First, the base is computed and information about its box is retrieved to achieve further computation. Due to accent behaviour, adjustement has to be done to compute the overscript. First, the accent attribute is retrieved. If no value has been entered, accent is set to false. Then, the overscript is computed and, after that, the accent value is recomputed by using the ACCENT attributes of the overscript if this one is an embellished operator. If the new accent value differs from the old one, the overscript have to be recomputed.

These two passes have to be done because the accent attribute modifies the computation of the overscript element. If accent is true, the overscript has to be closer and the scriptlevel is not modified. On the other hand, when accent is false, the scriptlevel for the overscript element has to be incremented by one. Therefore, this element will have a smaller font size.

After overscript computation, some information about its box is retrieved to compute the mover final box.

A shift value is then computed to move the overscript away from the base. This value is zero if the accent attribute is true, if not, this space shift is taken from the overUnderSpace global parameter.

The box representation of the moverbox is then computed. The height is the sum of the base height, the overscript height and the shift value previously computed. The baseline is the base's one and, since the overscript has to be drawn above the base, then the upper left corner Y coordinate is the Y coordinate of the overscript top edge.

Finally, the tree node is annotated with the box representation, with the embellished operator attributes and with shift values:

SHIFTX_BASE

This shift value is used to centre the base horizontally with the overscript if the base is smaller than the overscript.

SHIFTX_OVERSCRIPT

This shift value is used to centre the overscript horizontally with the base if the overscript is smaller than the base.

SHIFTY_BASE

This value is used to place the base at its final place. The overscript has to be placed above the base. Therefore, the base has to be shifted down on the y-axis.

SHIFTY_OVERSCRIPT

The overscript has to be shifted up on the y-axis to be drawn over the base.