<< Chapter < Page Chapter >> Page >
A brief summary of Content MathML, including an example and its use.

Content MathML is a markup language used to describe mathematical expressions by correctly preseving their semantics . Rather than focusing on the way an equation or expression looks (like Presentation MathML), Content MathML (or C-MML) aims to preserve the meaning of the expression so that it can be interpreted by anyone. It does this by marking up each object with special tags that denote which operations to apply and in which order to apply them. The mathematical expression can then be view by anyone with a MathML-enabled browser with the correct math fonts installed.

If you're familiar with XML or HTML, then you've already seen markup languages in action. Markup languages are used for presenting documents such as web sites according to certain structural rules. In the case of C-MML, the tags contain all the structural information about the expression.

Below is the classic equation 2 2 4 represented in MathML.

<m:math><m:apply><m:eq/><m:apply><m:plus/><m:cn>2</m:cn><m:cn>2</m:cn></m:apply><m:cn>4</m:cn></m:apply></m:math>
2 2 4 expressed in Content MathML

Take a look at the above markup code: It may seem like a lot of information and tagging to represent something as easy-to-write as 2 2 4 . Remember, though, that C-MathML is interested in conveying the semantics of the expression, not just displaying symbols on the screen. Math is also a very explicit language, so MathML expressions must be somewhat long in order to convey meaning. Bigger and more complex equations benefit from the organization and explicit tagging of Content MathML, but for the sake of providing a simple example we will stick with 2 2 4 .

MathML was designed to be built by special programs called equation editors , and not written by hand. While equation editors are great tools to use while learning the language, they are not necessary to build an effective MathML expression. In fact, many equation editors produce semantically incorrect MathML. It's important to always double-check any MathML markup created with an equation editor, especially to look for errors in the order of operations.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Connexions guide to mathml. OpenStax CNX. Aug 24, 2009 Download for free at http://cnx.org/content/col10963/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Connexions guide to mathml' conversation and receive update notifications?

Ask