Display and inline mode

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

Mathematical formulas can be displayed in a Web page, in either inline or display form. Inline equations are integrated with the surrounding text, while display equations are typically shown in a separate block and aligned with the center of the page. These two modes are distinguished in MathML using the display attribute of the math element. This attribute has the value inline for inline equations, and block for display equations.

The following rule sets some style properties that are characteristic of inline equations:

math[display="inline"] {
  display: inline;
  font-family: cmsy10, cmex10, Symbol, Times; }

This rule specifies that the contents of a math element whose display attribute has the value inline should be displayed using the cmsy10 or cmex10 fonts. These are part of the Computer Modern family of fonts, which is widely used in TeX and LaTeX documents. These fonts contain glyphs for a large number of symbols and special characters used in mathematical expressions. If these fonts are not available, then the Symbol font is used instead. This font also contains glyphs for Greek letters and other special characters. If the Symbol font is also not available, the Times font is used.

The following rule sets some style properties characteristic of display equations:

math[display="block"] {
  display: block;
  text-align: center;
  font-family: cmsy, cmex, Symbol, Times; }

In addition to specifying the font family, this rule assigns suitable values to the CSS properties display and text-align.

   

<< 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