Character glyphs

(Excerpt from "The MathML Handbook" by Pavi Sandhu)

A MathML expression can contain any character included in the Unicode character set. In particular, technical symbols and other extended characters can be included either using a named entity reference defined in the MathML DTD or, more generally, using the numeric character entity reference defined in Unicode.

However, in special cases, you might need to use a character that is not available in Unicode. Alternatively, you might wish to use a Unicode character but represent it using a variant of the standard glyph associated with the character. MathML provides the mglyph element specifically for use in such situations. It allows you insert a particular glyph from a particular font family at any place in your document.

The mglyph element accepts the following three attributes:

  • fontfamily: specifies the font family that contains the glyph.
  • index: is a number that specifies the position of the glyph in a particular font family.
  • alt: provides an alternate name for the glyph. This name can be used by an audio renderer or by a visual renderer if it cannot find the specified font family for rendering the glyph. If using this, you should choose a descriptive name for it.

These are all required attributes; that is, they do not have a default value and must be explicitly specified in every mglyph element.

Here is an example that shows the use of the mglyph element:

R = A + B

    <mglyph fontfamily="Mathematica 6" index="82" alt="GothicCapitalR"/>
    <mglyph fontfamily="Mathematica 6" index="65" alt="GothicCapitalA"/>
    <mglyph fontfamily="Mathematica 6" index="66" alt="GothicCapitalB"/>

This explicitly specifies that the characters in positions R, A, and B from the Mathematica 6 font family should be used to display certain capital letters in a Gothic script.


<< back next >>




Tipp der data2type-Redaktion:
Zum Thema MathML bieten wir auch folgende Schulungen zur Vertiefung und professionellen Fortbildung an:


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