310 likes | 735 Views
MathML. Mathematical Markup Language. Introduction. MathML deals with describing mathematical notation and the display of mathematical equations This presentation will provide the audience with the basic notation in MathML using some examples.
E N D
MathML Mathematical Markup Language
Introduction MathML deals with describing mathematical notation and the display of mathematical equations This presentation will provide the audience with the basic notation in MathML using some examples. This presentation will also demonstrate the creation of a MathML document using open-source software
Outline Development history Goals of MathML Presentation and Context MathML Mixing markup languages HTML interface Software Editors
History The common practice among scientists before the Web was to write papers in some encoded form based on the ASCII character set, and e-mail them to each other. TeX is another typesetting software, created by Donald Knuth, for equations At the beginning of the web, math notations were stored in text with images.
Historical Dates 1994, Dave Raget presented a proposal for HTML Math in the HTML 3.0 working draft 1995, Wolfram Research presented a proposal for doing mathematics in HTML 1996, an HTML Math Editorial Review Board was formed 1997, the Board formally reconstituted as the first W3C Math Working Group 1998, the second W3C Math Working Group was chartered.
Versions April 1998, MathML 1 was released as a W3C recommendation July 1999, MathML 1.01 was released February 2001 MathML 2.0 first edition was released October 2003, the second edition of MathML 2.0 was published In June 2006 the W3C has rechartered the MathML Working Group to produce a MathML 3 June 2009 Draft of the MathML 3 revision was published
Goals of MathML Encode mathematics of all levels Encode both notation and meaning Facilitate conversion to and from other formats Support efficient display of large expressions Provide for extensibility Be well suited for templates Be human-readable and simple for software processing
Body • All MathML must be encapsulated in a <math> root tag • Cannot contain any other <math> tags • 2 Types of MathML notation • Presentation MathML • Content MathML • Does not require namespaces • Created before XML namespace finalization
Presentation MathML - Syntax • MathML is an application of XML, so it is governed by the rules of XML syntax. MathML keeps XML-order. • In MathML the syntactic structure of mathematical notation is the structure of titles, sections, and paragraphs. • Token elements have an m in front. • mi identifier (2x + 4 = 3), (2a+ b = 3) • mn number (ax + c = 5) • mo operator, fence, or separator (ax + c = 0) • mtext text (<mtext>if</mtext> ) • mspace space • ms string literal • mglyph represents non standard symbols as images
Presentation MathML - Syntax • Some argument requirements • mrow • mfrac • msqrt • mroot • mfenced<mfenced> <mi>x</mi> </mfenced> renders as "(x)" • and is equivalent to <mrow> <mo> ( </mo> <mi>x</mi> <mo> ) </mo> </mrow> • merrordisplays its content as an error message • Sub x₂ • msupxⁿ
Presentation MathML - Example For example: “a=b+c” meaning as [a=(b+c)] <mrow> <mi> a </mi> <mo> = </mo> <mrow> <mi> b </mi> <mo> + </mo> <mi> c </mi> </mrow> </mrow>
Presentation MathML Attributes Using images to represent symbols • mglyph(is used to represent non-standard characters or symbols by images) • mathcolor (foreground color) • mathbackground (color) • src (URI location of the image resource) • width (width of the glyph) • height (desired height of the glyph) • valign (baseline alignment point ) • alt (alternate name for the glyph)
Content MathML - Syntax • Token elements • <cn></cn> • Numbers <cn>10</cn> • <ci> </ci> • Symbols <ci>x</ci> • Attributes • Used to define aspects of the notation • Example: base=“8” specifies a base 8 number
Content MathML - Syntax • <apply> tag is used to build expressions • <apply> • Operator/Function • Operand 1 • Operand 2 • … • </apply> • Functions/operators are extensible and can be user-defined • Apply tags can be nested in other apply tags
Content MathML - Syntax • <declare> is used to declare a variable • Example: A=a+b • <declare> • <apply> • <eq/> • <ci>A</ci> • <apply> • <plus/> • <ci>a</ci> • <ci>b</ci> • </apply • </apply> • </declare>
Mixing Markup Languages • MathML markup can be combined with other markup languages in the creation of semantic annotation elements. • However, other markups cannot be contained inside a MathML expression • These elements provide associations between alternate mathematical representations of the same expressions. • Semantic annotation elements allow presentation markup and content markup to be combined in two different methods • Mixed markup (intersperse content and presentation elements in what is essentially a single tree) • Parallel markup (uses both in a pair combined by the semantic element)
Mixing Markup Languages Annotation framework • Pair of • Annotation key (An annotation key specifies the relationship between an expression and an annotation) • alternate representations • specification or clarification of semantics • type information • rendering hints • and private data intended for specific processors • Annotation value (associated data)
Displaying Characters and Fonts • Characters can be either direct keyboard input or Unicode reference • ‘A’ • U1D400 • Non-standard characters can be a separate image file
Software Editors • Although Math ML is human-readable, software editors are usually used for data manipulation • Supported by major products like OpenOffice and MS Office, as well as Mathematica • Firefox pluginFireMath provides a WYSIWYG editor
IntegreMathML Equation Editor Sponsored freeware for personal use Available as Java stand-alone or Java applet http://www.integretechpub.com/zed/
Demonstration of MathML Editor Pythagorean Theorem a2 + b2 = c2 Comparisons of Presentation versus Content
References • David Carlisle, Patrick Ion, & Robert Miner. Mathematical Markup Language Version 3.0. W3C Working Draft, 04 June 2009. Accessed 16 June 2010. • http://www.w3.org/TR/2009/WD-MathML3-20090604/ • W3C Math Home. W3C, 10 May 2010. Accessed 24 June 2010. • http://www.w3.org/Math/