<< Chapter < Page | Chapter >> Page > |
Control for stretching can be selective as well. For example, we can set stretchy=”false” on the opening parenthesis to restrict it to grow.
<m:math display="block">
<m:mrow>
<m:mi> x </m:mi>
<m:mo> = </m:mo>
<m:mo stretchy="false"> ( </m:mo>
<m:mfrac>
<m:mi>a</m:mi>
<m:mi>b</m:mi>
</m:mfrac>
<m:mo> ) </m:mo>
</m:mrow>
</m:math>
Save the file after editing as “test.xml”. The display looks like :
In situation where, the expression bounded by “mrow” tags contains terms of different heights, the stretchable parentheses grow to cover the highest of the terms.
<m:math display="block">
<m:mrow>
<m:mi> x </m:mi>
<m:mo> = </m:mo>
<m:mo> ( </m:mo>
<m:mfrac>
<m:mi>a</m:mi>
<m:mi>b</m:mi>
</m:mfrac>
<m:mo> + </m:mo>
<m:mfrac>
<m:mrow>
<m:mfrac>
<m:mi>c</m:mi>
<m:mi>d</m:mi>
</m:mfrac>
</m:mrow>
<m:mi>e</m:mi>
</m:mfrac>
<m:mo> ) </m:mo>
</m:mrow>
</m:math>
Save the file after editing as “test.xml”. The display lokks like :
The symmetric attribute is designed to stretch operator in both vertical and horizontal direction from the axis of the characters in equal magnitude. The symmetric attribute applies only to characters, which can stretch vertically; otherwise this attribute is ignored. Usually, this attribute is set “true” for vertically stretchable operator, but in certain cases involving matrix of unequal size, we may prefer to set it “false” as demonstrated in the example here :
<m:math display="block">
<m:mrow>
<m:mi> x </m:mi>
<m:mo> = </m:mo>
<m:mo symmetric="false"> ( </m:mo>
<m:mtable align="bottom">
<m:mtr>
<m:mtd>
<m:mi>a</m:mi>
</m:mtd>
<m:mtd>
<m:mi>b</m:mi>
</m:mtd>
</m:mtr>
<m:mtr>
<m:mtd>
<m:mn>d</m:mn>
</m:mtd>
<m:mtd>
<m:mn>e</m:mn>
</m:mtd>
</m:mtr>
</m:mtable>
<m:mo symmetric="false"> ) </m:mo>
<m:mo symmetric="false"> ( </m:mo>
<m:mtable align="bottom">
<m:mtr>
<m:mtd>
<m:mi>a</m:mi>
</m:mtd>
<m:mtd>
<m:mi>b</m:mi>
</m:mtd>
</m:mtr>
<m:mtr>
<m:mtd>
<m:mn>d</m:mn>
</m:mtd>
<m:mtd>
<m:mn>e</m:mn>
</m:mtd>
</m:mtr>
<m:mtr>
<m:mtd>
<m:mn>d</m:mn>
</m:mtd>
<m:mtd>
<m:mn>e</m:mn>
</m:mtd>
</m:mtr>
</m:mtable>
<m:mo symmetric="false"> ) </m:mo>
</m:mrow>
</m:math>
Save the file after editing as “test.xml”. The display lokks like :
Matrix operation of unequal sizes uses notation which is aligned to base. This type of controlling stretching in specific direction is, therefore, extremely useful in such situations.
Notification Switch
Would you like to follow the 'A primer in mathml' conversation and receive update notifications?