<< Chapter < Page | Chapter >> Page > |
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.
Equation | Content MathML | Presentation MathML |
---|---|---|
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 ...
... 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.
Notification Switch
Would you like to follow the 'Connexions guide to mathml' conversation and receive update notifications?