<< Chapter < Page Chapter >> Page >
Scripting requires changing baseline of scripting character(s).

Mathematical notation requires scripting around a base entity. The MathML provides scripting capability through scripting elements : msub, msup and msubsup. Scripting in MathML is not limited only to putting a subscript or superscript around an expression, but vertically integrated upper and lower scripts, which are handy to display limits on integrals and to meet such other requirements of rendering structured display.

Rendering of script is done by manipulating certain attributes that elements acquire from the environment such as “xml” or “html” document.

"msub" and "msup" layout scripting elements

Specific attributes :   superscriptshift, superscriptshift

    Attribute value types

  • superscriptshift, superscriptshift (default : automatic) : number v-unit

Each of these scripting elements takes two arguments base and subscript, which may be valid MathML expressions. Syntax of the two elements are as given here :

<msub> base subscript </msub> <msup> base superscript </msup>

Each of these scripting elements takes two arguments base and subscript, which may be valid MathML expressions. Implementation of “msub” element shifts the baseline of the script, while retaining that of the base. In the case of “msup” element, the baseline shifts the script up. In both cases, display style of the scripts are also changed

The amount of shifting can be specified by giving numerical values to “subscriptshift” and “superscriptshift” attributes preferably in "ex" unit. The example here demonstrates implementation of both “msup” and “msub” elements.

Subscript and supersubscipt

<m:math display="block"> <m:table> <m:mtr> <m:mtd> <m:msup> <m:mi> m </m:mi> <m:mrow> <m:mn> 1 </m:mn> <m:mo> &InvisibleComma; </m:mo> <m:mn> 2 </m:mn> </m:mrow> </m:msup> </m:mtd> </m:mtr> <m:mtr> <m:mtd> <m:msub subscriptshift="1.5ex"> <m:mi> m </m:mi> <m:mrow> <m:mn> 1 </m:mn> <m:mo> &InvisibleComma; </m:mo> <m:mn> 2 </m:mn> </m:mrow> </m:msub> </m:mtd> </m:mtr> </m:table> </m:math>

Save the file after editing as “test.xml”. The display looks like :

m 1 2 m 1 2

Observe that “&InvisibleComma;” entity reference impart the meaning that scripts is read one two and not as one multiplied by 2.

"msubsup" layout scripting element

Specific attributes :   subscriptshift superscriptshift

    Attribute value types

  • subscriptshift (default : automatic) : number v-unit
  • superscriptshift (default : automatic) : number v-unit

The element takes three arguments. First argument of the element is base; second argument is subscript; and third argument is superscript. The syntax of the element is :

<msubsup> base subscript superscript </msubsup>

Scripting “msubsup” element affects simultaneous implementation of a subscript and superscript, which are vertically aligned. This is an extremely useful scripting element as this element can be used to display limit values on variety of expression, including an integral sign.

Questions & Answers

what is biology
Hajah Reply
the study of living organisms and their interactions with one another and their environments
AI-Robot
what is biology
Victoria Reply
HOW CAN MAN ORGAN FUNCTION
Alfred Reply
the diagram of the digestive system
Assiatu Reply
allimentary cannel
Ogenrwot
How does twins formed
William Reply
They formed in two ways first when one sperm and one egg are splited by mitosis or two sperm and two eggs join together
Oluwatobi
what is genetics
Josephine Reply
Genetics is the study of heredity
Misack
how does twins formed?
Misack
What is manual
Hassan Reply
discuss biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles
Joseph Reply
what is biology
Yousuf Reply
the study of living organisms and their interactions with one another and their environment.
Wine
discuss the biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles in an essay form
Joseph Reply
what is the blood cells
Shaker Reply
list any five characteristics of the blood cells
Shaker
lack electricity and its more savely than electronic microscope because its naturally by using of light
Abdullahi Reply
advantage of electronic microscope is easily and clearly while disadvantage is dangerous because its electronic. advantage of light microscope is savely and naturally by sun while disadvantage is not easily,means its not sharp and not clear
Abdullahi
cell theory state that every organisms composed of one or more cell,cell is the basic unit of life
Abdullahi
is like gone fail us
DENG
cells is the basic structure and functions of all living things
Ramadan
What is classification
ISCONT Reply
is organisms that are similar into groups called tara
Yamosa
in what situation (s) would be the use of a scanning electron microscope be ideal and why?
Kenna Reply
A scanning electron microscope (SEM) is ideal for situations requiring high-resolution imaging of surfaces. It is commonly used in materials science, biology, and geology to examine the topography and composition of samples at a nanoscale level. SEM is particularly useful for studying fine details,
Hilary
cell is the building block of life.
Condoleezza Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

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