Skip to content Skip to navigation

OpenStax-CNX

You are here: Home » Content » Presentation MathML Versus Content MathML

Navigation

Recently Viewed

This feature requires Javascript to be enabled.
 

Presentation MathML Versus Content MathML

Module by: Connexions, Kyle Barnhart. E-mail the authors

Summary: A comparison of the two "syntaxes" of MathML: Presentation and Content. This module weighs the pros and cons of each syntax in a variety of teaching situations.

There are two "flavors," or synataxes, of MathML: Presentation MathML and Content MathML (or P-MathML and C-MathML, respectively). Both are valid markup and follow the same basic set of rules. P-MathML allows authors to have complete control over how an expression looks: Its size, color, which symbols are used, and the exact position of each object and element. Expressions written in C-MathML, on the other hand, maintain their sense of meaning by using tags that denote operations and how they should be applied. C-MathML preserves the semantics of an expression.

If this seems confusing, just remember that P-MML describes how an expression looks, while C-MML describes what an expression does.

There are drawbacks to using either P-MML or C-MML exclusively. Consider the following example which demonstrates how an expression might be read back by a screen reader (a tool used by the visually impaired to read on-screen text), depending on whether it was written using P-MathML or C-MathML.

Table 1: The semantics of Content versus Presentation MathML
Equation Content MathML Presentation MathML
Ad x =d 2 dx 2 3B4 x A 2 x 3 B 4 The integral of A with respect to X is equal to the second derivative of the quantity three times B to the fourth power with respect to X. Integral sign, A, d, X, equals, d, squared, quantity, three, B, fourth power, end quantity, divided by, d, X, squared.

Obviously, C-MML would be much more useful in this case; P-MML cannot convey any useful information about the equation except for how to write it down.

There are also cases in which P-MML is the more appropriate syntax of MathML to use. Consider a class of first-year calculus students learning about the derivative. Their instructor needs to write a math worksheet for the class in MathML. There are many ways to write the derivative of FF...

  • F'F'
  • F/dx
  • F-dot

... but this class only knows prime notation at the moment. If C-MML were used to build the worksheet, there is a chance that some students' browsers may display the derivative in the wrong form. Using P-MML, the instructor can specify which derivative notation to use.

It is important to consider the audience when authoring MathML. If accessibility and content are not an issue, then P-MML offers a very easy-to-understand syntax for sharing mathematical equations. As a rule of thumb, Content-MathML should be used whenever possible, since it allows expressions to be viewed on a wide range of browsers, platforms, languages, and regions.

Content actions

Download module as:

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks