Presentation and content
(Excerpt from "The MathML Handbook" by Pavi Sandhu)
The appearance of mathematical notation and its conceptual meaning have a complex relationship. The same notation can express two completely different mathematical meanings, depending on the context. For example, the expression can be interpreted in two ways:
- The value of a function f with the arguments x and y.
- The variable f multiplied by the sum of x and y.
Conversely, a given mathematical concept can be expressed by more than one notation. For example, the notations and both have the same mathematical meaning; that is, the derivative of the function f with respect to x. Yet the two notations are distinct in their visual appearance. Similarly, the operation of dividing a by b can be represented in at least three different ways:
, , or .
Due to such ambiguity, it is important to have some way of independently specifying the appearance and meaning of a given type of mathematical notation. The solution adopted in MathML is to use two separate sets of tags for these two purposes. Presentation tags are used to encode the appearance of mathematical notation — that is, its visual two-dimensional structure. Content tags, on the other hand, are used to encode the symbolic meaning conveyed by the notation.
Hence, any mathematical expression can be represented in several different ways in MathML:
- Using only presentation tags. This type of markup is called presentation markup. It is useful in situations where the primary goal is to display mathematical notation, without regard to its meaning. This is the case, for example, when you include equations in a document that is intended only for display on the Web.
- Using only content tags. This type of markup is called content markup. It is useful in situations where it is important to encode mathematical meaning; for example, if you want to post an equation on a Web page that readers can copy and paste into Mathematica for evaluation.
- Using a combination of presentation and content tags. This type of markup is called combined markup and is used when you want to encode both the appearance and meaning of equations. For example, you can use combined markup to specify a nonstandard notation for a common mathematical construct or to associate a specific mathematical meaning with a certain type of notation that usually has a different meaning.
MathML ignores all whitespace (spaces, tabs, new lines, or carriage returns) that occurs outside of token elements. Whitespace occurring within token elements is trimmed from the ends; that is, all whitespace at the beginning and end of the content is removed Whitespace internal to MathML elements is collapsed so that each sequence of one or more spaces is replaced by exactly one blank space.
If you need to explicitly encode whitespace characters at the start or end of the content of a token element or in sequences other than a single space, you can do so by using the entity reference or the whitespace character entities (such as  ,  , and   ). For whitespace that occurs outside of token elements, you should use an mspace element instead of an mtext element that contains whitespace entities.
|<< back||next >>|
Copyright © CHARLES RIVER MEDIA, INC., Massachusetts (USA) 2003
Printing of the online version is permitted exclusively for private use. Otherwise this chapter from the book "The MathML Handbook" is subject to the same provisions as those applicable for the hardcover edition: The work including all its components is protected by copyright. All rights reserved, including reproduction, translation, microfilming as well as storage and processing in electronic systems.
CHARLES RIVER MEDIA, INC., 20 Downer Avenue, Suite 3, Hingham, Massachusetts 02043, United States of America