MathML in DAISY 3 Structure Guidelines
Last Revised: June 30, 2012 Previous Version
Table of Contents
This section of the guidelines explains how to use elements to mark up mathematical expressions in DAISY books. The elements described here come from the W3C MathML Standard. MathML forms the basis of DAISY's Modular Extension for Mathematics, which is the normative reference upon which these guidelines are based.
A mathematical expression is a collection of symbols representing a mathematical idea. A mathematical expression may be as simple as a single variable or it may be a complex expression that spans many lines. It may occur either inline or in a block context.
All content that represents mathematical expressions should be marked up using MathML; images (pictures) alone should not be used to represent mathematical expression because these can not be rendered with synthetic speech or converted to braille.
Mathematical content must be enclosed in the <math>
element. The children
of the <math>
element must be valid MathML presentation elements. While MathML does not require the
altimg
and alttext
attributes to be present on the <math>
element, the MathML in DAISY Specification does require these attributes to be specified. These attributes provide a fallback
mechanism for basic DAISY players that are not capable of rendering MathML. The resolution of the
image referenced by the altimg
attribute should be such that it is readable when scaled for large print.
The alttext
value should
unambiguously describe the mathematical expression.
This section reiterates key ideas and rules from the MathML specification that pertain to authoring accessible MathML. Skip to Section 3 for guidelines on embedding MathML in DAISY documents.
For typical applications of Presentation MathML, such as embedding formulas in an HTML document or importing equations into an equation editor, the visual appearance of the math content needs to closely match the visual appearance of "traditional" notation, such as handwritten math or the output of a document processor or typesetting program. For these purposes, it is not always important that the markup is semantically interpretable, as long as the MathML content is rendered correctly for the visual user.
However, this is not the case for MathML in DAISY. Because the audience of DAISY books is broader, including readers with visual or learning impairments, MathML content must be suitable to be rendered intelligibly via speech processing and braille translation software in addition to the content's usual visual rendering. This means that the appropriateness of the underlying markup is just as important as its visual rendering.
In addition, as MathML continues to be adopted and incorporated into software, producing content according to the MathML specification will ensure that the content is portable and will render consistently, regardless of the medium. XSL Transformations and text processing on semantically correct content will also produce more predictable results.
Math in traditional notation employs several "invisible operators", i.e. operators whose symbols are not explicitly shown but function as if the visible operator were present. These operators should be marked up in MathML to preserve their meaning as well as to prevent possible ambiguity for the DAISY renderer.
DAISY renderers will not pronounce anything enclosed in an <mphantom>
element; therefore, do not use <mphantom>
in combination with an operator to create invisible operators.
The "invisible times" operator (⁢
) should be used to
indicate multiplication whenever the multiplication operator is used tacitly in
traditional notation.
Example
<m:math id="m01" alttext="y equals m x plus b" altimg="images/slope.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi> y </m:mi> <m:mo> = </m:mo> <m:mrow> <m:mi> m </m:mi> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:mi> x </m:mi> </m:mrow> <m:mo> + </m:mo> <m:mi> b </m:mi> </m:mrow> </m:math>
The "apply function" operator (⁡
) should be used to
indicate function application.
Example 1
<m:math id="m02" alttext="sine squared x plus cosine squared x equals 1" altimg="images/eq002.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:msup> <m:mi> sin </m:mi> <m:mn> 2 </m:mn> </m:msup> <m:mo> ⁡ <!--function application--> </m:mo> <m:mi> x </m:mi> </m:mrow> <m:mo> + </m:mo> <m:mrow> <m:msup> <m:mi> cos </m:mi> <m:mn> 2 </m:mn> </m:msup> <m:mo> ⁡ <!--function application--> </m:mo> <m:mi> x </m:mi> </m:mrow> <m:mo> = </m:mo> <m:mn> 1 </m:mn> </m:math>
Example 2
<m:math id="m03" alttext="left-parenthesis g of f right-parenthesis left-parenthesis x right-parenthesis equals g left-parenthesis f left-parenthesis x right-parenthesis right-parenthesis" altimg="images/eq003.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mfenced> <m:mrow> <m:mi> g </m:mi> <m:mo> ∘ <!--ring operator--> </m:mo> <m:mi> ƒ </m:mi> </m:mrow> </m:mfenced> <m:mo> ⁡ <!--function application--> </m:mo> <m:mfenced> <m:mi> x </m:mi> </m:mfenced> </m:mrow> <m:mo> = </m:mo> <m:mrow> <m:mi> g </m:mi> <m:mo> ⁡ <!--function application--> </m:mo> <m:mfenced> <m:mrow> <m:mi> ƒ </m:mi> <m:mo> ⁡ <!--function application--> </m:mo> <m:mfenced> <m:mi> x </m:mi> </m:mfenced> </m:mrow> </m:mfenced> </m:mrow> </m:mrow> </m:math>
The "invisible comma" or "invisible separator" operator (⁣
) should be used to
semantically separate arguments or indices when commas are omitted.
Example
<m:math id="m04" alttext="left-parenthesis upper a plus upper b right-parenthesis subscript i j baseline equals upper a subscript i j baseline plus upper b subscript i j" altimg="images/eq004.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:msub> <m:mfenced> <m:mrow> <m:mi> A </m:mi> <m:mo> + </m:mo> <m:mi> B </m:mi> </m:mrow> </m:mfenced> <m:mrow> <m:mi> i </m:mi> <m:mo> ⁣ <!--invisible comma--> </m:mo> <m:mi> j </m:mi> </m:mrow> </m:msub> <m:mo> = </m:mo> <m:msub> <m:mi> A </m:mi> <m:mrow> <m:mi> i </m:mi> <m:mo> ⁣ <!--invisible comma--> </m:mo> <m:mi> j </m:mi> </m:mrow> </m:msub> <m:mo> + </m:mo> <m:msub> <m:mi> B </m:mi> <m:mrow> <m:mi> i </m:mi> <m:mo> ⁣ <!--invisible comma--> </m:mo> <m:mi> j </m:mi> </m:mrow> </m:msub> </m:mrow> </m:math>
In mixed fractions the "invisible plus" character (⁤
)
should be used as an operator between the whole number and its fraction.
Example
<m:math id="m06" alttext="twelve and three-fourths plus two and one-fourth equals fifteen" altimg="images/eq005.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 12 </m:mn> <m:mo> ⁤ <!--invisible plus--> </m:mo> <m:mfrac> <m:mn> 3 </m:mn> <m:mn> 4 </m:mn> </m:mfrac> </m:mrow> <m:mo> + </m:mo> <m:mrow> <m:mn> 2 </m:mn> <m:mo> ⁤ <!--invisible plus--> </m:mo> <m:mfrac> <m:mn> 1 </m:mn> <m:mn> 4 </m:mn> </m:mfrac> </m:mrow> <m:mo> = </m:mo> <m:mn> 15 </m:mn> </m:mrow> </m:math>
Although not required it is good practice to group sub-expressions as they would be interpreted mathematically. Properly grouped sub-expressions using <m:mrow>
do not necessarily affect visual or aural rendering but they can improve spacing, linebreaking and indentation by a rendering system.
For further details refer to 3.3.1.3 Proper grouping of sub-expressions using <m:mrow>
of the MathML 3 specification.
In general, the spacing elements <mspace>
,
<mphantom>
, and <mpadded>
should not be
used to convey meaning. See 3.1.8.2
Warning: spacing should not be used to convey meaning of the MathML 3
specification.
See Fill-in-the-Blanks for the use of <mspace>
, <mphantom>
, or <mtext>
containing non-breaking spaces ( )
as spacing elements to indicate blanks to be filled in by the user.
All numeric quantities should be enclosed in an <m:mn>
element. Digit group separators, such as commas, periods, or spaces, should
also be included as part of the number and should not be treated as operators.
Example 1
<m:math id="m07_1" alttext="1000 equals 1 space 0 0 0 equals 1 comma 0 0 0 equals 1 decimal point 0 0 0" altimg="images/eq007.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mn> 1000 </m:mn> <m:mo> = </m:mo> <m:mn> 1 000 </m:mn> <m:mo> = </m:mo> <m:mn> 1,000 </m:mn> <m:mo> = </m:mo> <m:mn> 1.000 </m:mn> </m:mrow> </m:math>
Example 2
<m:math id="m07_2" alttext="Roman numerals MCM + XC + V = MCMXCV" altimg="images/roman.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mn> MCM </m:mn> <m:mo> + </m:mo> <m:mn> XC </m:mn> <m:mo> + </m:mo> <m:mn> V </m:mn> <m:mo> = </m:mo> <m:mn> MCMXCV </m:mn> </m:mrow> </m:math>
Variables containing more than one letter should be marked up in a single <m:mi>
element.
Example 1
<m:math id="m07" alttext="volume equals area of base times height" altimg="images/eq007.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi> volume </m:mi> <m:mo> = </m:mo> <m:mrow> <m:mi> area of base </m:mi> <m:mo> × <!--multiplication sign--> </m:mo> <m:mi> height </m:mi> </m:mrow> </m:mrow> </m:math>
Example 2
<m:math id="m08" alttext="A B is parallel to C D" altimg="images/eq008.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi mathvariant="italic"> AB </m:mi> <m:mo> ∥ <!--parallel to--> </m:mo> <m:mi mathvariant="italic"> CD </m:mi> </m:mrow> </m:math>
To follow the notation of AB and CD in this example the multi-letter identifiers need the mathvariant attribute set to "italic". The default value is "normal" (non-slanted) for identifiers consisting of more than one character. See 3.2.3.2 Attributes of identifiers of the MathML 3 specification.
It is important to apply superscripts and subscripts to the appropriate
element or sub-expression (with the help of mrow
, mfenced
, etc.) . As
the example below shows, the <m:msup>
element takes the entire
parenthetical expression — the exponent's base — as its first argument. It is
not correct to apply a superscript or subscript to a closing parenthesis or
any other grouping symbol.
Example 1
<m:math id="m09_1" alttext="left-parenthesis x plus y right-parenthesis superscript 2 baseline equals 1" altimg="images/eq009.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:msup> <m:mrow> <m:mo> ( </m:mo> <m:mrow> <m:mi> x </m:mi> <m:mo> + </m:mo> <m:mi> y </m:mi> </m:mrow> <m:mo> ) </m:mo> </m:mrow> <m:mn> 2 </m:mn> </m:msup> <m:mo> = </m:mo> <m:mn> 1 </m:mn> </m:mrow> </m:math>
However, in an expression such as ab2, it is important to respect order of operations and apply the superscript to b only.
Example 2
<m:math id="m09_2" alttext="a b superscript 2" altimg="images/ab_square.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi> a </m:mi> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:msup> <m:mi> b </m:mi> <m:mn> 2 </m:mn> </m:msup> </m:mrow> </m:math>
With the introduction of MathML 3, elementary notations previously
represented with <mtable>
now have their own layout
elements. For long division and stacked expressions use the new elements
<mlongdiv>
and <mstack>
instead of <mtable>
. See More Examples:
Example 4 in which <mtable>
may still be used
appropriately for long division.
Example 1
<list type="pl"> <hd>Step 1</hd> <li> <p>Divide the tens.</p> <p>Regroup the remaining ten as 10 ones.</p> <m:math id="m10" alttext="Step 1 Long division steps for 58 divided by 4" altimg="images/mtable001.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mlongdiv> <m:mn> 4 </m:mn> <!-- divisor --> <m:mn> 14 </m:mn> <!-- quotient --> <m:mn> 58 </m:mn> <!-- dividend --> <m:msrow position="1"> <m:mo> - </m:mo> <m:mn> 4 </m:mn> </m:msrow> <m:msline/> <m:msrow position="1"> <m:mn> 1 </m:mn> </m:msrow> </m:mlongdiv> </m:math> </li> <hd>Step 2</hd> <li> <p>Divide the ones.</p> <p>Subtract to find the remainder.</p> <m:math id="m11" alttext="Step 2 Long division steps for 58 divided by 4" altimg="images/mtable002.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mlongdiv> <m:mn> 4 </m:mn> <!-- divisor --> <m:mn> 14 </m:mn> <!-- quotient --> <m:mn> 58 </m:mn> <!-- dividend --> <m:msrow position="1"> <m:mo> - </m:mo> <m:mn> 4 </m:mn> </m:msrow> <m:msline/> <m:mn> 18 </m:mn> <m:msrow> <m:mo> - </m:mo> <m:mn> 16 </m:mn> </m:msrow> <m:msline/> <m:mn> 2 </m:mn> </m:mlongdiv> </m:math> </li> <hd>Step 3</hd> <li> <p><span>Check: </span> <m:math id="m12" alttext="14 times 4 equals 56" altimg="images/mtable003.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 14 </m:mn> <m:mo> × <!--multiplication sign--> </m:mo> <m:mn> 4 </m:mn> </m:mrow> <m:mo> = </m:mo> <m:mn> 56 </m:mn> </m:mrow> </m:math> <span> and </span> <m:math id="m13" alttext="56 plus 2 equals 58" altimg="images/mtable004.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 56 </m:mn> <m:mo> + </m:mo> <m:mn> 2 </m:mn> </m:mrow> <m:mo> = </m:mo> <m:mn> 58 </m:mn> </m:mrow> </m:math> <span>.</span> </p> <p>There will be 14 cans of vegetables in each box and 2 cans left over.</p> <p>The correct choice is <strong>A</strong>.</p> </li> </list>
Example 2
<m:math id="m13_5" alttext="Stacked addition problem 348 + 177 equals 525" altimg="images/stackedAddition.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mstack> <m:mn> 348 </m:mn> <m:msrow> <m:mo> + </m:mo> <m:mn> 177 </m:mn> </m:msrow> <m:msline/> <m:mn> 525 </m:mn> </m:mstack> </m:math>
Blanks in a "fill-in-the-blank" style of question are often visualized by
underlined spaces, empty circles, squares, or other symbols.
To indicate a blank, set the class attribute of the MathML element that will represent the blank
to "MathML-Blank". Usually, this element will be an <menclose>
element that draws a line under, or a box around, some spacing element. Typically, that element will be an
<mspace>
,
<mphantom>
, or <mtext>
that perhaps contains non-breaking spaces ( ), or another
element as is appropriate. All of these can be fitted to match the required size.
The MathML code to represent the blanks in the (horizontally presented) subtraction problem in Example 1 illustrates the case of an menclose
element that draws a line under an mspace
of an appropriate size.
In the two-dimensional subtraction problem in Example 1 the element mn
was used to represent the blank because of the special rules concerning
numbers and layout inside of mstack
. See the MathML specification for details about mstack
. Note also that no explicit blank is visible in the image of the mstack
example. In a situation like this one, where answers are expected, blanks should be used in the MathML representation.
In an interactive electronic environment where the user should fill the blank on the displayed page, Javascript would typically be used to invoke an editor when the blank is clicked on. To facilitate this, an 'id' should be added to the element to identify it for editing and eventual processing. Additionally, an "onclick" or similar event trigger should be added. The details depend upon the type of interaction desired, along with the specific Javascript being used.
Example 1
(Investigations Student Activity Book. Page 64 (Unit 5). Pearson. ISBN: 0328309948.)
<list type="pl"> <li><span>1. </span> <m:math id="m14" alttext="667 minus 358 equals blank" altimg="images/blank1.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 667 </m:mn> <m:mo> - </m:mo> <m:mn> 358 </m:mn> </m:mrow> <m:mo> = </m:mo> <m:menclose class="MathML-Blank" notation="bottom"> <m:mspace width="6em" height="2ex"/> </m:menclose> </m:mrow> </m:math> </li> <li><span>2. </span> <m:math id="m15" alttext="515 minus 472 equals blank" altimg="images/blank2.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mstack> <m:mn> 515 </m:mn> <m:msrow> <m:mo> - </m:mo> <m:mn> 472 </m:mn> </m:msrow> <m:msline/> <m:mn class="MathML-Blank">     <!--no-break space--> </m:mn> </m:mstack> </m:math> </li> </list>
Example 2
(enVision Math. Page 230. Pearson. ISBN: 0328272841.)
<h4>Do you know <strong>HOW</strong>?</h4> <p><span>Compare. Write </span> <m:math id="m16" alttext="greater than" altimg="images/001.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mo> > </m:mo> </m:mrow> </m:math> <span>, </span> <m:math id="m17" alttext="less than" altimg="images/002.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mo> < </m:mo> </m:mrow> </m:math> <span> or </span> <m:math id="m18" alttext="equals" altimg="images/003.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mo> = </m:mo> </m:mrow> </m:math> <span> for each </span> <m:math id="m19" alttext="circle" altimg="images/circle.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:menclose class="MathML-Blank" notation="circle"> <m:mspace width="1em" height="0.8em" depth="0.2em" /> </m:menclose> </m:mrow> </m:math> <span>.</span> </p> <list type="pl"> <li> <span>1. </span> <m:math id="m20" alttext="three-fifths circle four-fifths" altimg="images/004.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mfrac> <m:mn> 3 </m:mn> <m:mn> 5 </m:mn> </m:mfrac> <m:menclose class="MathML-Blank" notation="circle"> <m:mspace width="1em" height="0.8em" depth="0.2em" /> </m:menclose> <m:mfrac> <m:mn> 4 </m:mn> <m:mn> 5 </m:mn> </m:mfrac> </m:mrow> </m:math> </li> <li> <span>2. </span> <m:math id="m21" alttext="one-fourth circle two-thirds" altimg="images/005.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mfrac> <m:mn> 1 </m:mn> <m:mn> 4 </m:mn> </m:mfrac> <m:menclose class="MathML-Blank" notation="circle"> <m:mspace width="1em" height="0.8em" depth="0.2em" /> </m:menclose> <m:mfrac> <m:mn> 2 </m:mn> <m:mn> 3 </m:mn> </m:mfrac> </m:mrow> </m:math> </li> </list>
This section addresses how MathML should be embedded into a DAISY document. The examples in this section illustrate both simple and complex situations of mixed math and text content. For situations not covered by the examples content authors should use their best judgment.
Here are some general guidelines to follow:
math
element. Use MathML presentation markup .altimg
and alttext
attributes to be present on the math
element. They provide a fallback mechanism in case a rendering system has limited support for MathML. The alttext
value should unambiguously describe the mathematical expression.Many special characters used for math have named entity references in the
MathML DTD but are not named in the DTBook DTD. To access those symbols Unicode code points
should always be used. In general a Unicode code point looks like &#xnnnnn;
It is highly recommended to include a comment next to the numeric entity reference to convey its
name as a mnemonic during code editing. Good practice suggests using its unique Unicode standard character name (lower or upper case).
For example
<m:mo> ∑ <!--N-ARY SUMMATION-->
</m:mo>
Note: The characters representing 'less than', 'greater than' and 'ampersand' are predefined entities in XML. The entity reference names must always be used in these cases.
character | reference name |
---|---|
< | < |
> | > |
& | & |
A variable — even if a single letter — ideally should be marked up in MathML because it represents a mathematical expression. This way, both the audio and visual rendering of the variable will be not only accurate but consistent document-wide. For example, the letter "a" in English should always have the long "a" sound when read aloud as a math variable.
Example
(Prentice Hall Mathematics Algebra I. Page 262. Pearson. ISBN: 013052316X.)
<p> <span>To write an equation for direct variation, you first find the constant of variation </span> <m:math id="m24" alttext="k" altimg="images/eq012.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mi> k </m:mi> </m:math> <span>   <!--no-break space-->using a point other than the origin that lies on the graph of the equation. Then use the value of </span> <m:math id="m25" alttext="k" altimg="images/eq012.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mi> k </m:mi> </m:math> <span>   <!--no-break space-->to write an equation.</span> </p>
In MathML the <mtext>
element is used in conjunction with other MathML elements to denote commentary text. The <mtext>
element can be used to mark up annotations and notes belonging to mathematical expressions.
Rendering of <mtext>
elements uses the inherited properties of the corresponding math, such as baseline alignment and font, which results in text that has a clean visual appearance. For inline MathML in DAISY, however, it is usually not desirable to mark up the surrounding, ordinary text this way. Instead, use DTBook's built-in
document structure and formatting elements as in the example below.
In case of block level math, too, annotations are typically better marked up using DTBook's elements. DTBook table and list structures combining MathML expressions with DTBook formatted text may offer good ways to represent a mixture of math and annotations. See an example using a table and the section on diagrams and illustrations.
Also, if the text were emphasized, then DTBook provides better means for emphasis of text.
See the section on Natural-language Mathematics for representing math expressed in natural language terms.
Example
(Basic Concepts of Mathematics. Page 2. The Trillia Group. ISBN: 1931705003.)
<li> <span>(b) If </span> <m:math id="m39" alttext="upper a is a subset of upper b" altimg="images/3a1.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi> A </m:mi> <m:mo> ⊆ <!--subset of or equal to--> </m:mo> <m:mi> B </m:mi> </m:mrow> </m:math> <span>and </span> <m:math id="m40" alttext="upper b is a subset of upper c" altimg="images/3a2.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi> B </m:mi> <m:mo> ⊆ <!--subset of or equal to--> </m:mo> <m:mi> C </m:mi> </m:mrow> </m:math> <span>, then </span> <m:math id="m41" alttext="upper a is a subset of upper c" altimg="images/3a3.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi> A </m:mi> <m:mo> ⊆ <!--subset of or equal to--> </m:mo> <m:mi> C </m:mi> </m:mrow> </m:math> <span>.</span> </li>
MathML provides a powerful mechanism for linebreaking and indentation to achieve a desired layout. Linebreaking can be automatic or manual in MathML. Manual linebreaks and indentation should be added when a specific layout is desired such as when alignment helps show the structure of the problem. Do not use manual linebreaks simply because the expression is long but let the MathML renderer decide the proper linebreaks based on the font and width of the display in those cases.
Stacked equations and long divisions should be marked up with <mstack>
and <mlongdiv>
respectively. See Elementary Math Notation
Not all of current math accessibility tools provide good navigation within a math expression. By breaking large math expressions apart, the textual navigation features of DAISY players can be used. Because of this, authors may break up multi-line expressions into several MathML islands. Alignment (e.g., on an "=") is common in situations like this, therefore a (regular) table should be used to preserve the columnar nature of the layout.
A table should also be used when there are
textual descriptions alongside each row of text (instead of using
<mtext>
). This is illustrated in the following example. Here, a table allows for better navigation with
current tools.
Example
(Prentice Hall Mathematics Course I. Page 13. Pearson Prentice Hall. ISBN: 0132031396.)
<table border="0" cellspacing="0" cellpadding="0"> <tr> <td> <m:math id="m25" alttext="32 + 28" altimg="images/example_1.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mn> 32 </m:mn> <m:mo> + </m:mo> <m:mn> 28 </m:mn> </m:mrow> </m:math> </td> <td> <m:math id="m26" alttext="equals 32 + ( 20 + 8 )" altimg="images/example_2.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mo> = </m:mo> <m:mn> 32 </m:mn> <m:mo> + </m:mo> <m:mrow> <m:mo> ( </m:mo> <m:mrow> <m:mn> 20 </m:mn> <m:mo> + </m:mo> <m:mn> 8 </m:mn> </m:mrow> <m:mo> ) </m:mo> </m:mrow> </m:mrow> </m:math> </td> <th> <p>← <!--left arrow-->Rewrite 28 as <m:math id="m27" alttext="20 + 8" altimg="images/example_3.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mn> 20 </m:mn> <m:mo> + </m:mo> <m:mn> 8 </m:mn> </m:mrow> </m:math>.</p> </th> </tr> <tr> <td></td> <td> <m:math id="m28" alttext="equals 32 + ( 8 + 20 )" altimg="images/example_4.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mo> = </m:mo> <m:mn> 32 </m:mn> <m:mo> + </m:mo> <m:mrow> <m:mo> ( </m:mo> <m:mrow> <m:mn> 8 </m:mn> <m:mo> + </m:mo> <m:mn> 20 </m:mn> </m:mrow> <m:mo> ) </m:mo> </m:mrow> </m:mrow> </m:math> </td> <th> <p>← <!--left arrow-->Use the Commutative Property of Addition.</p> </th> </tr> <tr> <td></td> <td> <m:math id="m29" alttext="equals ( 32 + 8 ) + 20" altimg="images/example_5.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mo> = </m:mo> <m:mrow> <m:mo> ( </m:mo> <m:mrow> <m:mn> 32 </m:mn> <m:mo> + </m:mo> <m:mn> 8 </m:mn> </m:mrow> <m:mo> ) </m:mo> </m:mrow> <m:mo> + </m:mo> <m:mn> 20 </m:mn> </m:mrow> </m:math> </td> <th> <p>← <!--left arrow-->Use the Associative Property of Addition.</p> </th> </tr> <tr> <td> <p></p> </td> <td> <m:math id="m30" alttext="equals 40 + 20" altimg="images/example_6.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mo> = </m:mo> <m:mn> 40 </m:mn> <m:mo> + </m:mo> <m:mn> 20 </m:mn> </m:mrow> </m:math> </td> <th> <p>← <!--left arrow-->Add inside the parenthesis first.</p> </th> </tr> <tr> <td></td> <td> <m:math id="m31" alttext="equals 60" altimg="images/example_7.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mo> = </m:mo> <m:mn> 60 </m:mn> </m:mrow> </m:math> </td> <th> <p>← <!--left arrow-->Simplify.</p> </th> </tr> </table>
Textual labels often represent headings for rows or columns, even if they
are not at the top or bottom of the table. In this example, note the use of the
<th>
to mark up the annotations on the right-hand side of the computation as headings.
In a DAISY document, a MathML island should not contain sentence punctuation. However, punctuation symbols may still be used as operators when they have a mathematical meaning.
As the example below shows, the punctuation following each list item is
inside a <span>
after the MathML island. This allows the
DAISY renderer to unambiguously identify punctuation and pause
appropriately.
Example 1
(Basic Concepts of Mathematics. Page 10. The Trillia Group. ISBN: 1931705003.)
<li> <span>9. Show that the following relations hold <abbr>iff</abbr> </span> <m:math id="m32" alttext="upper a is a subset of upper e" altimg="images/p010_01.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi> A </m:mi> <m:mo> ⊆ <!--subset of or equal to--> </m:mo> <m:mi> E </m:mi> </m:mrow> </m:math> <span>: </span> <list type="pl"> <li> <span>(i) </span> <m:math id="m33" alttext="left-parenthesis upper e minus upper a right-parenthesis union upper a equals upper e" altimg="images/p010_02.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mfenced> <m:mrow> <m:mi> E </m:mi> <m:mo> - </m:mo> <m:mi> A </m:mi> </m:mrow> </m:mfenced> <m:mo> ∪ <!--union--> </m:mo> <m:mi> A </m:mi> </m:mrow> <m:mo> = </m:mo> <m:mi> E </m:mi> </m:mrow> </m:math> <span>; </span> </li> <li> <span>(ii) </span> <m:math id="m34" alttext="upper e minus left-parenthesis upper e minus upper a equals upper a" altimg="images/p010_03.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mi> E </m:mi> <m:mo> - </m:mo> <m:mfenced> <m:mrow> <m:mi> E </m:mi> <m:mo> - </m:mo> <m:mi> A </m:mi> </m:mrow> </m:mfenced> </m:mrow> <m:mo> = </m:mo> <m:mi> A </m:mi> </m:mrow> </m:math> <span>; </span> </li> <li> <span>(iii) </span> <m:math id="m35" alttext="upper a union upper e equals upper e" altimg="images/p010_04.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mi> A </m:mi> <m:mo> ∪ <!--union--> </m:mo> <m:mi> E </m:mi> </m:mrow> <m:mo> = </m:mo> <m:mi> E </m:mi> </m:mrow> </m:math> <span>; </span> </li> <li> <span>(iv) </span> <m:math id="m36_1" alttext="upper a intersection upper e equals upper a" altimg="images/p010_05.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mi> A </m:mi> <m:mo> ∩ <!--intersection--> </m:mo> <m:mi> E </m:mi> </m:mrow> <m:mo> = </m:mo> <m:mi> A </m:mi> </m:mrow> </m:math> <span>; </span> </li> <li> <span>(v) </span> <m:math id="m36_2" alttext="upper a minus upper e equals empty set" altimg="images/p010_06.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mi> A </m:mi> <m:mo> - </m:mo> <m:mi> E </m:mi> </m:mrow> <m:mo> = </m:mo> <m:mi> ∅ <!--empty set--> </m:mi> </m:mrow> </m:math> <span>. </span> </li> </list> </li>
Example 2
<p> <m:math id="m37" alttext="slope equals negative one-half" altimg="images/eq015.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi> slope </m:mi> <m:mo> = </m:mo> <m:mrow> <m:mo> - </m:mo> <m:mfrac> <m:mn> 1 </m:mn> <m:mn> 2 </m:mn> </m:mfrac> </m:mrow> </m:mrow> </m:math> <span>, </span> <m:math id="m38" alttext="left-parenthesis 0 comma 3 right-parenthesis" altimg="images/eq016.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mo> ( </m:mo> <m:mrow> <m:mn> 0 </m:mn> <m:mo> , </m:mo> <m:mn> 3 </m:mn> </m:mrow> <m:mo> ) </m:mo> </m:mrow> </m:math> </p>
Here, the first comma is used as a punctuation mark, and the second one is used as an operator.
Textbooks sometimes use the written form of math symbols. For example, the multiplication sign (×) might be written as "times" or "multiplied by".
Because "times" and "multiplied by" are ordinary English words, the DAISY
reader will not have an issue reading them. These natural-language expressions
could or could not be included in MathML. For instance, the word "times" in "x = 2 times a" could be marked up as an operator by means of <m:mo>times</m:mo>
.
In case a natural-language expression corresponds to a regular math expression, the expression should be formatted in MathML to illustrate the correlation. This often occurs in elementary math when a transition is shown from a natural-language expression into an expression using math symbols. In the next example "the regular price" (in "r = the regular price") is formatted as a multi-letter variable.
See Multi-letter Variables and Natural-language Units about representing natural-language expressions.
See Mixing Text and Mathematics for information about using <m:mtext>
to include text fragments within MathML code.
(Prentice Hall Mathematics Course I. Page 41. Pearson Prentice Hall. ISBN: 0132031396.)
<table> <tr> <td rowspan="3"> <img src="images/p041-002.jpg" alt="An arrow points downward from the text 'Words' to the text 'Equation'" /> </td> <td class="background-color:red">percent you pay</td> <td>times</td> <td class="background-color:green">regular price</td> <td>equals</td> <td class="background-color:blue">sale price</td> </tr> <tr> <td colspan="5">Let <m:math id="m90" alttext="Green r equals the regular price" altimg="images/002.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi mathbackground="green"> r </m:mi> <m:mo> = </m:mo> <m:mi> the regular price </m:mi> </m:mrow> </m:math>. </td> </tr> <tr align="center"> <td> <m:math id="m91_1" alttext="Red 70%" altimg="images/003_1.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mn mathbackground="red"> 70% </m:mn> </m:math> </td> <td> <m:math id="m91_2" alttext="times" altimg="images/003_2.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mo> × <!--multiplication sign--> </m:mo> </m:math> </td> <td> <m:math id="m91_3" alttext="Green r" altimg="images/003_3.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mi mathbackground="green"> r </m:mi> </m:math> </td> <td> <m:math id="m91_4" alttext="equals" altimg="images/003_4.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mo> = </m:mo> </m:math> </td> <td> <m:math id="m91_5" alttext="Blue $139.93" altimg="images/003_5.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow mathbackground="blue"> <m:mi mathvariant="normal" class="MathML-Unit"> $ </m:mi> <m:mo> ⁢ <!--invisible times--></m:mo> <m:mn> 139.93 </m:mn> </m:mrow> </m:math> </td> </tr> </table> <table> <tr> <td align="right"> <m:math id="m92" alttext="0.7 r" altimg="images/004.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mn> 0.7 </m:mn> <m:mo> ⁢ <!--invisible times--></m:mo> <m:mi> r </m:mi> </m:mrow> </m:math> </td> <td> <m:math id="m93" alttext="equals 139.93" altimg="images/005.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mo> = </m:mo> <m:mn> 139.93 </m:mn> </m:mrow> </m:math> </td> <th> <p>← <!--left arrow-->Write 70% as a decimal: 0.7.</p> </th> </tr> <tr> <td align="right"> <m:math id="m94" alttext="0.7 r divided by 0.7" altimg="images/006.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 0.7 </m:mn> <m:mo> ⁢ <!--invisible times--></m:mo> <m:mi> r </m:mi> </m:mrow> <m:mo> ÷ <!--division sign--> </m:mo> <m:mn> 0.7 </m:mn> </m:mrow> </m:math> </td> <td> <m:math id="m95" alttext="equals 139.93 divided by 0.7" altimg="images/007.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mo> = </m:mo> <m:mrow> <m:mn> 139.93 </m:mn> <m:mo> ÷ <!--division sign--> </m:mo> <m:mn> 0.7 </m:mn> </m:mrow> </m:mrow> </m:math> </td> <th> <p>← <!--left arrow-->Divide each side by 0.7 to find <m:math id="m96" alttext="r" altimg="images/008.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"><m:mi> r </m:mi></m:math>.</p> </th> </tr> <tr> <td align="right"> <m:math id="m97" alttext="r" altimg="images/009.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"><m:mi> r </m:mi></m:math> </td> <td> <m:math id="m98" alttext="equals $199.90" altimg="images/010.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mo> = </m:mo> <m:mrow> <m:mi mathvariant="normal" class="MathML-Unit"> $ </m:mi> <m:mo> ⁢ <!--invisible times--></m:mo> <m:mn> 199.90 </m:mn> </m:mrow> </m:mrow> </m:math> </td> <th> <p>← <!--left arrow-->Simplify.</p> </th> </tr> </table>
The first equation ("r = the regular price") uses ordinary English words, but because the equation relates to the subsequent ones, it is better formatted in MathML. This also has the benefit of preserving the MathML color formatting; otherwise, the color of each phrase ("percent you pay", "regular price", and "sale price") would need to be explained with a text description. See Color for more details.
MathML in DAISY should follow the guidelines outlined in Units in MathML. To summarize briefly:
⁢
) to
separate a numeral or variable from its unit. Additional space can be added
for better visual rendering. The "invisible times" operator is included for semantic correctness (in this case representing the product between a numerical value and a unit of measurement), not because of some MathML-related issue.<m:mi>
element with the
attribute mathvariant
set to "normal"
to prevent
rendering in italics and the attribute class
set to
"MathML-Unit"
to distinguish the unit from an ordinary
identifier. Example 1
<m:math id="m44" alttext="1 N = 1 fraction kg dot m over s squared" altimg="images/eq017_00.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mn> 1 </m:mn> <m:mo rspace='thickmathspace'> ⁢ <!--invisible times--> </m:mo> <m:mi mathvariant='normal' class='MathML-Unit'> N </m:mi> <m:mo> = </m:mo> <m:mn> 1 </m:mn> <m:mo rspace='thickmathspace'> ⁢ <!--invisible times--> </m:mo> <m:mrow> <m:mfrac> <m:mrow> <m:mi mathvariant='normal' class='MathML-Unit'> kg </m:mi> <m:mo> · <!--middle dot--> </m:mo> <m:mi mathvariant='normal' class='MathML-Unit'> m </m:mi> </m:mrow> <m:mrow> <m:msup> <m:mi mathvariant='normal' class='MathML-Unit'> s </m:mi> <m:mn> 2 </m:mn> </m:msup> </m:mrow> </m:mfrac> </m:mrow> </m:mrow> </m:math>
Example 2
<m:math id="m45" alttext="400 dollars" altimg="images/eq017_01.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi mathvariant="normal" class="MathML-Unit"> $ </m:mi> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:mi> 400 </m:mi> </m:mrow> </m:math>
Example 3
<m:math id="m46" alttext="50 U S D" altimg="images/eq017_02.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi> 50 </m:mi> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:mi mathvariant="normal" class="MathML-Unit"> USD </m:mi> </m:mrow> </m:math>
As described in 3.6 Natural-language Mathematics, natural-language expressions that can be handled by the DAISY reader could be included in or left out of the MathML island. Likewise, natural-language units, i.e. units that are spelled out, could be part of the MathML expression or be left out.
In the text "8 animals - 5 animals = 3 animals" MathML markup should be used to mark up "animals" as units by means of <m:mn> 8 </m:mn>
<m:mo rspace='thickmathspace'> ⁢ <!--invisible times--> </m:mo>
<m:mi mathvariant='normal' class='MathML-Unit'> animals </m:mi>
etcetera.
However, in the example below, putting the word "animals" in text makes sense because it is not part of the math expression.
Example 4
(enVision Math. Page 31. Pearson. ISBN: 0328272817)
<p>Which number sentence matches the story? Mark your answer.</p> <list type="pl"> <li> <span>5. Beth feeds 5 goats. Keith feeds 8 ducks. How many animals do they feed in all?</span> <list type="pl"> <li> <span>(A) </span> <m:math id="m47" alttext="8 minus 5 equals 3" altimg="images/eq019.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 8 </m:mn> <m:mo> - </m:mo> <m:mn> 5 </m:mn> </m:mrow> <m:mo> = </m:mo> <m:mn> 3 </m:mn> </m:mrow> </m:math> <span> animals</span> </li> <li> <span>(B) </span> <m:math id="m48" alttext="5 plus 8 equals 13" altimg="images/eq020.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 5 </m:mn> <m:mo> + </m:mo> <m:mn> 8 </m:mn> </m:mrow> <m:mo> = </m:mo> <m:mn> 13 </m:mn> </m:mrow> </m:math> <span> animals</span> </li> <li> <span>(C) </span> <m:math id="m49" alttext="5 plus 3 equals 8" altimg="images/eq021.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 5 </m:mn> <m:mo> + </m:mo> <m:mn> 3 </m:mn> </m:mrow> <m:mo> = </m:mo> <m:mn> 8 </m:mn> </m:mrow> </m:math> <span> animals</span> </li> <li> <span>(D) </span> <m:math id="m50" alttext="13 minus 8 equals 5" altimg="images/eq022.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 13 </m:mn> <m:mo> - </m:mo> <m:mn> 8 </m:mn> </m:mrow> <m:mo> = </m:mo> <m:mn> 5 </m:mn> </m:mrow> </m:math> <span> animals</span> </li> </list> <img src="p031-001.png" alt="Picture of a duck."/> </li> </list>
Example 5
<p> <m:math id="m47c" alttext="5 ninths left parenthesis T sub F baseline minus 32 right parenthesis equals T sub C baseline" altimg="images/conversion.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mfrac> <m:mn> 5 </m:mn> <m:mn> 9 </m:mn> </m:mfrac> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:mfenced> <m:mrow> <m:msub> <m:mi> T </m:mi> <m:mi> F </m:mi> </m:msub> <m:mo> - </m:mo> <m:mn> 32 </m:mn> </m:mrow> </m:mfenced> </m:mrow> <m:mo> = </m:mo> <m:msub> <m:mi> T </m:mi> <m:mi> C </m:mi> </m:msub> </m:mrow> </m:math> <span> degrees Celsius</span> </p>
Ensure that mathematical type
styles take precedence over any emphasis that would be inherited from the
island's surrounding environment. This is accomplished with the
mathvariant
attribute, which is valid on all token elements and
the <mstyle>
element. The value of mathvariant
for an element will always override the rendering attributes of the
DAISY formatting surrounding it. More information on this subject can be found
in Chapter 3
of the MathML 3 specification.
If an entire math expression is emphasized, apply the emphasis as appropriate to the complete MathML island.
Note: By default, the
<m:mi>
element's mathvariant
attribute will default to "italic"
if its content is a single
letter.
Example 1
<m:math id="m736" alttext="bold a dot bold b equals a 1 b 1 plus a 2 b 2 plus a 3 b 3" altimg="images/dot_product.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mi mathvariant="bold"> a </m:mi> <m:mo> · <!--middle dot--> </m:mo> <m:mi mathvariant="bold"> b </m:mi> </m:mrow> <m:mo> = </m:mo> <m:mrow> <m:mrow> <m:msup> <m:mi> a </m:mi> <m:mn> 1 </m:mn> </m:msup> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:msup> <m:mi> b </m:mi> <m:mn> 1 </m:mn> </m:msup> </m:mrow> <m:mo> + </m:mo> <m:mrow> <m:msup> <m:mi> a </m:mi> <m:mn> 2 </m:mn> </m:msup> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:msup> <m:mi> b </m:mi> <m:mn> 2 </m:mn> </m:msup> </m:mrow> <m:mo> + </m:mo> <m:mrow> <m:msup> <m:mi> a </m:mi> <m:mn> 3 </m:mn> </m:msup> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:msup> <m:mi> b </m:mi> <m:mn> 3 </m:mn> </m:msup> </m:mrow> </m:mrow> </m:mrow> </m:math>
In this case, the bold type signifies that a and
b are vectors, so the mathvariant
attribute is
set to "bold"
for each corresponding element.
Example 2
<p> <span>If </span> <m:math id="math1" alttext="a greater-than b" altimg="images/math1.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi> a </m:mi> <m:mo> > </m:mo> <m:mi> b </m:mi> </m:mrow> </m:math> <span>and </span> <m:math id="math2" alttext="b greater-than c" altimg="images/math2.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi> b </m:mi> <m:mo> > </m:mo> <m:mi> c </m:mi> </m:mrow> </m:math> <span>, then </span> <strong> <m:math id="math3" alttext="a greater-than c" altimg="images/math3.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi> a </m:mi> <m:mo> > </m:mo> <m:mi> c </m:mi> </m:mrow> </m:math> </strong> </p>
Because the emphasis has no mathematical meaning, the entire MathML island is
emphasized with <strong>
.
Although color can be expressed in MathML with the mathcolor
and mathbackground
attributes, DAISY has no built-in method to
express color to non-visual users. However, math elements can still be
formatted with color if the color serves as emphasis.
In cases where corresponding colors occur both inside and outside of the
MathML island, it may be desirable to format the colored text in MathML as
well, in order to show the connection, via mathcolor
, between the
text and the math. If only one color is used, bold or italic type can be used
instead of color.
Examples using color:
MathML provides built-in support for tables and equation numbering, and
DAISY provides similar functionality with lists and tables. In practice, it is
not always clear which structural elements should be used. Ideally, a table
(either DAISY <table>
or MathML <mtable>)
should be used when information between aligned rows or columns are
semantically related. In other cases, such as ordinary problem numbering or
information presented in an ordered sequence, a <list>
is
more appropriate.
Choosing between <table>
and <mtable>
can be tricky. DAISY structural elements are advantageous because
they are contained within the DAISY document structure, making them fully
navigable by the user, whereas the user may only "enter" or "exit" an
<mtable>
in a MathML island. However, the
<mtable>
element is useful because it can be tweaked easily
for visual alignment without creating new table cells, which can improve
reading flow for the user.
<mtable>
should still be used for matrices and other
table-like math layouts.
Example 1
(Investigations Student Activity Book. Page 3 (Unit 4). Pearson. ISBN: 0328309948.)
<m:math id="m56" alttext="Table with heading (Factor times Factor equals Product) and 9 rows. Each row presents a multiplication problem." altimg="images/factors_001.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mtable columnalign="left"> <m:mtr> <m:mtd></m:mtd> <m:mtd> <m:mrow> <m:maligngroup/> <m:mi> Factor </m:mi> <m:maligngroup/> <m:mo> × <!--multiplication sign--> </m:mo> <m:maligngroup/> <m:mi> Factor </m:mi> <m:maligngroup/> <m:mo> = </m:mo> <m:maligngroup/> <m:mi> Product </m:mi> </m:mrow> </m:mtd> </m:mtr> <m:mtr> <m:mtd><m:mrow><m:mtext> 1. </m:mtext></m:mrow></m:mtd> <m:mtd> <m:mrow> <m:maligngroup/> <m:mn> 6 </m:mn> <m:maligngroup/> <m:mo> × <!--multiplication sign--> </m:mo> <m:maligngroup/> <m:mn> 30 </m:mn> <m:maligngroup/> <m:mo> = </m:mo> <m:maligngroup/> <m:menclose notation="bottom"> <m:mspace class="MathML-Blank" width="3em"/> </m:menclose> </m:mrow> </m:mtd> </m:mtr> <m:mtr> <m:mtd><m:mrow><m:mtext> 2. </m:mtext></m:mrow></m:mtd> <m:mtd> <m:mrow> <m:maligngroup/> <m:mn> 12 </m:mn> <m:maligngroup/> <m:mo> × <!--multiplication sign--> </m:mo> <m:maligngroup/> <m:mn> 50 </m:mn> <m:maligngroup/> <m:mo> = </m:mo> <m:maligngroup/> <m:menclose notation="bottom"> <m:mspace class="MathML-Blank" width="3em"/> </m:menclose> </m:mrow> </m:mtd> </m:mtr> <m:mtr> <m:mtd><m:mrow><m:mtext> 3. </m:mtext></m:mrow></m:mtd> <m:mtd> <m:mrow> <m:maligngroup/> <m:mn> 9 </m:mn> <m:maligngroup/> <m:mo> × <!--multiplication sign--> </m:mo> <m:maligngroup/> <m:menclose notation="bottom"> <m:mspace class="MathML-Blank" width="3em"/> </m:menclose> <m:maligngroup/> <m:mo> = </m:mo> <m:maligngroup/> <m:mn> 270 </m:mn> </m:mrow> </m:mtd> </m:mtr> <m:mtr> <m:mtd><m:mrow><m:mtext> 4. </m:mtext></m:mrow></m:mtd> <m:mtd> <m:mrow> <m:maligngroup/> <m:mn> 5 </m:mn> <m:maligngroup/> <m:mo> × <!--multiplication sign--> </m:mo> <m:maligngroup/> <m:menclose notation="bottom"> <m:mspace class="MathML-Blank" width="3em"/> </m:menclose> <m:maligngroup/> <m:mo> = </m:mo> <m:maligngroup/> <m:mn> 300 </m:mn> </m:mrow> </m:mtd> </m:mtr> <m:mtr> <m:mtd><m:mrow><m:mtext> 5. </m:mtext></m:mrow></m:mtd> <m:mtd> <m:mrow> <m:maligngroup/> <m:mn> 7 </m:mn> <m:maligngroup/> <m:mo> × <!--multiplication sign--> </m:mo> <m:maligngroup/> <m:mn> 80 </m:mn> <m:maligngroup/> <m:mo> = </m:mo> <m:maligngroup/> <m:menclose notation="bottom"> <m:mspace class="MathML-Blank" width="3em"/> </m:menclose> </m:mrow> </m:mtd> </m:mtr> <m:mtr> <m:mtd><m:mrow><m:mtext> 6. </m:mtext></m:mrow></m:mtd> <m:mtd> <m:mrow> <m:maligngroup/> <m:mn> 11 </m:mn> <m:maligngroup/> <m:mo> × <!--multiplication sign--> </m:mo> <m:maligngroup/> <m:menclose notation="bottom"> <m:mspace class="MathML-Blank" width="3em"/> </m:menclose> <m:maligngroup/> <m:mo> = </m:mo> <m:maligngroup/> <m:mn> 220 </m:mn> </m:mrow> </m:mtd> </m:mtr> <m:mtr> <m:mtd><m:mrow><m:mtext> 7. </m:mtext></m:mrow></m:mtd> <m:mtd> <m:mrow> <m:maligngroup/> <m:mn> 8 </m:mn> <m:maligngroup/> <m:mo> × <!--multiplication sign--> </m:mo> <m:maligngroup/> <m:mn> 60 </m:mn> <m:maligngroup/> <m:mo> = </m:mo> <m:maligngroup/> <m:menclose notation="bottom"> <m:mspace class="MathML-Blank" width="3em"/> </m:menclose> </m:mrow> </m:mtd> </m:mtr> <m:mtr> <m:mtd><m:mrow><m:mtext> 8. </m:mtext></m:mrow></m:mtd> <m:mtd> <m:mrow> <m:maligngroup/> <m:mn> 10 </m:mn> <m:maligngroup/> <m:mo> × <!--multiplication sign--> </m:mo> <m:maligngroup/> <m:menclose notation="bottom"> <m:mspace class="MathML-Blank" width="3em"/> </m:menclose> <m:maligngroup/> <m:mo> = </m:mo> <m:maligngroup/> <m:mn> 340 </m:mn> </m:mrow> </m:mtd> </m:mtr> <m:mtr> <m:mtd><m:mrow><m:mtext> 9. </m:mtext></m:mrow></m:mtd> <m:mtd> <m:mrow> <m:maligngroup/> <m:mn> 80 </m:mn> <m:maligngroup/> <m:mo> × <!--multiplication sign--> </m:mo> <m:maligngroup/> <m:mn> 4 </m:mn> <m:maligngroup/> <m:mo> = </m:mo> <m:maligngroup/> <m:menclose notation="bottom"> <m:mspace class="MathML-Blank" width="3em"/> </m:menclose> </m:mrow> </m:mtd> </m:mtr> </m:mtable> </m:mrow> </m:math>
This example can be formatted as a <table>
,
but the <mtable>
method is preferable because each equation
can be read uninterrupted in a single table cell.
Example 2
(Investigations Student Math Handbook. Page 50. Pearson. ISBN: 0328240893.)
<table> <tr> <th> <m:math id="m66" alttext="double minus 1" altimg="images/001.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi> DOUBLE </m:mi> <m:mo> - </m:mo> <m:mn> 1 </m:mn> </m:mrow> </m:math> </th> <th> DOUBLE </th> <th> <m:math id="m67" alttext="double plus 1" altimg="images/002.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi> DOUBLE </m:mi> <m:mo> + </m:mo> <m:mn> 1 </m:mn> </m:mrow> </m:math> </th> </tr> <tr> <td> <imggroup> <img src="images/p050-001.jpg" alt="1st Row 5 squares 2nd Row 4 squares"/> </imggroup> <p> <m:math id="m68" alttext="5 plus 4 equals 9" altimg="images/003.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 5 </m:mn> <m:mo> + </m:mo> <m:mn> 4 </m:mn> </m:mrow> <m:mo> = </m:mo> <m:mn> 9 </m:mn> </m:mrow> </m:math> </p> <p><span><em>Think:</em></span> <em><m:math id="m69" alttext="5 plus 5 Start Blue minus 1 End Blue" altimg="images/004.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mn> 5 </m:mn> <m:mo> + </m:mo> <m:mn> 5 </m:mn> <m:mo mathcolor="blue"> - </m:mo> <m:mn mathcolor="blue"> 1 </m:mn> </m:mrow> </m:math></em> </p> </td> <td> <imggroup> <img src="images/p050-002.jpg" alt="1st Row 5 squares 2nd Row 5 squares"/> </imggroup> <p> <m:math id="m70" alttext="5 plus 5 equals 10" altimg="images/005.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 5 </m:mn> <m:mo> + </m:mo> <m:mn> 5 </m:mn> </m:mrow> <m:mo> = </m:mo> <m:mn> 10 </m:mn> </m:mrow> </m:math> </p> </td> <td> <imggroup> <img src="images/p050-003.jpg" alt="1st Row 5 squares 2nd Row 6 squares"/> </imggroup> <p> <m:math id="m71" alttext="5 plus 6 equals 11" altimg="images/006.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 5 </m:mn> <m:mo> + </m:mo> <m:mn> 6 </m:mn> </m:mrow> <m:mo> = </m:mo> <m:mn> 11 </m:mn> </m:mrow> </m:math> </p> <p><span><em>Think:</em></span> <em><m:math id="m72" alttext="5 plus 5 Start Blue plus 1 End Blue" altimg="images/007.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mn> 5 </m:mn> <m:mo> + </m:mo> <m:mn> 5 </m:mn> <m:mo mathcolor="blue"> + </m:mo> <m:mn mathcolor="blue"> 1 </m:mn> </m:mrow> </m:math></em> </p> </td> </tr> <tr> <td> <imggroup> <img src="images/p050-004.jpg" alt="1st Row 6 squares 2nd Row 5 squares"/> </imggroup> <p> <m:math id="m73" alttext="6 plus 5 equals 11" altimg="images/008.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 6 </m:mn> <m:mo> + </m:mo> <m:mn> 5 </m:mn> </m:mrow> <m:mo> = </m:mo> <m:mn> 11 </m:mn> </m:mrow> </m:math> </p> <p><span><em>Think:</em></span> <em><m:math id="m74" alttext="6 plus 5 Start Blue minus 1 End Blue" altimg="images/009.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mn> 6 </m:mn> <m:mo> + </m:mo> <m:mn> 5 </m:mn> <m:mo mathcolor="blue"> - </m:mo> <m:mn mathcolor="blue"> 1 </m:mn> </m:mrow> </m:math></em> </p> </td> <td> <imggroup> <img src="images/p050-005.jpg" alt="1st Row 6 squares 2nd Row 6 squares"/> </imggroup> <p> <m:math id="m75" alttext="6 plus 6 equals 12" altimg="images/010.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 6 </m:mn> <m:mo> + </m:mo> <m:mn> 6 </m:mn> </m:mrow> <m:mo> = </m:mo> <m:mn> 12 </m:mn> </m:mrow> </m:math> </p> </td> <td> <imggroup> <img src="images/p050-006.jpg" alt="1st Row 6 squares 2nd Row 7 squares"/> </imggroup> <p> <m:math id="m76" alttext="6 plus 7 equals 13" altimg="images/011.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 6 </m:mn> <m:mo> + </m:mo> <m:mn> 7 </m:mn> </m:mrow> <m:mo> = </m:mo> <m:mn> 13 </m:mn> </m:mrow> </m:math> </p> <p><span><em>Think:</em></span> <em><m:math id="m77" alttext="6 plus 6 Start Blue plus 1 End Blue" altimg="images/012.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mn> 6 </m:mn> <m:mo> + </m:mo> <m:mn> 6 </m:mn> <m:mo mathcolor="blue"> + </m:mo> <m:mn mathcolor="blue"> 1 </m:mn> </m:mrow> </m:math></em> </p> </td> </tr> <tr> <td> <imggroup> <img src="images/p050-007.jpg" alt="1st Row 7 squares 2nd Row 6 squares"/> </imggroup> <p> <m:math id="m78" alttext="7 plus 6 equals 13" altimg="images/013.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 7 </m:mn> <m:mo> + </m:mo> <m:mn> 6 </m:mn> </m:mrow> <m:mo> = </m:mo> <m:mn> 13 </m:mn> </m:mrow> </m:math> </p> <p><span><em>Think:</em></span> <em><m:math id="m79" alttext="7 plus 7 Start Blue minus 1 End Blue" altimg="images/014.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mn> 7 </m:mn> <m:mo> + </m:mo> <m:mn> 7 </m:mn> <m:mo mathcolor="blue"> - </m:mo> <m:mn mathcolor="blue"> 1 </m:mn> </m:mrow> </m:math></em> </p> </td> <td> <imggroup> <img src="images/p050-008.jpg" alt="1st Row 7 squares 2nd Row 7 squares"/> </imggroup> <p> <m:math id="m80" alttext="7 plus 7 equals 14" altimg="images/015.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 7 </m:mn> <m:mo> + </m:mo> <m:mn> 7 </m:mn> </m:mrow> <m:mo> = </m:mo> <m:mn> 14 </m:mn> </m:mrow> </m:math> </p> </td> <td> <imggroup> <img src="images/p050-009.jpg" alt="1st Row 7 squares 2nd Row 8 squares"/> </imggroup> <p> <m:math id="m81" alttext="7 plus 8 equals 15" altimg="images/016.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 7 </m:mn> <m:mo> + </m:mo> <m:mn> 8 </m:mn> </m:mrow> <m:mo> = </m:mo> <m:mn> 15 </m:mn> </m:mrow> </m:math> </p> <p><span><em>Think:</em></span> <em><m:math id="m82" alttext="7 plus 7 Start Blue plus 1 End Blue" altimg="images/017.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mn> 7 </m:mn> <m:mo> + </m:mo> <m:mn> 7 </m:mn> <m:mo mathcolor="blue"> + </m:mo> <m:mn mathcolor="blue"> 1 </m:mn> </m:mrow> </m:math></em> </p> </td> </tr> <tr> <td> <imggroup> <img src="images/p050-010.jpg" alt="1st Row 8 squares 2nd Row 7 squares"/> </imggroup> <p> <m:math id="m83" alttext="8 plus 7 equals 15" altimg="images/018.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 8 </m:mn> <m:mo> + </m:mo> <m:mn> 7 </m:mn> </m:mrow> <m:mo> = </m:mo> <m:mn> 15 </m:mn> </m:mrow> </m:math> </p> <p><span><em>Think:</em></span> <em><m:math id="m84" alttext="8 plus 8 Start Blue minus 1 End Blue" altimg="images/019.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mn> 8 </m:mn> <m:mo> + </m:mo> <m:mn> 8 </m:mn> <m:mo mathcolor="blue"> - </m:mo> <m:mn mathcolor="blue"> 1 </m:mn> </m:mrow> </m:math></em> </p> </td> <td> <imggroup> <img src="images/p050-011.jpg" alt="1st Row 8 squares 2nd Row 8 squares"/> </imggroup> <p> <m:math id="m85" alttext="8 plus 8 equals 16" altimg="images/020.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 8 </m:mn> <m:mo> + </m:mo> <m:mn> 8 </m:mn> </m:mrow> <m:mo> = </m:mo> <m:mn> 16 </m:mn> </m:mrow> </m:math> </p> </td> <td> <imggroup> <img src="images/p050-012.jpg" alt="1st Row 8 squares 2nd Row 9 squares"/> </imggroup> <p> <m:math id="m86" alttext="8 plus 9 equals 17" altimg="images/021.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn> 8 </m:mn> <m:mo> + </m:mo> <m:mn> 9 </m:mn> </m:mrow> <m:mo> = </m:mo> <m:mn> 17 </m:mn> </m:mrow> </m:math> </p> <p><span><em>Think:</em></span> <em><m:math id="m87" alttext="8 plus 8 Start Blue plus 1 End Blue" altimg="images/022.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mn> 8 </m:mn> <m:mo> + </m:mo> <m:mn> 8 </m:mn> <m:mo mathcolor="blue"> + </m:mo> <m:mn mathcolor="blue"> 1 </m:mn> </m:mrow> </m:math></em> </p> </td> </tr> </table> <prodnote render="optional"> <p>The middle column titled "DOUBLE" is highlighted in light yellow.</p> </prodnote>
In addition to showing how a table is used with MathML, note that:
Often, diagrams and illustrations that involve mathematical content cannot be handled with MathML alone. In these cases, an image must be used and, if possible, the mathematical content should be marked up with MathML inside a producer's note.
Example 1
(Prentice Hall Mathematics Algebra I. Page 9. Pearson. ISBN: 013052316X.)
<imggroup> <img src="exponent.png" alt="Math equation with labels" /> <prodnote render="optional"><p> <span>Reader's note: This is a diagram with call outs that shows the following equation: </span> <m:math id="m88" alttext="Start Green 2 End Green Superscript Start Purple 4 End Purple Baseline Equals 2 Dot 2 Dot 2 Dot 2" altimg="images/exponent001.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:msup> <m:mn mathcolor="green"> 2 </m:mn> <m:mn mathcolor="purple"> 4 </m:mn> </m:msup> <m:mo> = </m:mo> <m:mrow> <m:mn> 2 </m:mn> <m:mo> · <!--middle dot--> </m:mo> <m:mn> 2 </m:mn> <m:mo> · <!--middle dot--> </m:mo> <m:mn> 2 </m:mn> <m:mo> · <!--middle dot--> </m:mo> <m:mn> 2 </m:mn> </m:mrow> </m:mrow> </m:math> <span>. A green arrow labeled with the text "base" in green points to the number 2. A purple arrow labeled with the text "exponent" in purple points to the number 4. A blue, horizontal curly bracket labeled with the text "power" in blue is positioned below the numbers 2 and 4.</span> </p></prodnote> </imggroup>
This example could be formatted by using mtable
and malignmark
. However, it would not look good, let alone resemble its original visual appearance. Moreover, this would hardly improve its accessibility. Therefore, the entire diagram should be one image, and there should be a producer's note that contains the raw equation and
an additional note explaining the illustrative components of the diagram.
Example 2
<imggroup> <img src="exponent2.png" alt="Math expression with labeled exponents" /> <prodnote render="optional"><p> <span>A polynomial expression has its exponents labeled and colored in either blue or purple. The blue exponents have a blue label with blue arrows and the text "The exponents begin with 6 and decrease to 0." The purple exponents have a purple label with purple arrows and the text "The exponents for b begin with 0 and increase to 6. The polynomial expression is:</span> <m:math id="m88" alttext="Red 1 a Superscript Blue 6 Baseline b Superscript Purple 0 Baseline plus Red 6 a Superscript Blue 5 Baseline b Superscript Purple 1 Baseline plus Red 15 a Superscript Blue 4 Baseline b Superscript Purple 2 Baseline plus Red 20 a Superscript Blue 3 Baseline b Superscript Purple 3 Baseline plus Red 15 a Superscript Blue 2 Baseline b Superscript Purple 4 Baseline plus Red 6 a Superscript Blue 1 Baseline b Superscript Purple 5 Baseline plus Red 1 a Superscript Blue 0 Baseline b Superscript Purple 6 Baseline " altimg="images/exponent002.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mn mathcolor="red"> 1 </m:mn> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:msup> <m:mi> a </m:mi> <m:mn mathcolor="blue"> 6 </m:mn> </m:msup> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:msup> <m:mi> b </m:mi> <m:mn mathcolor="purple"> 0 </m:mn> </m:msup> </m:mrow> <m:mo> + </m:mo> <m:mrow> <m:mn mathcolor="red"> 6 </m:mn> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:msup> <m:mi> a </m:mi> <m:mn mathcolor="blue"> 5 </m:mn> </m:msup> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:msup> <m:mi> b </m:mi> <m:mn mathcolor="purple"> 1 </m:mn> </m:msup> </m:mrow> <m:mo> + </m:mo> <m:mrow> <m:mn mathcolor="red"> 15 </m:mn> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:msup> <m:mi> a </m:mi> <m:mn mathcolor="blue"> 4 </m:mn> </m:msup> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:msup> <m:mi> b </m:mi> <m:mn mathcolor="purple"> 2 </m:mn> </m:msup> </m:mrow> <m:mo> + </m:mo> <m:mrow> <m:mn mathcolor="red"> 20 </m:mn> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:msup> <m:mi> a </m:mi> <m:mn mathcolor="blue"> 3 </m:mn> </m:msup> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:msup> <m:mi> b </m:mi> <m:mn mathcolor="purple"> 3 </m:mn> </m:msup> </m:mrow> <m:mo> + </m:mo> <m:mrow> <m:mn mathcolor="red"> 15 </m:mn> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:msup> <m:mi> a </m:mi> <m:mn mathcolor="blue"> 2 </m:mn> </m:msup> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:msup> <m:mi> b </m:mi> <m:mn mathcolor="purple"> 4 </m:mn> </m:msup> </m:mrow> <m:mo> + </m:mo> <m:mrow> <m:mn mathcolor="red"> 6 </m:mn> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:msup> <m:mi> a </m:mi> <m:mn mathcolor="blue"> 1 </m:mn> </m:msup> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:msup> <m:mi> b </m:mi> <m:mn mathcolor="purple"> 5 </m:mn> </m:msup> </m:mrow> <m:mo> + </m:mo> <m:mrow> <m:mn mathcolor="red"> 1 </m:mn> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:msup> <m:mi> a </m:mi> <m:mn mathcolor="blue"> 0 </m:mn> </m:msup> <m:mo> ⁢ <!--invisible times--> </m:mo> <m:msup> <m:mi> b </m:mi> <m:mn mathcolor="purple"> 6 </m:mn> </m:msup> </m:mrow> </m:mrow> </m:math> <span>.</span> </p></prodnote> </imggroup>
Example 1
(enVision Math. Page 49. Pearson. ISBN: 0328272817.)
<list type="pl"> <li><span>9. </span> <list type="pl"> <li><m:math id="m101" alttext="blue square plus 6 equals 10" altimg="images/p049-001.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi mathcolor="blue"> ■ <!--black square--> </m:mi> <m:mo> + </m:mo> <m:mn> 6 </m:mn> <m:mo> = </m:mo> <m:mn> 10 </m:mn> </m:mrow> </m:math></li> <li><m:math id="m102" alttext="6 plus blue square equals 10" altimg="images/p049-002.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mn> 6 </m:mn> <m:mo> + </m:mo> <m:mi mathcolor="blue"> ■ <!--black square--> </m:mi> <m:mo> = </m:mo> <m:mn> 10 </m:mn> </m:mrow> </m:math></li> <li><m:math id="m103" alttext="blue square equals blank" altimg="images/p049-003.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi mathcolor="blue"> ■ <!--black square--> </m:mi> <m:mo> = </m:mo> <m:menclose notation="bottom"> <m:mspace class="MathML-Blank" width="3em" height="2ex"/> </m:menclose> </m:mrow> </m:math></li> </list> </li> <li><span>10. </span> <list type="pl"> <li><m:math id="m104" alttext="1 plus red triangle equals 9" altimg="images/p049-004.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mn> 1 </m:mn> <m:mo> + </m:mo> <m:mi mathcolor="red"> ▲ <!--black up-pointing triangle--> </m:mi> <m:mo> = </m:mo> <m:mn> 9 </m:mn> </m:mrow> </m:math></li> <li><m:math id="m105" alttext="red triangle plus 1 equals 9" altimg="images/p049-005.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi mathcolor="red"> ▲ <!--black up-pointing triangle--> </m:mi> <m:mo> + </m:mo> <m:mn> 1 </m:mn> <m:mo> = </m:mo> <m:mn> 9 </m:mn> </m:mrow> </m:math></li> <li><m:math id="m106" alttext="red triangle equals blank" altimg="images/p049-006.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi mathcolor="red"> ▲ <!--black up-pointing triangle--> </m:mi> <m:mo> = </m:mo> <m:menclose notation="bottom"> <m:mspace class="MathML-Blank" width="3em" height="2ex"/> </m:menclose> </m:mrow> </m:math></li> </list> </li> </list>
In problems 9 and 10, colored symbols are used to represent variables. These
are marked up as identifiers. A black square (■
) and a
black triangle (▲
) are used, with the
mathcolor
attribute of the <m:mi>
element set to
"blue"
and "red"
. This creates a similar look to the
colored shapes in the original problem.
Example 2
(Prentice Hall Mathematics Algebra I. Page 465. Pearson. ISBN: 013052316X)
<li> <span>47. Let </span> <m:math id="m96" alttext="boxed n" altimg="images/001.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:menclose notation="box"> <m:mi> n </m:mi> </m:menclose> </m:mrow> </m:math> <span> represent the number of different pairs of integers whose product is </span> <m:math id="m97" alttext="n" altimg="images/002.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi> n </m:mi> </m:mrow> </m:math> <span>. For example, </span> <m:math id="m98" alttext="-1 times 10" altimg="images/003.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mo> - </m:mo> <m:mn> 1 </m:mn> </m:mrow> <m:mo> × <!--multiplication sign--> </m:mo> <m:mn> 10 </m:mn> </m:mrow> </m:math> <span>, </span> <m:math id="m99" alttext="-2 times 5" altimg="images/004.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mo> - </m:mo> <m:mn> 2 </m:mn> </m:mrow> <m:mo> × <!--multiplication sign--> </m:mo> <m:mn> 5 </m:mn> </m:mrow> </m:math> <span>, </span> <m:math id="m100" alttext="1 times left-parenthesis -10 right-parenthesis" altimg="images/005.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mn> 1 </m:mn> <m:mo> × <!--multiplication sign--> </m:mo> <m:mfenced> <m:mrow> <m:mo> - </m:mo> <m:mn> 10 </m:mn> </m:mrow> </m:mfenced> </m:mrow> </m:math> <span>, and </span> <m:math id="m101" alttext="2 times left-parenthesis -5 right-parenthesis" altimg="images/006.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mn> 2 </m:mn> <m:mo> × <!--multiplication sign--> </m:mo> <m:mfenced> <m:mrow> <m:mo> - </m:mo> <m:mn> 5 </m:mn> </m:mrow> </m:mfenced> </m:mrow> </m:math> <span> give </span> <m:math id="m102" alttext="-10" altimg="images/007.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mo> - </m:mo> <m:mn> 10 </m:mn> </m:mrow> </m:math> <span>. So </span> <m:math id="m103" alttext="boxed -10 equals 4" altimg="images/008.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:menclose notation="box"> <m:mo> - </m:mo> <m:mn> 10 </m:mn> </m:menclose> <m:mo> = </m:mo> <m:mn> 4 </m:mn> </m:mrow> </m:math> <span>. What does </span> <m:math id="m104" alttext="boxed negative 24" altimg="images/009.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:menclose notation="box"> <m:mo> - </m:mo> <m:mn> 24 </m:mn> </m:menclose> </m:mrow> </m:math> <span> equal?</span> <list type="pl"> <li>A. 4</li> <li>B. 6</li> <li>C. 8</li> <li>D. 10</li> </list> </li>
Example 3
(Basic Concepts of Mathematics. Page 30. The Trillia Group. ISBN: 1931705003.)
<li> <span>8. Let </span> <m:math id="m105" alttext="upper t" altimg="images/001.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi mathvariant="script"> T </m:mi> </m:mrow> </m:math> <span> be the family of all one-to-one maps of a set </span> <m:math id="m106" alttext="upper a" altimg="images/002.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi> A </m:mi> </m:mrow> </m:math> <span> onto itself. Prove the following:</span> <list type="pl"> <li> <span>(i) If </span> <m:math id="m107" alttext="f comma g are elements of upper t" altimg="images/003.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mi> ƒ </m:mi> <m:mo> , </m:mo> <m:mi> g </m:mi> </m:mrow> <m:mo> ∈ <!--element of--> </m:mo> <m:mi mathvariant="script"> T </m:mi> </m:mrow> </m:math> <span>, then </span> <m:math id="m108" alttext="f of g is an element of upper t" altimg="images/004.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mi> ƒ </m:mi> <m:mo> ∘ <!--ring operator--> </m:mo> <m:mi> g </m:mi> </m:mrow> <m:mo> ∈ <!--element of--> </m:mo> <m:mi mathvariant="script"> T </m:mi> </m:mrow> </m:math> <span>.</span> </li> <li> <span>(ii) If </span> <m:math id="m109" alttext="f is an element of upper t" altimg="images/005.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi> ƒ </m:mi> <m:mo> ∈ <!--element of--> </m:mo> <m:mi> T </m:mi> </m:mrow> </m:math> <span>, then </span> <m:math id="m110" alttext="f superscript negative 1 baseline is an element of upper t" altimg="images/006.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:msup> <m:mi> ƒ </m:mi> <m:mrow> <m:mo> - </m:mo> <m:mn> 1 </m:mn> </m:mrow> </m:msup> <m:mo> ∈ <!--element of--> </m:mo> <m:mi mathvariant="script"> T </m:mi> </m:mrow> </m:math> <span>, and </span> <m:math id="m111" alttext="f of f superscript negative 1 baseline equals f superscript negative 1 baseline of f equals upper i subscript upper a" altimg="images/007.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mi> ƒ </m:mi> <m:mo> ∘ <!--ring operator--> </m:mo> <m:msup> <m:mi> ƒ </m:mi> <m:mrow> <m:mo> - </m:mo> <m:mn> 1 </m:mn> </m:mrow> </m:msup> </m:mrow> <m:mo> = </m:mo> <m:mrow> <m:msup> <m:mi> ƒ </m:mi> <m:mrow> <m:mo> - </m:mo> <m:mn> 1 </m:mn> </m:mrow> </m:msup> <m:mo> ∘ <!--ring operator--> </m:mo> <m:mi> ƒ </m:mi> </m:mrow> <m:mo> = </m:mo> <m:msub> <m:mi> I </m:mi> <m:mi> A </m:mi> </m:msub> </m:mrow> </m:math> <span> (</span> <m:math id="m112" alttext="equals" altimg="images/008.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mo> = </m:mo> </m:mrow> </m:math> <span> identity map on </span> <m:math id="m113" alttext="upper a" altimg="images/009.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi> A </m:mi> </m:mrow> </m:math> <span>).</span> </li> <li> <span>(iii) If </span> <m:math id="m114" alttext="f is an element of upper t" altimg="images/010.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi> ƒ </m:mi> <m:mo> ∈ <!--element of--> </m:mo> <m:mi mathvariant="script"> T </m:mi> </m:mrow> </m:math> <span>, then </span> <m:math id="m115" alttext="f of upper i subscript upper a baseline equals upper i subscript upper a baseline of f equals f" altimg="images/011.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mi> ƒ </m:mi> <m:mo> ∘ <!--ring operator--> </m:mo> <m:msup> <m:mi> I </m:mi> <m:mi> A </m:mi> </m:msup> </m:mrow> <m:mo> = </m:mo> <m:mrow> <m:msup> <m:mi> I </m:mi> <m:mi> A </m:mi> </m:msup> <m:mo> ∘ <!--ring operator--> </m:mo> <m:mi> ƒ </m:mi> </m:mrow> <m:mo> = </m:mo> <m:mi> ƒ </m:mi> </m:mrow> </m:math> <span>. Note: By Theorem 1, we also have </span> <m:math id="m116" alttext="left-parenthesis f of g right-parenthesis equals f of left-parenthesis g of h right-parenthesis" altimg="images/012.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mfenced> <m:mrow> <m:mi> ƒ </m:mi> <m:mo> ∘ <!--ring operator--> </m:mo> <m:mi> g </m:mi> </m:mrow> </m:mfenced> <m:mo> ∘ <!--ring operator--> </m:mo> <m:mi> h </m:mi> </m:mrow> <m:mo> = </m:mo> <m:mrow> <m:mi> ƒ </m:mi> <m:mo> ∘ <!--ring operator--> </m:mo> <m:mfenced> <m:mrow> <m:mi> g </m:mi> <m:mo> ∘ <!--ring operator--> </m:mo> <m:mi> h </m:mi> </m:mrow> </m:mfenced> </m:mrow> </m:math> <span> for all </span> <m:math id="m117" alttext="f comma g comma h are elements of upper t" altimg="images/013.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mi> ƒ </m:mi> <m:mo> , </m:mo> <m:mi> g </m:mi> <m:mo> , </m:mo> <m:mi> h </m:mi> </m:mrow> <m:mo> ∈ <!--element of--> </m:mo> <m:mi mathvariant="script"> T </m:mi> </m:mrow> </m:math> <span>. (A reader familiar with group theory will infer from all this that </span> <m:math id="m118" alttext="upper t" altimg="images/014.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mi mathvariant="script"> T </m:mi> </m:mrow> </m:math> <span> is a <em>group</em>.)</span> </li> </list> </li>
Example 4
(Prentice Hall Mathematics Course I. Page 183. Pearson Prentice Hall. ISBN: 0132031396.)
<p> <m:math id="m120" alttext="Example of longdivision with explanation." altimg="images/div001.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mtable> <m:mtr> <m:mtd></m:mtd> <m:mtd columnalign="right"> <m:mn> 1 </m:mn> <m:mtext> ← <!--left arrow--> The quotient represents one whole orange. </m:mtext> </m:mtd> </m:mtr> <m:mtr> <m:mtd columnalign="right"> <m:mn> 6 </m:mn> </m:mtd> <m:mtd columnalign="right"> <m:menclose notation="longdiv"> <m:mn> 9 </m:mn> </m:menclose> </m:mtd> </m:mtr> <m:mtr> <m:mtd></m:mtd> <m:mtd columnalign="right"> <m:munder> <m:mrow> <m:mo> - </m:mo> <m:mn> 6 </m:mn> </m:mrow> <m:mo> ̲ <!--combining low line--> </m:mo> </m:munder> </m:mtd> </m:mtr> <m:mtr> <m:mtd></m:mtd> <m:mtd columnalign="right"> <m:mn> 3 </m:mn> <m:mtext> ← <!--left arrow--> The remainder represents three slices. </m:mtext> </m:mtd> </m:mtr> </m:mtable> </m:math> </p> <p><span>Write the remainder 3 as a fraction </span> <m:math id="m121" alttext="three sixths" altimg="images/div002.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mfrac> <m:mn> 3 </m:mn> <m:mn> 6 </m:mn> </m:mfrac> </m:math> <span>.</span> </p> <list type="pl"> <li> <m:math id="m122" alttext="nine sixths equals one and three sixths" altimg="images/div003.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mfrac> <m:mn> 9 </m:mn> <m:mn> 6 </m:mn> </m:mfrac> <m:mo> = </m:mo> <m:mrow> <m:mn> 1 </m:mn> <m:mo> ⁤ <!--invisible plus--> </m:mo> <m:mfrac> <m:mn> 3 </m:mn> <m:mn> 6 </m:mn> </m:mfrac> </m:mrow> </m:mrow> </m:math> </li> <li> <m:math id="m123" alttext="equals one and one-half" altimg="images/div004.jpg" xmlns:dtbook="http://www.daisy.org/z3986/2005/dtbook/" display="inline"> <m:mrow> <m:mrow> <m:mphantom> <m:mfrac> <m:mn> 9 </m:mn> <m:mn> 6 </m:mn> </m:mfrac> </m:mphantom> </m:mrow> <m:mo> = </m:mo> <m:mrow> <m:mn> 1 </m:mn> <m:mo> ⁤ <!--invisible plus--> </m:mo> <m:mfrac> <m:mn> 1 </m:mn> <m:mn> 2 </m:mn> </m:mfrac> </m:mrow> </m:mrow> </m:math> <span> ← <!--left arrow--> Simplify.</span> </li> </list>
Because the call outs point to particular "cells" in the long division
problem, an <mtable>
may be more beneficial to the reader
than a <longdiv>
.
Entity Reference |
Character Name |
Symbol |
---|---|---|
|
Middle Dot |
|
|
Multiplication Sign |
|
|
Division Sign |
|
|
Function Application |
|
|
Invisible Times |
|
|
Invisible Comma |
|
|
Invisible Plus |
|
|
Ring Operator |
|
∪ |
Union | |
∩ |
Intersection | |
∅ |
Empty Set | |
∈ |
Element Of | |
⊆ |
Subset Of Or Equal To | |
▲ |
Black Up-Pointing Triangle | |
■ |
Black Square | |
  |
No-Break Space |