<< 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.

Vertical stretching

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

x = ( a b )

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.

Vertical stretching

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

x = ( a b + c d e )

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 :

Vertical stretching

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

x = ( a b d e ) ( a b d e d e )

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.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, A primer in mathml. OpenStax CNX. Apr 19, 2006 Download for free at http://cnx.org/content/col10345/1.16
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'A primer in mathml' conversation and receive update notifications?

Ask