Please refer to theerratafor this document, which may include some normative corrections.
In addition to theHTML version, this document is also available in these non-normative formats:diff marked HTML version,XHTML+MathML version,PDF (paper formatted) version,PDF (screen formatted) version,zip archive of XML sources and stylesheets, and zip archive of (X)HTML documents.
See alsotranslations.
Copyright © 1998-2003W3C® (MIT,ERCIM,Keio), All Rights Reserved. W3Cliability,trademark,document use andsoftware licensing rules apply.
This specification defines the Mathematical Markup Language, orMathML. MathML is an XML applicationfor describing mathematical notation and capturing both its structure andcontent. The goal of MathML is to enable mathematics to be served,received, and processed on the World Wide Web, just asHTML has enabled this functionality fortext.
This specification of the markup language MathML is intendedprimarily for a readership consisting of those who will be developingor implementing renderers or editors using it, or software that willcommunicate using MathML as a protocol for input or output. It isnot a User's Guide but rather a reference document.
This document begins with background information on mathematicalnotation, the problems it poses, and the philosophy underlying thesolutions MathML 2.0 proposes. MathML can be used to encode bothmathematical notation and mathematical content. About thirty of theMathML tags describe abstract notational structures, while anotherabout one hundred and fifty provide a way of unambiguously specifyingthe intended meaning of an expression. Additional chapters discuss howthe MathML content and presentation elements interact, and how MathMLrenderers might be implemented and should interact withbrowsers. Finally, this document addresses the issue of MathMLcharacters and their relation to fonts.
While MathML is human-readable, it is anticipated that, in all butthe simplest cases, authors will use equation editors, conversionprograms, and other specialized software tools to generateMathML. Several versions of such MathML tools already exist, anda number of others, both freely available software and commercialproducts, are under development.
This section describes the status of this document at the timeof its publication. Other documents may supersede this document. Alist of current W3C publications and the latest revision of thistechnical report can be found in theW3C technical reports index athttp://www.w3.org/TR/.
This specification is a Superseded Recommendation. A newerspecification exists that is recommended for new adoption in place ofthis specification.
For purposes of the W3C Patent Policy, this SupersededRecommendation has the same status as an active Recommendation; itretains licensing commitments and remains available as a reference forold – and possibly still deployed – implementations, butis not recommended for future implementation. New implementationsshould follow the latest version of the MathML specification. (This isfurther explainedinObsoleting and Rescinding W3C Specifications.
This is a revised edition of a document that has been reviewed by W3C Members and other interestedparties and has been endorsed by the Director as aW3CRecommendation.
This document has been produced by theW3C Math Working Group as part ofW3CMathActivity.The goals of the W3C Math Working Group arediscussed in the W3C Math WGCharter (revised February 2000 and June 2001 from the original of 11June 1998). A list ofparticipants in the W3C Math Working Groupis available.
The MathML 2.0 (Second Edition) specification was reviewed extensively during its development, as provided by the W3C Process. During that period the W3C Math Working Group participants encouraged implementation using the specification and comment on it; a report onImplementation and Interoperability experiences and issues has been made public. It is intended that this will be updated from time to time by the continuing work of the W3C that oversees the MathML 2.0 Recommendation. The W3C Math Activity maintains a public Web pagehttp://www.w3.org/Math/ which contains further background information.
The preparation of a Second Edition of the MathML 2.0 Specification allows the revision of that document to provide a coherent wholecontaining corrections to all the known errata and clarifications of some smaller issues that proved problematic. It is not the occasionfor any fundamental changes in the language MathML 2.0. To clarify this adiff-marked HTML version of this Second Editionis made available.
Public discussion of MathML and issues of support through the W3Cfor mathematics on the Web takes place on the public mailing list of the Math WorkingGroup (list archives).To subscribe send an email towww-math-request@w3.orgwith the wordsubscribe
in the subject line.
Please report errors in this document towww-math@w3.org.
Patent disclosures relevant to this specification may be found on the Math Working Group'spatentdisclosure page.
The basic structure of this document is the same as that ofthe earlier MathML 2.0 Recommendation[MathML2], withthe addition of an index in the new Appendix L.MathML 2.0 itself was a revision of the earlier W3C Recommendation MathML 1.01[MathML1]. It differed from it in that all chapters were updated andtwo new ones and some appendices were added.
Since MathML 1.01,Chapters 1 and 2, which are introductory material, have been revisedto reflect the changes elsewhere in the document, and in the rapidlyevolving Web environment. Chapters 3 and 4 have been extended todescribe new functionalities added as well as smaller improvements ofmaterial already proposed. Chapter 5 has been newly written to reflectchanges in the technology available. The major tables in Chapter 6have been regenerated and reorganized to reflect an improved list of characters useful for mathematics, and the text revised to reflect thenew situation in regard to Unicode. Chapter 7 has been completelyrevised since Web technology has changed. A new Chapter 8 on the DOM forMathML 2.0 has been added; the latter points to new appendices D and E fordetailed listings.
The appendices have been reorganized into normative andnon-normative groups. The material in Appendices D, E, G and L was not present in MathML 1.01.
1Introduction
1.1Mathematics and its Notation
1.2Origins and Goals
1.2.1The History of MathML
1.2.2Limitations of HTML
1.2.3Requirements for Mathematics Markup
1.2.4Design Goals of MathML
1.3The Role of MathML on the Web
1.3.1Layered Design of Mathematical Web Services
1.3.2Relation to Other Web Technology
2MathML Fundamentals
2.1MathML Overview
2.1.1Taxonomy of MathML Elements
2.1.2Presentation Markup
2.1.3Content Markup
2.1.4Mixing Presentation and Content
2.2MathML in a Document
2.3Some MathML Examples
2.3.1Presentation Examples
2.3.2Content Examples
2.3.3Mixed Markup Examples
2.4MathML Syntax and Grammar
2.4.1MathML Syntax and Grammar
2.4.2An XML Syntax Primer
2.4.3Children versus Arguments
2.4.4MathML Attribute Values
2.4.5Attributes Shared by all MathML Elements
2.4.6Collapsing Whitespace in Input
3Presentation Markup
3.1Introduction
3.1.1What Presentation Elements Represent
3.1.2Terminology Used In This Chapter
3.1.3Required Arguments
3.1.4Elements with Special Behaviors
3.1.5Bidirectional Layout
3.1.6Summary of Presentation Elements
3.2Token Elements
3.2.1MathML characters intoken elements
3.2.2Mathematics style attributes common to tokenelements
3.2.3Identifier (mi)
3.2.4Number (mn)
3.2.5Operator, Fence, Separator or Accent (mo)
3.2.6Text (mtext)
3.2.7Space (mspace)
3.2.8String Literal (ms)
3.2.9Accessing glyphs forcharacters from MathML (mglyph)
3.3General Layout Schemata
3.3.1Horizontally Group Sub-Expressions (mrow)
3.3.2Fractions (mfrac)
3.3.3Radicals (msqrt, mroot)
3.3.4Style Change (mstyle)
3.3.5Error Message (merror)
3.3.6Adjust Space Around Content (mpadded)
3.3.7Making Sub-Expressions Invisible (mphantom)
3.3.8Expression Inside Pair of Fences (mfenced)
3.3.9Enclose Expression Inside Notation (menclose)
3.4Script and Limit Schemata
3.4.1Subscript (msub)
3.4.2Superscript (msup)
3.4.3Subscript-superscript Pair (msubsup)
3.4.4Underscript (munder)
3.4.5Overscript (mover)
3.4.6Underscript-overscript Pair (munderover)
3.4.7Prescripts and Tensor Indices (mmultiscripts)
3.5Tables and Matrices
3.5.1Table or Matrix (mtable)
3.5.2Row in Table or Matrix (mtr)
3.5.3Labeled Row in Table or Matrix (mlabeledtr)
3.5.4Entry in Table or Matrix (mtd)
3.5.5Alignment Markers
3.6Enlivening Expressions
3.6.1Bind Action to Sub-Expression (maction)
4Content Markup
4.1Introduction
4.1.1The Intent of Content Markup
4.1.2The Scope of Content Markup
4.1.3Basic Concepts of Content Markup
4.2Content Element Usage Guide
4.2.1Overview of Syntax and Usage
4.2.2Containers
4.2.3Functions, Operators and Qualifiers
4.2.4Relations
4.2.5Conditions
4.2.6Syntax and Semantics
4.2.7Semantic Mappings
4.2.8Constants and Symbols
4.2.9MathML element types
4.3Content Element Attributes
4.3.1Content Element Attribute Values
4.3.2Attributes Modifying Content Markup Semantics
4.3.3Attributes Modifying Content Markup Rendering
4.4The Content Markup Elements
4.4.1Token Elements
4.4.2Basic Content Elements
4.4.3Arithmetic, Algebra and Logic
4.4.4Relations
4.4.5Calculus and Vector Calculus
4.4.6Theory of Sets
4.4.7Sequences and Series
4.4.8Elementary classical functions
4.4.9Statistics
4.4.10Linear Algebra
4.4.11Semantic Mapping Elements
4.4.12Constant and Symbol Elements
5Combining Presentation and Content Markup
5.1Why Two Different Kinds of Markup?
5.2Mixed Markup
5.2.1Reasons to Mix Markup
5.2.2Combinations that are prohibited
5.2.3Presentation Markup Contained in Content Markup
5.2.4Content Markup Contained in Presentation Markup
5.3Parallel Markup
5.3.1Top-level Parallel Markup
5.3.2Fine-grained Parallel Markup
5.3.3Parallel Markup via Cross-References:id and xref
5.3.4Annotation Cross-References using XLink:id and href
5.4Tools, Style Sheets and Macros for Combined Markup
5.4.1Notational Style Sheets
5.4.2Content-Faithful Transformations
5.4.3Style Sheets for Extensions
6Characters, Entities and Fonts
6.1Introduction
6.2MathML Characters
6.2.1Unicode Character Data
6.2.2Special Characters Not in Unicode
6.2.3Mathematical Alphanumeric SymbolsCharacters
6.2.4Non-Marking Characters
6.3Character Symbol Listings
6.3.1Special Constants
6.3.2Character Tables (ASCII format)
6.3.3Tables arranged by Unicode block
6.3.4NegatedMathematical Characters
6.3.5VariantMathematical Characters
6.3.6Mathematical Alphanumeric Symbols
6.3.7MathML Character Names
6.4Differences from Characters in MathML 1
6.4.1Coverage
6.4.2Fewer Non-marking Characters
6.4.3ISO Tables
6.4.4Status of Character Encodings
7The MathML Interface
7.1Embedding MathML in other Documents
7.1.1MathML and Namespaces
7.1.2The Top-Level math Element
7.1.3Invoking MathML Processors
7.1.4Mixing and Linking MathML and HTML
7.1.5MathML and Graphical Markup
7.1.6Using CSS with MathML
7.2Conformance
7.2.1MathML Conformance
7.2.2Handling of Errors
7.2.3Attributes for unspecified data
7.3Future Extensions
7.3.1Macros and Style Sheets
7.3.2XML Extensions to MathML
8Document Object Model for MathML
8.1Introduction
8.1.1hasFeature String
8.1.2MathML DOM Extensions
AParsing MathML
A.1Use of MathML as Well-FormedXML
A.2Using the MathML DTD
A.2.1DOCTYPE declaration for MathML
A.2.2DTD Parameters
A.2.3MathML as a DTD Module
A.2.4SGML
A.2.5The MathML DTD
A.3Using the MathML XML Schema
A.3.1Associating the MathML schema with MathML fragments
A.3.2Character entity references
BContent Markup Validation Grammar
CContent Element Definitions
C.1About Content Markup Elements
C.1.1The Default Definitions
C.1.2The Structure of an MMLdefinition.
C.2Definitions of MathML Content Elements
C.2.1Token Elements
C.2.2Basic Content Elements
C.2.3Arithmetic Algebra and Logic
C.2.4Relations
C.2.5Calculus and Vector Calculus
C.2.6Theory of Sets
C.2.7Sequences and Series
C.2.8Elementary Classical Functions
C.2.9Statistics
C.2.10Linear Algebra
C.2.11Constants and Symbol Elements
DDocument Object Model for MathML
D.1IDL Interfaces
D.1.1Miscellaneous Object Definitions
D.1.2Generic MathML Elements
D.1.3Presentation Elements
D.1.4Content Elements
D.2MathML DOM Tables
D.2.1Chart of MathML DOM Inheritance
D.2.2Table of Elements and MathML DOM Representations
EMathML Document Object Model Bindings (Non-Normative)
E.1MathML Document Object Model IDL Binding
E.2MathML Document Object Model Java Binding
E.3MathML Document Object Model ECMAScript Binding
FOperator Dictionary (Non-Normative)
F.1Format of operator dictionary entries
F.2Indexing of operator dictionary
F.3Choice of entity names
F.4Notes on lspace and rspace attributes
F.5Operator dictionary entries
GSample CSS Style Sheet for MathML (Non-Normative)
HGlossary (Non-Normative)
IWorking Group Membership and Acknowledgments (Non-Normative)
I.1The Math Working Group Membership
I.2Acknowledgments
JChanges (Non-Normative)
J.1Changes between MathML 2.0 and MathML 2.0 Second Edition
J.2Changes between MathML 1.01 and MathML 2.0
KReferences (Non-Normative)
LIndex (Non-Normative)
L.1MathML Elements
L.2MathML Attributes