1 / 85

Bringing Mathematical Formatting to the Web

Bringing Mathematical Formatting to the Web. Bebo White Stanford Linear Accelerator Center bebo@slac.stanford.edu. Why?. The Web was invented to communicate scientific data Why has the display of mathematical formulae been a problem? Mathematical formatting is not easy

rafer
Télécharger la présentation

Bringing Mathematical Formatting to the Web

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Bringing Mathematical Formatting to the Web Bebo White Stanford Linear Accelerator Center bebo@slac.stanford.edu

  2. Why? • The Web was invented to communicate scientific data • Why has the display of mathematical formulae been a problem? • Mathematical formatting is not easy • The Web has had limited tools supporting math • Mathematicians/scientists are exacting about mathematical layout – they expect something like TEX or LATEX

  3. What’s My Interest? • SLAC publishes and distributes scientific papers • Web-based conference proceedings • SLAC has a long standing commitment to the Web

  4. I have “adopted” this formula for my examples in this talk • “The Pearson product moment coefficient • of correlation”

  5. The Challenges • Rendering • bringing the granularity of LATEX to the level of HTML • graphical and textual representations • display issues - baselines, etc. • Generation • formatting tools • application output

  6. The Challenges (cont) • Interoperability • use of semantic information in other applications

  7. Web Math Formats • Images • MathML • TEX or LATEX • SVG • Controls

  8. MathML • The Mathematical Markup Language, or MathML, is an XML application for describing mathematical notation and capturing both its structure and content. The goal of MathML is to enable mathematics to be served, received, and processed on the Web.

  9. MathML – Not Just For the Web MathML Interface Mathematics Across Applications

  10. MathML (cont) • Pro: • The first W3C-endorsed XML vocabulary • A low-level format for coding the presentation and semantics of a mathematical object • Fast and high quality printing and rendering • Facilitates the use and re-use of math content on the Web and other applications

  11. MathML (cont) • Con: • Complex to author – depends on tools • Limited browser support

  12. MathML • MathML 2.0 - W3C Recommendation - February 2001 • W3C Math Working Group composed of major players • MathML is an instance of XML

  13. AMS / Mathematical Reviews Boeing Design Science Inc. IBM Research Division MacKichan Software, Inc. MATH.EDU Inc Microsoft Numerical Algorithms Group PentaScope Stilo Technologies SAFIR Research Group (INRIA) Radical Flow Inc. Universita di Bologna University of Western Ontario W3C Waterloo Maple Inc. Wolfram Research Inc. W3C Math Working Group http://www.w3.org/Math/

  14. MathML Goals • From the “Math Activity Statement” of the W3C Math Working Group: • “Designed as an XML application, MathML provides two sets of tags, one for the visual presentation of mathematics and the other associated with the meaning behind equations.” • “MathML is not designed for people to enter by hand but specialized tools provide the means for typing in and editing mathematical expressions.”

  15. MathML Goals (cont) • To provide a low-level format for describing mathematics as a basis for machine to machine communication • To facilitate the use and re-use of mathematical and scientific content on the Web

  16. Arithmetic Algebra Logic Relations Set theory Calculus Sequences Series Functions Statistics Linear algebra Vector calculus Scope of MathML

  17. What Does MathML Look Like?

  18. Taxonomy of MathML Elements • Presentation elements - describe mathematical notation's visually oriented two-dimensional structure; e.g., <mrow> • Content elements - describe mathematical objects directly and what they mean; e.g., <vector> • Interface elements - describe how MathML can be used with other markup languages and applications; e.g., <math> passes parameters to a MathML processor

  19. Presentation Elements • MathML presentation markup consists of about 30 elements which accept over 50 attributes • Most of the elements correspond to layout schemata, which contain other presentation elements • Each layout schema corresponds to a two-dimensional notational device, such as a superscript or subscript, fraction or table

  20. Basic Presentation Elements • <mi> – identifier, such as a variable, function name, constant, etc. • <mo> – operator, such as a summation, fence (parentheses, brace, etc.), accent, etc. • example: <mo>(</mo>rendering: ( • example: <mo>&sum;</mo>rendering: S

  21. Basic Presentation Elements (cont) • <mi> – identifier, such as a variable, function name, constant, etc. • <mo> – operator, such as a summation, fence (parentheses, brace, etc.), accent, etc. • <mn> – number

  22. Basic Presentation Elements (cont) • <mi> – identifier, such as a variable, function name, constant, etc. • <mo> – operator, such as a summation, fence (parentheses, brace, etc.), accent, etc. • <mn> – number • What is this expression?<mi>x</mi><mo>–</mo><mo>(</mo> <mn>3</mn><mo>+</mo><mi>y</mi><mo>)</mo>

  23. Basic Presentation Elements (cont) • <mi> – identifier, such as a variable, function name, constant, etc. • <mo> – operator, such as a summation, fence (parentheses, brace, etc.), accent, etc. • <mn> – number • What is this expression?<mi>x</mi><mo>–</mo><mo>(</mo> <mn>3</mn><mo>+</mo><mi>y</mi><mo>)</mo> x – (3 + y)

  24. Other Presentation Elements • Presentation elements are grouped: • Token Elements • <mi> identifier • <mn> number • <mo> operator, fence, or separator • <mtext> text

  25. Other Presentation Elements • Presentation elements are grouped: • Token Elements • General Layout • <mrow> to group subexpressions • <mfrac> form fraction from 2 subexpressions • <mroot> radical with a specified index • <mfenced> surround content with a pair of fences

  26. Other Presentation Elements • Presentation elements are grouped: • Token Elements • General Layout • Scripts and Limits • <msub>, <msup>, <msubsup> • <munder>attach a script under a base • <mover>attach a script over a base • <munderover> attach a script both under and over a base

  27. Other Presentation Elements • Presentation elements are grouped: • Token Elements • General Layout • Scripts and Limits • Tables • <mtable> table or matrix • <mtr> row in a table or matrix • <mtd> one entry in a table or matrix

  28. Other Presentation Elements • Presentation elements are grouped: • Token Elements • General Layout • Scripts and Limits • Tables • Actions • <maction> binds actions to a subexpression

  29. Token Elements • Some MathML elements, (e.g., <mfrac>) have other MathML elements in their content • Other presentation elements do not (e.g.,<mi>, <mo>, and <mn>) • These are token elements • Token elements are the only elements which directly contain character data

  30. Scripts – Sub & Super • Elements which, by definition, have more than one argument • Subscript: <msub> basescript </msub> • Superscript: <msup> basescript </msup> • Usage:x1 <msub><mi>x</mi><mn>1</mn></msub> x2<msup><mi>x</mi><mn>2</mn></msup> <msubsup><mi>x</mi> <mn>1</mn> <mn>2</mn></msubsup>

  31. Content Elements • Content markup consists of about 100 elements accepting roughly a dozen attributes • The majority of these elements are empty elements corresponding to a wide variety of operators, relations and named functions • There are also elements used to apply operations to expressions and to make new mathematical objects from others

  32. Content Elements • Most fundamental to content markup is the <apply> element, which enables the explicit application of a function to its argument.

  33. Content Elements • <apply>application of a function to argument. • Token Elements • <cn> content number (e.g., <cn type="real"> 12345.7 </cn> ) • <ci> content identifier (e.g., <ci type="vector"> V </ci> )

  34. Content Elements • <apply>application of a function to argument. • Token Elements • Basic Content Elements • <inverse/> generic inverse • <compose/> compose 2 or more functions • <piecewise> piecewise defined function

  35. Content Elements • <apply>application of a function to argument. • Token Elements • Basic Content Elements • Arithmetic, Algebra, and Logic • <divide/> division • <power/> to the power of • <root/> nth root • <conjugate/> complex conjugate

  36. Content Elements • <apply>application of a function to argument. • Token Elements • Basic Content Elements • Arithmetic, Algebra, and Logic • Relations • <eq/> equal • <geq/> greater than or equal • <factorof/> the “divides” operator

  37. Content Elements • <apply>application of a function to argument. • Token Elements • Basic Content Elements • Arithmetic, Algebra, and Logic • Relations • Calculus and Set Theory • <partialdiff/> partial derivative • <lowlimit> lower limit (of integral, etc.) • <union/> union or meet

  38. Content Elements • <apply>application of a function to argument. • Token Elements • Basic Content Elements • Arithmetic, Algebra, and Logic • Relations • Calculus and Set Theory • Further element groups include sequences & series, elementary classical functions, statistics, linear algebra, semantic mapping elements, and constants.

  39. Presentation and Content <math> <reln> <eq/> <ci>E</ci> <apply> <times/> <ci>m</ci> <apply> <power/> <ci>c</ci> <cn>2</cn> </apply> </apply> </reln> </math> <math> <mrow> <mi>E</mi> <mo>=</mo> <mrow> <mi>m</mi> <mo>&InvisibleTimes;</mo> <msup> <mi>c</mi> <mn>2</mn> </msup> </mrow> </mrow> </math>

  40. Enlivening Markup <math> <maction actiontype="audio"> <mrow> <mi>E</mi> <mo>=</mo> <mrow> <mi>m</mi> <mo>&InvisibleTimes;</mo> <msup> <mi>c</mi> <mn>2</mn> </msup> </mrow> </mrow> <mtext>emc.wav</mtext> </maction> </math> Enlivening markup allows coding of various kinds of actions on notation, such as occur in an expression which toggles between two pieces of notation.

  41. Interface Elements • Interface elements describe how MathML can be used with other markup languages and applications • <math> passes parameters to a MathML processor • <semantics> contains references and attributes for external program processing • <annotation> contains arbitrary data. This data may be in the form of text, computer algebra encodings, C programs, or whatever a processing application expects

  42. Examples of Element Attributes <mfrac linethickness='0'> …</mfrac> <mspace width='12'/> <mtable columnalign="center"> …</mtable>

  43. Generating MathML • Not intended to be authored “by hand” • Programs such as Mathematica, Maple, MathType support/export MathML • MathML editing/authoring environments • Most tools can generate either • Embedded MathML (in HTML, XHTML, or XML files) • MathML (.mml) files

  44. MathML Tools: Computing • Maple: an interactive math computational system from Waterloo Maple http://www.maplesoft.com/standards/MathML/ info.html • Mathematica: a technical programming environment from Wolfram Research http://www.wolfram.com/products/mathematica/ • REDUCE: algabraic calculator reads and writes MathML (1999). http://www.uni-koeln.de/REDUCE/

  45. MathML Equation Editors • Amaya (editor and browser) - http://www.w3.org/Amaya/ • MathType (editor and MSWord plug-in) -http://www.mathtype.com/ • WebEQ (developers suite) - http://www.mathtype.com/en/products/webeq/

More Related