├── .github └── workflows │ └── auto-publish.yml ├── .gitignore ├── .travis.yml ├── CONTRIBUTING.md ├── LICENSE.md ├── README-old.md ├── _layouts ├── cgreport.html └── default.html ├── historic-cvs-log.txt ├── image ├── actuarial.png ├── alignat.png ├── bevelled1.png ├── braids.png ├── circlebox.png ├── em-longdiv-arabic-lefttop.png ├── em-longdiv-colonrightright.png ├── em-longdiv-french.png ├── em-longdiv-indian.png ├── em-longdiv-leftright.png ├── em-longdiv-medium-stacked-rightright.png ├── em-longdiv-mirrored-french.png ├── em-longdiv-righttop.png ├── em-longdiv-short-stacked-rightright.png ├── em-longdiv-us.png ├── em-mult-carries.png ├── em-mult-simple.png ├── em-plus-right.png ├── em-plus-shift.png ├── em-plus.png ├── em-sub-borrow-above.png ├── em-sub-borrow-aboveleft.png ├── em-sub-borrow-swedish.png ├── emc2.png ├── f3001.png ├── f3002.png ├── intersect.png ├── intex.png ├── linebreak-example1.png ├── madruwb12.png ├── mpadded-combined.png ├── mpadded-resize.png ├── mpadded-shift.png ├── mphantom-bad.png ├── mphantom.png ├── phasorangle.png ├── repeat1.png ├── repeat2.png ├── repeat3.png ├── repeat4.png └── w3c_home.png ├── sorttable.js ├── spec.html ├── src ├── abstract.html ├── accessibility.html ├── changes.html ├── character-set.html ├── conformance.html ├── contm-new.html ├── contm-ops.html ├── contributors.html ├── fundamentals.html ├── intent.html ├── introduction.html ├── mathml-index.html ├── mixing.html ├── mmlindex.html ├── operator-dict.html ├── parsing-1.html ├── parsing-2.html ├── parsing-3.html ├── presentation-markup.html ├── privacy.html ├── respec.rnc ├── schemas.xml ├── security.html ├── sotd.html ├── transform2strict.html └── world-interactions.html └── w3c.json /.github/workflows/auto-publish.yml: -------------------------------------------------------------------------------- 1 | # Based on 2 | # https://github.com/w3c/echidna/wiki/How-to-use-Echidna 3 | # and 4 | # https://w3c.github.io/spec-prod/#examples 5 | name: CI 6 | on: 7 | push: 8 | branches: [main] 9 | jobs: 10 | main: 11 | name: Deploy to GitHub pages 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v4 15 | - run: | 16 | git fetch 17 | git checkout main 18 | git checkout gh-pages 19 | git reset main --hard 20 | git push -f 21 | - uses: w3c/spec-prod@v2 22 | with: 23 | GH_PAGES_BRANCH: gh-pages 24 | TOOLCHAIN: respec 25 | SOURCE: spec.html 26 | DESTINATION: index.html 27 | VALIDATE_MARKUP: false 28 | publish: 29 | name: Build, Validate and Deploy 30 | runs-on: ubuntu-latest 31 | steps: 32 | - uses: actions/checkout@v4 33 | - uses: w3c/spec-prod@v2 34 | with: 35 | TOOLCHAIN: respec 36 | SOURCE: spec.html 37 | VALIDATE_MARKUP: false 38 | W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN }} 39 | W3C_WG_DECISION_URL: hhttps://www.w3.org/mid/CAESRWkCboGW4E4RmntSs7UZWx9UZxmGH=1GNKq1Gg7MyfQcMdA@mail.gmail.com 40 | ARTIFACT_NAME: spec-prod-result2 41 | W3C_BUILD_OVERRIDE: | 42 | specStatus: WD 43 | shortName: mathml4 44 | 45 | 46 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | TAGS 2 | saxon9he.jar 3 | *~ 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | 2 | branches: 3 | only: 4 | - master 5 | - gh-pages 6 | 7 | notifications: 8 | email: 9 | recipients: 10 | - d.p.carlisle@gmail.com 11 | 12 | before_install: 13 | - sudo apt-get install -y rxp 14 | 15 | install: 16 | - ./build/install-tools 17 | 18 | cache: 19 | directories: 20 | - /tmp/jars 21 | - /tmp/texlive 22 | 23 | script: 24 | - ./build/run-restyle 25 | 26 | deploy: 27 | provider: pages 28 | skip-cleanup: true 29 | github-token: $ghtok # Set in the settings page of your repository, as a secure variable 30 | keep-history: true 31 | on: 32 | branch: gh-pages -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Math Working Group 2 | 3 | Contributions to this repository are intended to become part of Recommendation-track documents governed by the 4 | [W3C Patent Policy](https://www.w3.org/Consortium/Patent-Policy-20040205/) and 5 | [Document License](https://www.w3.org/Consortium/Legal/copyright-documents). To make substantive contributions to specifications, you must either participate 6 | in the relevant W3C Working Group or make a non-member patent licensing commitment. 7 | 8 | If you are not the sole contributor to a contribution (pull request), please identify all 9 | contributors in the pull request comment. 10 | 11 | To add a contributor (other than yourself, that's automatic), mark them one per line as follows: 12 | 13 | ``` 14 | +@github_username 15 | ``` 16 | 17 | If you added a contributor by mistake, you can remove them in a comment with: 18 | 19 | ``` 20 | -@github_username 21 | ``` 22 | 23 | If you are making a pull request on behalf of someone else but you had no part in designing the 24 | feature, you can remove yourself with the above syntax. 25 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | All documents in this Repository are licensed by contributors 2 | under the 3 | [W3C Document License](https://www.w3.org/Consortium/Legal/copyright-documents). 4 | 5 | -------------------------------------------------------------------------------- /README-old.md: -------------------------------------------------------------------------------- 1 | # mathml 2 | 3 | MathML4 editors' draft 4 | 5 | See https://w3c.github.io/mathml/ 6 | 7 | Note the issues list here covers mathml-core and other related drafts as well as MathML4. 8 | 9 | For a full list of MathML related drafts and repositories see 10 | https://mathml-refresh.github.io/ 11 | -------------------------------------------------------------------------------- /_layouts/cgreport.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | {% seo %} 10 | 11 | 22 | 23 | 26 | 39 | 40 | 41 |
42 |

{{page.title}}

45 |
46 | 47 |
48 | 49 | 50 | 51 | {{ content }} 52 | 53 | {% if site.github.private != true and site.github.license %} 54 | 57 | {% endif %} 58 |
59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {% seo %} 9 | 10 | 21 | 22 | 25 | 26 | 27 |
28 | 29 |

{{page.title}}

30 | 31 | 32 | {{ content }} 33 | 34 | {% if site.github.private != true and site.github.license %} 35 | 38 | {% endif %} 39 |
40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /historic-cvs-log.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/historic-cvs-log.txt -------------------------------------------------------------------------------- /image/actuarial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/actuarial.png -------------------------------------------------------------------------------- /image/alignat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/alignat.png -------------------------------------------------------------------------------- /image/bevelled1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/bevelled1.png -------------------------------------------------------------------------------- /image/braids.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/braids.png -------------------------------------------------------------------------------- /image/circlebox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/circlebox.png -------------------------------------------------------------------------------- /image/em-longdiv-arabic-lefttop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/em-longdiv-arabic-lefttop.png -------------------------------------------------------------------------------- /image/em-longdiv-colonrightright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/em-longdiv-colonrightright.png -------------------------------------------------------------------------------- /image/em-longdiv-french.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/em-longdiv-french.png -------------------------------------------------------------------------------- /image/em-longdiv-indian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/em-longdiv-indian.png -------------------------------------------------------------------------------- /image/em-longdiv-leftright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/em-longdiv-leftright.png -------------------------------------------------------------------------------- /image/em-longdiv-medium-stacked-rightright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/em-longdiv-medium-stacked-rightright.png -------------------------------------------------------------------------------- /image/em-longdiv-mirrored-french.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/em-longdiv-mirrored-french.png -------------------------------------------------------------------------------- /image/em-longdiv-righttop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/em-longdiv-righttop.png -------------------------------------------------------------------------------- /image/em-longdiv-short-stacked-rightright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/em-longdiv-short-stacked-rightright.png -------------------------------------------------------------------------------- /image/em-longdiv-us.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/em-longdiv-us.png -------------------------------------------------------------------------------- /image/em-mult-carries.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/em-mult-carries.png -------------------------------------------------------------------------------- /image/em-mult-simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/em-mult-simple.png -------------------------------------------------------------------------------- /image/em-plus-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/em-plus-right.png -------------------------------------------------------------------------------- /image/em-plus-shift.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/em-plus-shift.png -------------------------------------------------------------------------------- /image/em-plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/em-plus.png -------------------------------------------------------------------------------- /image/em-sub-borrow-above.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/em-sub-borrow-above.png -------------------------------------------------------------------------------- /image/em-sub-borrow-aboveleft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/em-sub-borrow-aboveleft.png -------------------------------------------------------------------------------- /image/em-sub-borrow-swedish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/em-sub-borrow-swedish.png -------------------------------------------------------------------------------- /image/emc2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/emc2.png -------------------------------------------------------------------------------- /image/f3001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/f3001.png -------------------------------------------------------------------------------- /image/f3002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/f3002.png -------------------------------------------------------------------------------- /image/intersect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/intersect.png -------------------------------------------------------------------------------- /image/intex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/intex.png -------------------------------------------------------------------------------- /image/linebreak-example1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/linebreak-example1.png -------------------------------------------------------------------------------- /image/madruwb12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/madruwb12.png -------------------------------------------------------------------------------- /image/mpadded-combined.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/mpadded-combined.png -------------------------------------------------------------------------------- /image/mpadded-resize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/mpadded-resize.png -------------------------------------------------------------------------------- /image/mpadded-shift.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/mpadded-shift.png -------------------------------------------------------------------------------- /image/mphantom-bad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/mphantom-bad.png -------------------------------------------------------------------------------- /image/mphantom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/mphantom.png -------------------------------------------------------------------------------- /image/phasorangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/phasorangle.png -------------------------------------------------------------------------------- /image/repeat1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/repeat1.png -------------------------------------------------------------------------------- /image/repeat2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/repeat2.png -------------------------------------------------------------------------------- /image/repeat3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/repeat3.png -------------------------------------------------------------------------------- /image/repeat4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/repeat4.png -------------------------------------------------------------------------------- /image/w3c_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/image/w3c_home.png -------------------------------------------------------------------------------- /sorttable.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w3c/mathml/2854a6f2c7c08602a1a1db62cb9e26811657abeb/sorttable.js -------------------------------------------------------------------------------- /spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Mathematical Markup Language (MathML) Version 4.0 6 | 10 | 18 | 19 | 33 | 162 | 181 | 278 | 281 | 393 | 394 | 395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 | 406 | 407 |
408 |

Parsing MathML

409 | 410 | 411 |

Issue 178

412 |

Issue 361

413 | 414 |
415 | 416 |
417 |

Using the RelaxNG Schema for MathML

418 | 419 |

MathML documents should be validated using the RelaxNG Schema for MathML, either in 420 | the XML encoding (http://www.w3.org/Math/RelaxNG/mathml4/mathml4.rng) 421 | or in compact notation (https://www.w3.org/Math/RelaxNG/mathml4/mathml4.rnc) 422 | which is also shown below.

423 | 424 |

In contrast to DTDs there is no in-document method to associate a RelaxNG schema with 425 | a document.

426 | 427 | 428 | 429 | 430 |
431 |

MathML Core

432 | 433 |

MathML Core is specified in [[[MathML-Core]]] however the Schema is developed alongside the schema for MathML 4 and presented here, it can also be found at https://www.w3.org/Math/RelaxNG/mathml4/mathml4-core.rnc.

434 |

435 | 
436 |     
437 | 438 |
439 |

Presentation MathML

440 | 441 |

The grammar for Presentation MathML 4 builds on the grammar for the MathML 442 | Core, and can be found at https://www.w3.org/Math/RelaxNG/mathml4/mathml4-presentation.rnc.

443 | 444 |

445 | 
446 |     
447 | 448 |
449 |

Strict Content MathML

450 | 451 |

The grammar for Strict Content MathML 4 can be found at https://www.w3.org/Math/RelaxNG/mathml4/mathml4-strict-content.rnc.

452 | 453 |

454 |     
455 | 456 | 457 |
458 |

Content MathML

459 | 460 |

The grammar for Content MathML 4 builds on the grammar for the Strict Content MathML 461 | subset, and can be found at https://www.w3.org/Math/RelaxNG/mathml4/mathml4-content.rnc.

462 | 463 |

464 | 
465 |     
466 | 467 |
468 |

Full MathML

469 | 470 |

The grammar for full MathML 4 is simply a merger of the above grammars, 471 | and can be found at https://www.w3.org/Math/RelaxNG/mathml4/mathml4.rnc.

472 | 473 |

474 | 
475 |     
476 | 477 | 478 |
479 |

Legacy MathML

480 | 481 |

Some elements and attributes that were deprecated in MathML 3 482 | are removed from MathML 4. This schema extends the full MathML 4 483 | schema, adding these constructs back, allowing validation of existing 484 | MathML documents. It can be found at https://www.w3.org/Math/RelaxNG/mathml4/mathml4-legacy.rnc.

486 | 487 |

488 | 
489 |     
490 | 491 |
492 | 493 |
494 |
495 |
496 | 497 | 498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 | 507 | 508 | 509 | 510 | -------------------------------------------------------------------------------- /src/abstract.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | This specification defines the Mathematical Markup Language, or 4 | MathML. MathML is a markup language 5 | for describing mathematical notation and capturing 6 | both its structure and content. The goal of MathML is to enable 7 | mathematics to be served, received, and processed on the World Wide 8 | Web, just as [[HTML]] has 9 | enabled this functionality for text. 10 |

11 |

12 | This specification of the markup language MathML is intended 13 | primarily for a readership consisting of those who will be 14 | developing or implementing renderers or editors using it, or 15 | software that will communicate using MathML as a protocol for input 16 | or output. It is not a User's Guide but rather a 17 | reference document. 18 |

19 |

20 | MathML can be used to encode both mathematical notation and 21 | mathematical content. About thirty-eight of the MathML tags describe 22 | abstract notational structures, while another about one hundred and 23 | seventy provide a way of unambiguously specifying the intended 24 | meaning of an expression. Additional chapters discuss how the MathML 25 | content and presentation elements interact, and how MathML renderers 26 | might be implemented and should interact with browsers. Finally, 27 | this document addresses the issue of special characters used for 28 | mathematics, their handling in MathML, their presence in Unicode, 29 | and their relation to fonts. 30 |

31 |

32 | While MathML is human-readable, authors typically will 33 | use equation editors, conversion 34 | programs, and other specialized software tools to generate 35 | MathML. Several versions of such MathML tools exist, 36 | both freely available software and commercial 37 | products, and more are under development.

38 |

MathML was originally specified as an XML application and most of the 39 | examples in this specification assume that syntax. Other syntaxes are possible, most 40 | notably 41 | [[HTML]] specifies the syntax for MathML in HTML. Unless explicitly noted, 42 | the examples in this specification are also valid HTML syntax. 43 |

44 |
45 | -------------------------------------------------------------------------------- /src/accessibility.html: -------------------------------------------------------------------------------- 1 |
2 |

MathML Accessibility

3 | 4 | 5 | 6 | 7 |
8 |

Introduction

9 | 10 |

As an essential element of the Open Web Platform, the W3C MathML 11 | specification has the unprecedented potential to enable content 12 | authors and developers to incorporate mathematical expressions on the 13 | web in such a way that the underlying structural and semantic 14 | information can be exposed to other technologies. Enabling this 15 | information exposure is foundational for accessibility, as well as 16 | providing a path for making digital mathematics content machine 17 | readable, searchable and reusable

18 | 19 |

The internationally accepted standards and underpinning principles 20 | for creating accessible digital content on the web can be found in the 21 | W3C's Web Content Accessibility Guidelines [[WCAG21]]. In extending 22 | these principles to digital content containing mathematical 23 | information, WCAG provides a useful framework for defining 24 | accessibility wherever MathML is used.

25 | 26 |

As the current WCAG guidelines provide no direct guidance on how to 27 | ensure mathematical content encoded as MathML will be accessible to 28 | users with disabilities, this specification defines how to apply these 29 | guidelines to digital content containing MathML.

30 | 31 |

A benefit of following these recommendations is that it helps to 32 | ensure that digital mathematics content meets the accessibility 33 | requirements already widely used around the world for web content. In 34 | addition, ensuring that digital mathematics materials are accessible 35 | will expand the readership of such content to both readers with and 36 | without disabilities.

37 | 38 |

Additional guidance on best practices will be developed over time 39 | in [[?MathML-Notes]]. Placing these in Notes allows them to adapt and 40 | evolve independent of the MathML specification, since accessibility 41 | practices often need more frequent updating. The Notes are also 42 | intended for use with past, present, and future versions of MathML, in 43 | addition to considerations for both the MathML-Core and the full 44 | MathML specification. The approach of a separate document ensures that 45 | the evolution of MathML does not lock accessibility best practices in 46 | time, and allows content authors to apply the most recent 47 | accessibility practices.

48 |
49 | 50 |
51 |

Accessibility benefits of using MathML

52 | 53 |

Many of the advances of mathematics in the modern world (i.e., 54 | since the late Renaissance) were arguably aided by the development of 55 | early symbolic notation which continues to be evolved in our present 56 | day. While simple literacy text can be used to state underlying 57 | mathematical concepts, symbolic notation provides a succinct method of 58 | representing abstract mathematical constructs in a portable manner 59 | which can be more easily consumed, manipulated and understood by 60 | humans and machines. Mathematics notation is itself a language 61 | intended for more than just visual rendering, inspection and 62 | manipulation, as it is also intended to express the underlying meaning 63 | of the author. These characteristics of mathematical notation have in 64 | turn a direct connection to mathematics accessibility.

65 | 66 |

Accessibility has been a purposeful consideration from the very 67 | beginning of the MathML specification, as alluded to in the 1998 68 | MathML 1.0 specification. This understanding is further reflected in 69 | the very first version of the Web Content Accessibility Guidelines 70 | (WCAG 1.0, W3C Recommendation 5-May-1999), which mentions the use of 71 | MathML as a suggested technique to comply with Checkpoint 3.1, "When 72 | an appropriate markup language exists, use markup rather than images 73 | to convey information," by including the example technique to "use 74 | MathML to mark up mathematical equations..." It is also worth noting, 75 | that under the discussion of WCAG 1.0 Guideline 3, "Use markup and 76 | style sheets and do so properly," that the editors have included the 77 | admonition that "content developers must not sacrifice appropriate 78 | markup because a certain browser or assistive technology does not 79 | process it correctly." Now some 20 years after the publication of the 80 | original WCAG recommendation, we still struggle with the fact that 81 | many content developers have been slow to adopt MathML due to those 82 | very reasons. However, with the publication of MathML 4.0, the 83 | accessibility community is hopeful of what the future will bring for 84 | widespread mathematics accessibility on the web.

85 | 86 |

Using MathML in digital content extends the potential to support a 87 | wide array of accessibility use cases. We discuss these below.

88 | 89 |

Auditory output. Technological means of providing dynamic 90 | text-to-speech output for mathematical expressions precedes the 91 | origins of MathML, and this use case has had an impact on shaping the 92 | MathML specification from the beginning. Beyond simply generating 93 | spoken text strings, the use of audio cues such as changes in spoken 94 | pitch to help provide an auditory analog of two-dimensional visual 95 | structure has been found useful. Other audio applications have 96 | included other types of audio cues such as binaural spatialization, 97 | earcons, and spearcons to help disambiguate mathematical expressions 98 | rendered by synthetic speech. MathML provides a level of robust 99 | information about the structure and syntax of mathematical expressions 100 | to enable these techniques. It is also important to note that the 101 | ability to create extensive sets of automated speech rules used by 102 | MathML-aware TTS tools provide for virtually infinite portability of 103 | math speech to the various human spoken languages (e.g., 104 | internationalization), as well as different styles of spoken math 105 | (e.g., ClearSpeak, MathSpeak, SimpleSpeak, etc.). In the future, this 106 | could provide even more types of speech rules, such as when an 107 | educational assessment needs to apply a more restrictive reading so as 108 | not to invalidate the testing construct, or when instructional content 109 | aimed at early learners needs to adopt the spoken style used in the 110 | classroom for young students.

111 | 112 |

Braille output. The tactile rendering of mathematical expressions 113 | in braille is a very important use case. For someone who is blind, 114 | interpreting mathematics through auditory rendering alone is a 115 | cognitive taxing experience except for the most basic expressions. And 116 | for a deafblind user, auditory renderings are completely 117 | inaccessible. Several math braille codes are in common use globally, 118 | such as the Nemeth braille code, UEB Technical, German braille 119 | mathematics code, French braille mathematics code, etc. Dynamic 120 | mathematics braille translators such as Liblouis support translation 121 | of MathML content on webpages for individuals who access the web via a 122 | refreshable braille display. Thus, using MathML is essential for 123 | providing dynamic braille content for mathematics.

124 | 125 |

Other forms of visual transformation. Synchronized highlighting is 126 | a common addition to text-to-speech intended for sighted 127 | users. Because MathML provides the ability to parse the underlying 128 | tree structure of expressions, individual elements of the expression 129 | can be visually highlighted as they are spoken. This enhances the 130 | ability of TTS users to stay engaged with the text reading, which can 131 | potentially increase comprehension and learning. Even for people 132 | visually reading without TTS, visual highlighting within expressions 133 | as one navigates a web page using caret browsing can be a useful 134 | accessibility feature which MathML can potentially support.

135 | 136 |

For individuals who are deaf or hard of hearing but are unable to 137 | use braille, mathematical equations rendered in MathML can potentially 138 | be turned into visually displayed text. Since research has shown that, 139 | especially among school-age children with reading impairments, the 140 | ability to understand symbolic notation occurring in mathematical 141 | expression is much more difficult than reading literary text, enabling 142 | this capability could be a useful access technique for this 143 | population.

144 | 145 |

Another potential accessibility scaffold which MathML could provide 146 | for individuals who are deaf or hard of hearing would be the ability 147 | to provide input to automated signing avatars. Automated signing 148 | avatar technology which generates American Sign Language has already 149 | been applied to elementary level mathematics add citation. Sign 150 | languages vary by county (and sometimes locality) and are not simply 151 | "word to sign" translations, as sign language has its own grammar, so 152 | being able to access the underlying tree structure of mathematical 153 | expressions as can be done with MathML will provide the potential for 154 | representing expressions in sign language from a digital document 155 | dynamically without having to use static prerecorded videos of human 156 | signers.

157 | 158 |

Graphing an equation is a commonly used means of generating a 159 | visual output which can aid in comprehending the effects and 160 | implications of the underlying mathematical expressions. This is 161 | helpful for all people, but can be especially impactful for those with 162 | cognitive or learning impairments. Some dynamic graphing utilities 163 | (e.g., Desmos and MathTrax) have extended this concept beyond a simple 164 | visual line trace, to auditory tracing (e.g., tones which rise and 165 | fall in pitch to provide an audio construct of the visual trace) as 166 | well as a dynamically generated text description of the visual 167 | graph. Using MathML in digital content will provide the potential for 168 | developers to apply such automated accessible graphing utilities to 169 | their websites.

170 | 171 |
172 | 173 | 174 |
175 |

Accessibility Guidance

176 | 177 |
178 |

User Agents

179 | 180 |
181 |
Accessibility tree
182 | 183 |

User agents (e.g., web browsers) should leverage information in the 184 | MathML expression tree structure to maximize accessibility. Browsers 185 | should process MathML into the DOM tree's internal representation, 186 | which contains objects representing all the markup's elements and 187 | attributes. In general, user agents will expose accessibility 188 | information via a platform accessibility service (e.g., an 189 | accessibility API), which is passed on to assistive technology 190 | applications via the accessibility tree. The accessibility tree should 191 | contain accessibility-related information for most MathML 192 | elements. Browsers should ensure the accessibility tree generated from 193 | the DOM tree retains this information so that Accessibility APIs can 194 | provide a representation that can be understood by assistive 195 | technologies. However, in compliance with the W3C User Agent 196 | Accessibility Guidelines Success Criterion 4.1.4, "If the user agent 197 | accessibility API does not provide sufficient information to one or 198 | more platform accessibility services, then Document Object Models 199 | (DOM), must be made programmatically available to assistive 200 | technologies" [[UAAG20]].

201 | 202 |

By ensuring that most MathML elements 203 | become nodes in the DOM tree, and the resulting accessibility tree, 204 | user agents can expose math nodes for keyboard navigation within 205 | expressions. This can support important user needs such as the ability 206 | to visually highlight elements of an expression and/or speak 207 | individual elements as one navigates with arrow keys. This can further 208 | support other forms of synchronous navigation, such as individuals 209 | using refreshable braille displays along with synthetic speech.

210 |

While it is common practice for the accessibility tree to ignore 211 | most DOM node elements that are primarily used for visual display 212 | purposes, it is important to point out that math expressions often use 213 | what appears as visual styling to convey information which can be 214 | important for some types of assistive technology applications. For 215 | example, omitting the <mspace> 216 | element from the accessibility tree will impact the ability to 217 | generate a valid math braille representation of expressions on a 218 | braille display. Further, when color is expressed in MathML with the 219 | mathcolor and mathbackground attributes, these elements 221 | need to be included if they are used to express meaning.

The 222 | alttext attribute can be used to 223 | override standard speech rule processing (e.g., as is often done in 224 | standardized assessments). However, there are numerous limitations to 225 | this method. For instance, the entire spoken text of the expression 226 | must be given in the tag, even if the author is only concerned about 227 | one small portion. Further, alttext is 228 | limited to plain text, so speech queues such as pausing and pitch 229 | changes cannot be included for passing on to speech engines. Also, the 230 | alttext attribute has no direct linkage 231 | to the MathML tree, so there will be no way to handle synchronized 232 | highlighting of the expression, nor will there be a way for users to 233 | navigate through an expression.

234 | 235 |

An early draft of [[[MathML-AAM]]] is 236 | available. This specification is intended for user agent developers 237 | responsible for MathML accessibility in their product. The goal of 238 | this specification is to maximize the accessibility of MathML content 239 | by ensuring each assistive technology receives MathML content with the 240 | roles, states, and properties it expects. The placing of ARIA labels 241 | and aria-labeledby is not appropriate in MathML because this will override 242 | braille generation.

243 |
244 | 245 |
246 | 247 |
248 | 249 | 250 |
251 |

Content Authors

252 | 253 |

This section considers how to use WCAG to establish requirements 254 | for accessible MathML content on the web, using the same four 255 | high-level content principles: that content should be perceivable, 256 | operable, understandable, and robust. Therefore, this section defines 257 | how to apply the conformance criteria defined in WCAG to address 258 | qualities unique to digital content containing MathML.

259 | 260 | 261 |
262 |

Overarching guidance

263 |
264 |
Always use markup
265 | 266 |

It is important that MathML be used for marking up all mathematics 267 | and linear chemical equation content. This precludes simply using 268 | ASCII characters or expression images in HTML (even if alt text is 269 | used). Even a single letter variable ideally should be marked up in 270 | MathML because it represents a mathematical expression. This way, 271 | audio, braille and visual renderings of the variable will be 272 | consistent throughout the page.

273 | 274 |
275 | 276 |
277 |
Use intent and arg attributes
278 | 279 |

MathML's intent and arg attributes has 280 | been developed to reduce notational ambiguity which cannot be reliably 281 | resolved by assistive technology. This also includes blanks and units, 282 | which are covered by the Intent attribute.

283 |
284 | 285 |
286 | 287 |
288 |

Specific Markup Guidance

289 | 290 | 291 | 292 |
293 |
Invisible Operators
294 | 295 |

Common use of mathematical notation employs several invisible 296 | operators whose symbols are not displayed but function as if the 297 | visible operator were present. These operators should be marked up in 298 | MathML to preserve their meaning as well as to prevent possible 299 | ambiguity for users of assistive technology.

300 | 301 |

Screen readers will not speak anything enclosed in an <mphantom> element; therefore, do not use 303 | <mphantom> in combination with an 304 | operator to create invisible operators.

305 | 306 |

Implicit Multiplication: The invisible times operator 307 | (&#x2062;) should be used to indicate multiplication whenever the 308 | multiplication operator is used tacitly in traditional notation.

309 | 310 |

Function Application: The "apply function" operator 311 | (&#x2061;) should be used to indicate function application.

312 | 313 | 314 |

Invisible Comma: The invisible comma or invisible 315 | separator operator (&#x2063;) should be used to semantically 316 | separate arguments or indices when commas are omitted.

317 | 318 |

Implicit Addition: In mixed fractions the invisible plus 319 | character (&#x2064;) should be used as an operator between the 320 | whole number and its fraction.

321 | 322 | 323 |
324 |
325 |
Proper Grouping of Sub-expressions
326 | 327 |

It is good practice to group sub-expressions as they would be 328 | interpreted mathematically. Properly grouping sub-expressions using 329 | <mrow> can improve display by affecting spacing, allows for more 330 | intelligent linebreaking and indentation, it can simplify semantic 331 | interpretation of presentation elements by screen readers and 332 | text-to-speech applications.

333 | 334 |
335 |
336 |
Spacing
337 | 338 |

In general, the spacing elements <mspace>, <mphantom>, 339 | and <mpadded> should not be used to convey meaning.

340 | 341 |
342 |
343 |
Numbers
344 | 345 |

All numeric quantities should be enclosed in an <mn> 346 | element. Digit group separators, such as commas, periods, or spaces, 347 | should also be included as part of the number and should not be 348 | treated as operators.

349 | 350 |
351 |
352 |
Superscripts and Subscripts
353 | 354 |

It is important to apply superscripts and subscripts to the 355 | appropriate element or sub-expression. It is not correct to apply a 356 | superscript or subscript to a closing parenthesis or any other 357 | grouping symbol. Important for navigation

358 | 359 |
360 |
361 |
Elementary Math Notation
362 | 363 |

Elementary notations have their own layout elements. For long 364 | division and stacked expressions use the proper elements such as <mlongdiv> and <mstack> instead of <mtable>.

368 | 369 |
370 |
371 |
Fill-in-the-Blanks
372 | 373 |

Blanks in a fill-in-the-blank style of question are often 374 | visualized by underlined spaces, empty circles, squares, or other 375 | symbols. To indicate a blank, use the intent and arg attributes.

376 | 377 |

In an interactive electronic environment where the user should fill 378 | the blank on the displayed page, JavaScript would typically be used to 379 | invoke an editor when the blank is clicked on. To facilitate this, an 380 | id should be added to the element to identify it for editing and 381 | eventual processing. Additionally, an onclick or similar event 382 | trigger should be added. The details depend upon the type of 383 | interaction desired, along with the specific JavaScript being used.

384 | 385 |
386 |
387 |
Tables and Lists
388 | 389 |

MathML provides built-in support for tables and equation numbering, 390 | which complements HTML functionality with lists and tables. In 391 | practice, it is not always clear which structural elements should be 392 | used. Ideally, a table (either HTML <table> or MathML 393 | <mtable>) should be used when information between aligned rows 394 | or columns are semantically related. In other cases, such as ordinary 395 | problem numbering or information presented in an ordered sequence, an 396 | HTML ordered list <ol>; is more appropriate.

397 | 398 |

Choosing between <table> and <mtable> may require some 399 | forethought in how best to meet the usability needs of the intended 400 | audience and purpose of the table content. HTML structural elements 401 | are advantageous because screen readers provide more robust table 402 | navigation, whereas the user may only "enter" or 403 | "exit" an <mtable> in a MathML island. However, the 404 | <mtable> element is useful because it can be tweaked easily for 405 | visual alignment without creating new table cells, which can improve 406 | reading flow for the user. However, <mtable> should still be 407 | used for matrices and other table-like math layouts.

408 | 409 |
410 | 411 |
412 |
Natural-language Mathematics
413 | 414 |

Instructional content for young learners may sometimes use the 415 | written form of math symbols. For example, the multiplication sign 416 | × might be written as times or multiplied 417 | by. Because times and multiplied by are ordinary 418 | words, speech engines will not have an issue reading them. However, 419 | in some cases, there may be a use-case for including these terms in 420 | MathML. For instance, the word times in x = 2 times a 421 | could be marked up as an operator by means of 422 | <mo>times</mo>.

423 | 424 | 425 |
426 | 427 |
428 |
Accessible Descriptions
429 | 430 |

It is sometimes beneficial to a reader to have additional, auxiliary information for a given 431 | mathematical construct. This is particularly the case in educational materials where 432 | newly introduced syntax benefits from repeated reinforcement. Such information is often 433 | too verbose for more familiar readers, indeed even to the same person after their first reading. 434 | Hence, common AT behavior has been to only vocalize an 435 | accessible description 436 | on user request, omitting it by default.

437 |

It is appropriate to provide such descriptions using the ARIA 1.3 attribute 438 | aria-description, 439 | which allows for a literal string value to annotate its host element. 440 | As an example, consider the minimal markup for the circumference formula, 441 | with each non-trivial component described. 442 |

443 | 444 |
445 |
446 | <mrow aria-description="circumference of a circle">
447 |   <mn>2</mn>
448 |   <mi aria-description="mathematical constant">π</mi>
449 |   <mi aria-description="radius variable">r</mi>
450 | </mrow>
451 | 
452 |
453 | 454 |

While aria-description has been used on its own for brevity, 455 | it is recommended to use it together with an intent annotation, 456 | as appropriate. 457 |

458 |

To ensure equal access, when aria-description 459 | or intent are used, 460 | useful descriptions should also be made visible on the page. 461 | A common affordance to achieve that is interactively displaying 462 | a tooltip containing the description. 463 |

464 |
465 |
466 |
467 |
468 | 469 | -------------------------------------------------------------------------------- /src/changes.html: -------------------------------------------------------------------------------- 1 |
2 |

Changes

3 | 4 |
5 |

Changes between MathML 3.0 Second Edition and MathML 4.0

6 | 7 |
8 |

Changes to the Frontmatter

9 |
    10 | 11 |
  • 12 | Changes to the references to match new W3C specification rules, 13 | and to use the new W3C CSS formatting style, most notably 14 | affecting the table of contents styling. 15 |
  • 16 | 17 |
  • 18 | Update the , in particular 19 | using https and referencing the GitHub Issues page 20 | as required for current W3C publications. 21 |
  • 22 |
23 |
24 | 25 |
26 |

Changes to

27 | 28 |
    29 | 30 |
  • 31 | Modified the definition of MathML color and length valued attributes to be 32 | explicitly based on the syntax used in [[MathML-Core]] which in 33 | turn uses definitions provided by CSS3. 34 |
  • 35 |
  • Remove the mode and macros attributes from <math>. These have been deprecated 38 | since MathML 2. macros had no 39 | defined behaviour, and mode can be 40 | replaced by suitable use of display. 41 | The `mathml4-legacy` schema makes these valid if needed for legacy applications.
  • 42 | 43 |
  • Remove the other attribute. 44 | This have been deprecated 45 | since MathML 2. 46 | The `mathml4-legacy` schema makes this valid if needed for legacy applications.
  • 47 | 48 |
49 |
50 | 51 |
52 |

Changes to

53 | 54 |
    55 | 56 |
  • Separate the examples 57 | in 58 | and to improve their appearance 59 | when rendered. 60 |
  • 61 | 62 |
  • Clarify that negative numbers should be marked up with an 63 | explicit mo operator 64 | in . 65 |
  • 66 | 67 |
  • Correct the long division notation names 68 | in . 69 |
  • 70 | 71 |
  • Clarify that the horizontal alignment of scripts 72 | in is towards the base, and 73 | add a new example. 74 |
  • 75 |
  • The deprecated MathML 1 attributes on token elements: `fontfamily`, 76 | `fontweight`, `fontstyle`,` fontsize`, `color` and `background` 77 | are removed in favor of mathvariant, mathsize, 79 | mathcolor and 80 | mathbackground. 81 | These attributes are also no longer valid on mstyle. 82 | The `mathml4-legacy` schema makes these valid if needed for legacy applications. 83 |
  • 84 |
  • All the deprecated font related attributes have been dropped from 85 | mglyph which is still retained to include images in MathML. 86 |
  • 87 |
  • The value `indentingnewline` is no longer valid for mspace (it was equivalent to `newline`). 89 |
  • 90 |
  • In MathML table rows and cells must be explicitly marked 91 | wih mtr and mtd. The [[?MathML1]] required that an 93 | implementation infer the row markup if it was omitted. 94 |
  • 95 |
  • The use of malignmark has been 96 | restricted and simplified, matching the features implemented in 97 | existing implementations. 98 | The groupalign attribute on table 99 | elements is no longer supported.
  • 100 |
  • The deprecated mo attributes, fence 101 | and separator, have been removed 102 | (and are also no longer listed as properties in ). 103 | They are still valid in the schema, 104 | but invalid in the default schema.
  • 105 |
  • The deprecated element none is 106 | replaced by an empty mrow throughout, 107 | to match [[MathML-Core]].
  • 108 |
  • The element mlabeledtr and the associated attributes 109 | side and minlabelspacing 110 | are no longer specified. They are removed from the default schema but valid in 111 | the Legacy Schema.
  • 112 | 113 |
  • To align with MathML-Core, the special extended syntax for mpadded length attributes 114 | ( "+" | "-" )? 115 | unsigned-number 116 | ( ("%" pseudo-unit?) 117 | | pseudo-unit 118 | | unit 119 | | namedspace 120 | )? is no longer supported. 121 | Most of the functionality is still available using standard CSS 122 | length syntax. See Note: mpadded 123 | lengths.
  • 124 |
125 | 126 |
127 | 128 | 129 |
130 |

Changes to

131 | 132 |
    133 | 134 |
  • Correct examples 135 | in , , , 136 | to use src (to match the normative 137 | schema) not href. The previous 138 | examples were also valid, as href 139 | is a common presentational attribute allowed on all elements. 140 |
  • 141 | 142 |
  • The Content element syntax tables and mapping to OpenMath have been 143 | moved from Chapter 4 to a new appendix, [[[#contm_ops]]].
  • 144 | 145 |
  • All Information relating to the rewrite to Strict Content 146 | MathML has been collected together and moved to a new appendix 147 | [[[#contm_p2s]]].
  • 148 | 149 |
  • The deprecated elements reln, 150 | declare and fn have been removed. 152 | The `mathml4-legacy` schema makes these valid if needed for legacy applications.
  • 153 |
154 |
155 | 156 | 157 |
158 |

Changes to

159 | 160 |
    161 |
  • Introduced new chapter [[[#mixing_intent]]] describing the 162 | intent attribute.
  • 163 |
164 |
165 | 166 |
167 |

Changes to

168 | 169 |
    170 | 171 |
  • Renamed Chapter from Mixing Markup Languages for Mathematical Expressions
  • 172 | 173 | 174 | 175 |
  • The existing text on using the <semantics> element to mix 177 | Presentation and Content MathML is maintained in the second 178 | section, although reduced with some non normative text and 179 | examples moved to [[?MathML-Notes]].
  • 180 | 181 |
  • MathML 3 deprecated the use of encoding and definitionURL on <semantics>. They are invalid in this 185 | specification. The `mathml4-legacy` schema may be used if these 186 | attributes need to be validated for a legacy application.
  • 187 |
188 | 189 | 190 |
191 | 192 |
193 |

Changes to

194 | 195 |
    196 |
  • Some rewriting of the text and adjusting references as the 197 | Media type registrations have been moved from an Appendix of this 198 | specification to a separate document, [[MathML-Media-Types]].
  • 199 |
200 |
201 | 202 |
203 |

Changes to Media Types

204 | 205 |
    206 |
  • Media type registrations have been moved from an Appendix of this 207 | specification to a separate document, [[MathML-Media-Types]].
  • 208 |
209 |
210 | 211 | 212 | 213 |
214 |

Changes to

215 | 216 |
    217 |
  • The schema was updated to match MathML4
  • 218 |
  • The schema was refactored with a new `mathml4-core` schema 219 | matching [[MathML-Core]] being used as the basis for 220 | `mathml4-presentation`, and a new `mathml4-legacy` schema that can 221 | be used to validate an existing corpus of documents matching [[?MathML3]].
  • 222 |
223 | 224 |
225 | 226 | 227 |
228 |

Changes to

229 | 230 |
    231 |
  • The spacing values and priorities of the elements were reviewed and adjusted.
  • 232 |
  • A new compact presentation is provided as well as the 233 | tabular presentation used previously.
  • 234 | 235 |
  • The underlying data files were updated to Unicode 14/15/16.
  • 236 |
237 | 238 | 239 |
240 | 241 | 242 |
243 |

Changes to

244 | 245 |
    246 |
  • This new appendix collects together requirements and issues 247 | related to accessibility.
  • 248 |
249 | 250 |
251 | 252 |
253 |

Changes to and

254 | 255 |
    256 |
  • These new appendices collect together the syntax tables, mappings to OpenMath and rewrite rules that were 257 | previously distributed throughout [[[#contm]]].
  • 258 |
259 | 260 |
261 | 262 | 263 |
264 | 265 |
266 | -------------------------------------------------------------------------------- /src/character-set.html: -------------------------------------------------------------------------------- 1 |
2 |

Characters, Entities and Fonts

3 |
4 |
5 |

Introduction

6 | 7 | 8 |

This chapter contains discussion of 9 | characters for use within MathML, recommendations for their use, 10 | and warnings concerning the correct form of the 11 | corresponding code points given in the Universal Multiple-Octet Coded Character 12 | Set (UCS) ISO-10646 as codified in Unicode [[Unicode]].

13 |
14 | 15 |
16 |

Mathematical Alphanumeric Symbols

17 | 18 |

19 | Additional Mathematical Alphanumeric Symbols 20 | were provided in Unicode 3.1. 21 | As discussed in , MathML offers an 22 | alternative mechanism to specify mathematical alphanumeric characters. 23 | Namely, one uses the mathvariant attribute on a token element 24 | such as mi to indicate that the character data in the token 25 | element selects a mathematical alphanumeric symbol. 26 |

27 | 28 | 29 |

30 | An important use of the mathematical alphanumeric symbols in Plane 1 31 | is for identifiers normally printed in special mathematical fonts, 32 | such as Fraktur, Greek, Boldface, or Script. As another example, 33 | the Mathematical Fraktur alphabet runs from U+1D504 ("A") to U+1D537 ("z"). 34 | Thus, an identifier for a variable that uses Fraktur characters could 35 | be marked up as 36 |

37 | 38 |
39 |
 40 |      <mi>&#x1D504;<!--BLACK-LETTER CAPITAL A--></mi>
 41 |     
42 |
43 | An alternative, equivalent markup for this example is to use the 44 | common upper-case A, modified by using the mathvariant attribute: 45 | 46 |
47 |
 48 |      <mi mathvariant="fraktur">A</mi>
 49 |     
50 |
51 | 52 | 53 |

54 | A MathML processor must treat a mathematical alphanumeric character 55 | (when it appears) as identical to the corresponding combination of 56 | the unstyled character and mathvariant attribute value. 57 |

58 | 59 |

60 | It is intended that renderers distinguish at least those combinations 61 | that have equivalent Unicode code points, and renderers are free to 62 | ignore those combinations that have no assigned Unicode code point 63 | or for which adequate font support is unavailable. 64 |

65 | 66 |
67 | 68 |
69 |

Non-Marking Characters

70 | 71 |

72 | Some characters, although important for the quality of print or 73 | alternative rendering, do not have glyph marks that correspond 74 | directly to them. They are called here non-marking characters. 75 | Their roles are 76 | discussed in and .

77 | 78 |

In MathML, control of page composition, such as line-breaking, is 79 | effected by the use of the proper attributes on the mo and mspace elements.

80 | 81 |

The characters below are not simple spacers. They are 82 | especially important new additions to the UCS because they provide 83 | textual clues which can increase the quality of print rendering, 84 | permit correct audio rendering, and allow the unique recovery of 85 | mathematical semantics from text which is visually ambiguous. 86 |

87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 107 | 108 | 109 | 110 | 111 | 112 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 127 | 128 | 129 |
Unicode code pointUnicode nameDescription
U+2061FUNCTION APPLICATIONcharacter showing function application in presentation tagging 106 | ()
U+2062INVISIBLE TIMESmarks multiplication when it is understood without a mark 113 | ()
U+2063INVISIBLE SEPARATORused as a separator, e.g., in indices ()
U+2064INVISIBLE PLUSmarks addition, especially in constructs such as 1½ 126 | ()
130 | 131 |
132 | 133 |
134 |

Anomalous Mathematical Characters

135 | 136 |

Some characters which occur fairly often in mathematical texts, and 137 | have special significance there, are frequently confused with other 138 | similar characters in the UCS. In some cases, common keyboard 139 | characters have become entrenched as alternatives to the more appropriate 140 | mathematical characters. In others, characters have legitimate uses in 141 | both formulas and text, but conflicting rendering and font 142 | conventions. All these characters are called here anomalous 143 | characters.

144 | 145 |
146 |

Keyboard Characters

147 | 148 |

Typical Latin-1-based keyboards contain several characters that 149 | are visually similar to important mathematical characters. 150 | Consequently, these characters are frequently substituted, 151 | intentionally or unintentionally, for their more correct mathematical 152 | counterparts.

153 | 154 |
155 |
Minus
156 | 157 |

The most common ordinary text character which enjoys a special 158 | mathematical use is U+002D [HYPHEN-MINUS]. As its Unicode name 159 | suggests, it is used as a hyphen in prose contexts, and as a minus 160 | or negative sign in formulas. 161 | For text use, there is a specific code point U+2010 [HYPHEN] which is 162 | intended for prose contexts, and which should render as a hyphen or 163 | short dash. 164 | For mathematical use, there is another code point U+2212 [MINUS SIGN] 165 | which is intended for mathematical formulas, and which should render 166 | as a longer minus or negative sign. 167 | MathML renderers should treat U+002D [HYPHEN-MINUS] as equivalent to 168 | U+2212 [MINUS SIGN] in formula contexts such as mo, and as 169 | equivalent to U+2010 [HYPHEN] in text contexts such as mtext. 170 |

171 | 172 |
173 | 174 |
175 |
Apostrophes, Quotes and Primes
176 | 177 |

On a typical European keyboard there is a key available which is 178 | viewed as an apostrophe or a single quotation mark (an upright or 179 | right quotation mark). Thus one key is doing double duty for prose 180 | input to enter U+0027 [APOSTROPHE] and U+2019 [RIGHT SINGLE QUOTATION 181 | MARK]. In mathematical contexts it is also commonly used for the 182 | prime, which should be U+2032 [PRIME]. Unicode recognizes the 183 | overloading of this symbol and remarks that it can also signify the 184 | units of minutes or feet. In the unstructured printed text of normal 185 | prose the characters are placed next to one another. The U+0027 186 | [APOSTROPHE] and U+2019 [RIGHT SINGLE QUOTATION MARK] are marked with 187 | glyphs that are small and raised with respect to the center line of 188 | the text. The fonts used provide small raised glyphs in the 189 | appropriate places indexed by the Unicode codes. The U+2032 [PRIME] 190 | of mathematics is similarly treated in fuller Unicode fonts. 191 |

192 | 193 |

MathML renderers are encouraged to treat U+0027 194 | [APOSTROPHE] as U+2032 [PRIME] when appropriate in 195 | formula contexts.

196 | 197 |

A final remark is that a ‘prime’ is often used in 198 | transliteration of the Cyrillic character U+044C [CYRILLIC SMALL 199 | LETTER SOFT SIGN]. This different use of primes is not part of 200 | considerations for mathematical formulas. 201 |

202 | 203 |
204 | 205 |
206 |
Other Keyboard Substitutions
207 | 208 |

While the minus and prime characters are the most common and 209 | important keyboard characters with more precise mathematical 210 | counterparts, there are a number of other keyboard character 211 | substitutions that are sometimes used. For example some may expect

212 | 213 |
214 |
<mo>''</mo>
215 |
216 |

to be treated as 217 | U+2033 [DOUBLE PRIME], and analogous substitutions could perhaps be made for U+2034 218 | [TRIPLE PRIME] and U+2057 [QUADRUPLE PRIME]. Similarly, sometimes U+007C [VERTICAL 219 | 220 | LINE] is used for U+2223 [DIVIDES]. MathML regards these as 221 | application-specific authoring conventions, and recommends that 222 | authoring tools generate markup using the more precise mathematical 223 | characters for better interoperability. 224 |

225 | 226 |
227 | 228 |
229 | 230 |
231 |

Pseudo-scripts

232 | 233 |

There are a number of characters in the UCS that traditionally have 234 | been taken to have a natural ‘script’ aspect. The 235 | visual presentation of these characters is similar to a script, that 236 | is, raised from the baseline, and smaller than the base font size. The 237 | degree symbol and prime characters are examples. For use in text, such 238 | characters occur in sequence with the identifier they follow, and are 239 | typically rendered using the same font. These characters are called 240 | pseudo-scripts here.

241 | 242 |

In almost all mathematical contexts, pseudo-script characters should 243 | be associated 244 | with a base expression using explicit script markup in MathML. For 245 | example, the preferred encoding of x prime is

246 | 247 |
248 |
<msup><mi>x</mi><mo>&#x2032;<!--PRIME--></mo></msup>
249 |
250 | 251 |

and not

252 | 253 |
254 |
<mi>x'</mi>
255 |
256 | 257 |

or any other variants not using an explicit script construct. Note, however, that 258 | within 259 | text contexts such as mtext, pseudo-scripts may be used in sequence with other character data.

260 | 261 |

There are two reasons why explicit markup is preferable in 262 | mathematical contexts. First, a problem arises with typesetting, when 263 | pseudo-scripts are used with subscripted identifiers. Traditionally, 264 | subscripting of x' would be rendered stacked under the prime. This is 265 | easily accomplished with script markup, for example:

266 | 267 |
268 |
<mrow><msubsup><mi>x</mi><mn>0</mn><mo>&#x2032;<!--PRIME--></mo></msubsup></mrow>
269 |
270 | 271 |

By contrast,

272 | 273 |
274 |
<mrow><msub><mi>x'</mi><mn>0</mn></msub></mrow>
275 |
276 |

will render with staggered scripts.

277 | 278 |

Note this means that a renderer of MathML will have to treat 279 | pseudo-scripts differently from most other character codes it finds in 280 | a superscript position; in most fonts, the glyphs for pseudo-scripts 281 | are already shrunk and raised from the baseline. 282 |

283 | 284 |

The second reason that explicit script markup is preferrable to 285 | juxtaposition of characters is that it generally better reflects the 286 | intended mathematical structure. For example,

287 | 288 |
289 |
290 |     <msup>
291 |       <mrow><mo>(</mo><mrow><mi>f</mi><mo>+</mo><mi>g</mi></mrow><mo>)</mo></mrow>
292 |       <mo>&#x2032;<!--PRIME--></mo>
293 |     </msup>
294 |
295 |

accurately reflects that the prime here is operating on an entire 296 | expression, and does not suggest that the prime is acting on the final right parenthesis. 297 |

298 | 299 |

However, the data model for all MathML token elements is Unicode text, 300 | so one cannot rule out the possibility of valid MathML markup 301 | containing constructions such as

302 | 303 |
304 |
<mrow><mi>x'</mi></mrow>
305 |
306 |

and

307 | 308 |
309 |
<mrow><mi>x</mi><mo>'</mo></mrow>
310 |
311 | 312 |

While the first form may, in some rare situations, legitimately be used 313 | to distinguish a multi-character identifer named x' from the 314 | derivative of a function x, such forms should generally be avoided. 315 | Authoring and validation tools are encouraged to generate the 316 | recommended script markup:

317 | 318 |
319 |
<mrow><msup><mi>x</mi><mo>&#x2032;<!--PRIME--></mo></msup></mrow>
320 |
321 | 322 | 323 |

The U+2032 [PRIME] character is perhaps the most common 324 | pseudo-script, but there are many others, as listed below:

325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 |
Pseudo-script Characters
U+0022QUOTATION MARK
U+0027APOSTROPHE
U+002AASTERISK
U+0060GRAVE ACCENT
U+00AAFEMININE ORDINAL INDICATOR
U+00B0DEGREE SIGN
U+00B2SUPERSCRIPT TWO
U+00B3SUPERSCRIPT THREE
U+00B4ACUTE ACCENT
U+00B9SUPERSCRIPT ONE
U+00BAMASCULINE ORDINAL INDICATOR
U+2018LEFT SINGLE QUOTATION MARK
U+2019RIGHT SINGLE QUOTATION MARK
U+201ASINGLE LOW-9 QUOTATION MARK
U+201BSINGLE HIGH-REVERSED-9 QUOTATION MARK
U+201CLEFT DOUBLE QUOTATION MARK
U+201DRIGHT DOUBLE QUOTATION MARK
U+201EDOUBLE LOW-9 QUOTATION MARK
U+201FDOUBLE HIGH-REVERSED-9 QUOTATION MARK
U+2032PRIME
U+2033DOUBLE PRIME
U+2034TRIPLE PRIME
U+2035REVERSED PRIME
U+2036REVERSED DOUBLE PRIME
U+2037REVERSED TRIPLE PRIME
U+2057QUADRUPLE PRIME
468 | 469 | 470 |

471 | In addition, the characters in the Unicode Superscript and Subscript block 472 | (beginning at U+2070) should be treated as pseudo-scripts when they 473 | appear in mathematical formulas. 474 |

475 | 476 |

Note that several of these characters are common on keyboards, 477 | including U+002A [ASTERISK], U+00B0 [DEGREE SIGN], U+2033 [DOUBLE PRIME], 478 | and U+2035 [REVERSED PRIME] also known as a back prime. 479 |

480 | 481 |
482 | 483 |
484 |

Combining Characters

485 | 486 |

In the UCS there are many combining characters that are intended 487 | to be used for the many accents of numerous different natural 488 | languages. Some of them may seem to provide markup needed for 489 | mathematical accents. They should not be used in mathematical markup. 490 | Superscript, subscript, underscript, and overscript constructions as 491 | just discussed above 492 | should be used for this purpose. Of course, combining 493 | characters may be used in multi-character identifiers as they are 494 | needed, or in text contexts. 495 |

496 | 497 |

498 | There is one more case where combining characters turn up naturally 499 | in mathematical markup. Some relations have associated negations, 500 | such as U+226F [NOT GREATER-THAN] for the negation of 501 | U+003E [GREATER-THAN SIGN]. The glyph for U+226F [NOT GREATER-THAN] 502 | is usually just that for U+003E [GREATER-THAN SIGN] with a slash through 503 | it. Thus it could also be expressed by U+003E-0338 making use of 504 | the combining slash U+0338 [COMBINING LONG SOLIDUS OVERLAY]. 505 | That is true of 25 other characters in common enough mathematical use 506 | to merit their own Unicode code points. In the other direction there are 507 | 31 character entity names listed in [[Entities]] which 508 | are to be expressed using U+0338 [COMBINING LONG SOLIDUS OVERLAY]. 509 |

510 | 511 |

In a similar way there are mathematical characters which have negations 512 | given by a vertical bar overlay U+20D2 [COMBINING LONG VERTICAL LINE OVERLAY]. 513 | Some are available in pre-composed forms, and some named character entities 514 | are given explicitly as combinations. In addition there are examples 515 | using U+0333 [COMBINING DOUBLE LOW LINE] and 516 | U+20E5 [COMBINING REVERSE SOLIDUS OVERLAY], and variants specified 517 | by use of the U+FE00 [VARIATION SELECTOR-1]. For fuller listing of 518 | these cases see the listings in [[Entities]]. 519 |

520 | 521 |

The general rule is that a base character followed by a string of 522 | combining characters should be treated just as though it were the 523 | pre-composed character that results from the combination, 524 | if such a character exists. 525 |

526 | 527 |
528 | 529 |
530 | 531 |
532 | -------------------------------------------------------------------------------- /src/conformance.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |

Information nowadays is commonly 5 | generated, processed and rendered by 6 | software tools. The exponential growth of the Web is fueling the 7 | development of advanced systems for automatically searching, 8 | categorizing, and interconnecting information. 9 | In addition, there are increasing numbers of 10 | Web services, some of which offer technically based materials 11 | and activities. Thus, although MathML 12 | can be written by hand and read by humans, 13 | whether machine-aided or just with much concentration, 14 | the future of MathML is 15 | largely tied to the ability to process it with software tools.

16 | 17 |

There are many different kinds of MathML 18 | processors: editors for authoring MathML expressions, translators for 19 | converting to and from other encodings, validators for checking MathML 20 | expressions, computation engines that evaluate, manipulate, or compare 21 | MathML expressions, and rendering engines that produce visual, aural, 22 | or tactile representations of mathematical notation. What it 23 | means to support MathML varies widely between applications. For 24 | example, the issues that arise with a validating 25 | parser are very different from those for an equation 26 | editor.

27 | 28 |

This section gives guidelines that describe different types 29 | of MathML support and make clear the extent of MathML support in 30 | a given application. Developers, users, and reviewers are encouraged 31 | to use these guidelines in characterizing products. The intention 32 | behind these guidelines is to facilitate reuse by 33 | and interoperability 34 | of MathML applications by accurately setting out their 35 | capabilities in quantifiable terms.

36 | 37 |

The W3C Math Working Group maintains MathML Compliance 38 | Guidelines. Consult this document for future updates on 39 | conformance activities and resources. 40 |

41 | 42 |
43 |

MathML Conformance

44 | 45 |

A valid MathML expression is an XML construct determined by the MathML 46 | RelaxNG Schema together with the additional requirements given in this specification.

47 | 48 |

We shall use the phrase “a MathML processor” 49 | to mean any application that 50 | can accept or produce a valid MathML 51 | expression. A MathML processor that both accepts and produces valid 52 | MathML expressions may be able to “round-trip” MathML. 53 | Perhaps the simplest example of an 54 | application that might round-trip a MathML 55 | expression would be an editor that writes it to a new file without 56 | modifications.

57 | 58 |

Three forms of MathML conformance are specified: 59 |

60 |
    61 | 62 |
  1. 63 |

    A MathML-input-conformant processor must 64 | accept all valid MathML expressions; it should appropriately translate all 65 | MathML expressions into application-specific form allowing native 66 | application operations to be performed.

    67 |
  2. 68 | 69 |
  3. 70 |

    A MathML-output-conformant processor must 71 | generate valid MathML, appropriately representing all 72 | application-specific data.

    73 |
  4. 74 | 75 |
  5. 76 |

    A MathML-round-trip-conformant processor must 77 | preserve MathML equivalence. Two MathML expressions are 78 | “equivalent” if and only if both expressions have the 79 | same interpretation (as stated by the MathML 80 | Schema and specification) 81 | under any relevant circumstances, by any MathML processor. Equivalence on an 82 | element-by-element basis is discussed elsewhere in this document.

    83 | 84 |
  6. 85 |
86 | 87 |

Beyond the above definitions, the MathML specification makes no 88 | demands of individual processors. In order to guide developers, the 89 | MathML specification includes advisory material; for example, there 90 | are many recommended rendering rules throughout . 91 | However, in general, developers are given wide latitude to 92 | interpret what kind of MathML implementation is meaningful for 93 | their own particular application.

94 | 95 |

To clarify the difference between conformance and 96 | interpretation of what is meaningful, consider some examples: 97 |

98 |
    99 |
  1. 100 |

    In order 101 | to be MathML-input-conformant, a 102 | validating parser needs only to accept expressions, and return 103 | “true” for expressions that are valid MathML. In 104 | particular, it need not render or interpret the MathML expressions at 105 | all.

    106 |
  2. 107 | 108 |
  3. 109 |

    A MathML computer-algebra interface based on content markup 110 | might choose to ignore all presentation markup. Provided the interface 111 | accepts all valid MathML expressions including those containing 112 | presentation markup, it would be technically correct to characterize 113 | the application as MathML-input-conformant.

    114 |
  4. 115 | 116 |
  5. 117 |

    An equation editor might have an internal data representation 118 | that makes it easy to export some equations as MathML but not 119 | others. If the editor exports the simple equations as valid MathML, 120 | and merely displays an error message to the effect that conversion 121 | failed for the others, it is still technically 122 | MathML-output-conformant.

123 | 124 |
125 |
MathML Test Suite and Validator
126 | 127 |

As the previous examples show, to be useful, the concept of MathML 128 | conformance frequently involves a judgment about what parts of the 129 | language are meaningfully implemented, as opposed to parts that are 130 | merely processed in a technically correct way with respect to the 131 | definitions of conformance. This requires some mechanism for giving a 132 | quantitative statement about which parts of MathML are meaningfully 133 | implemented by a given application. To this end, the W3C Math Working 134 | Group has provided a test 135 | suite.

136 | 137 |

The test suite consists of a large number of MathML expressions 138 | categorized by markup category and dominant MathML element being 139 | tested. The existence of this test suite makes it possible, for example, 140 | to characterize quantitatively the hypothetical computer algebra interface 141 | mentioned above by saying that it is a MathML-input-conformant processor 142 | which meaningfully implements MathML content markup, including all of 143 | the expressions in the content markup section of the test suite.

144 | 145 |

Developers who choose not to implement parts of the MathML 146 | specification in a meaningful way are encouraged to itemize the parts 147 | they leave out by referring to specific categories in the test suite.

148 | 149 |

For MathML-output-conformant processors, information about currently 150 | available tools to validate MathML is 151 | maintained at the W3C MathML Validator. 152 | Developers of MathML-output-conformant processors are encouraged to verify 153 | their output using this 154 | validator.

155 | 156 |

Customers of MathML applications who wish to verify claims as to which 157 | parts of the MathML specification are implemented by an application are 158 | encouraged to use the test suites as a part of their decision 159 | processes.

160 |
161 | 162 |
163 |
Deprecated MathML 1.x and MathML 2.x Features
164 | 165 |

MathML 4.0 contains a number of features of earlier MathML 166 | which are now deprecated. The following points define what it means for a 167 | feature to be deprecated, and clarify the relation between 168 | deprecated features and current MathML conformance.

169 | 170 |
    171 | 172 |
  1. 173 |

    In order to be MathML-output-conformant, authoring tools may not 174 | generate MathML markup containing deprecated features.

    175 |
  2. 176 | 177 |
  3. 178 |

    In order to be MathML-input-conformant, rendering and reading 179 | tools must support deprecated features if they are to be 180 | in conformance with MathML 1.x or MathML 2.x. They do not have to support deprecated 181 | features to be considered in conformance with MathML 4.0. However, all tools 182 | are encouraged to support the old forms as much as 183 | possible.

    184 |
  4. 185 | 186 |
  5. 187 |

    In order to be MathML-round-trip-conformant, a processor need 188 | only preserve MathML equivalence on expressions containing no 189 | deprecated features.

    190 |
  6. 191 |
192 | 193 |
194 | 195 |
196 |
MathML 197 | Extension Mechanisms and Conformance
198 | 199 |

MathML 4.0 defines three basic extension mechanisms: the mglyph 200 | element provides a way of displaying glyphs for non-Unicode 201 | characters, and glyph variants for existing Unicode characters; the 202 | maction element uses attributes from other namespaces to obtain 203 | implementation-specific parameters; and content markup makes use of 204 | the definitionURL attribute, as well as 205 | Content Dictionaries and the cd attribute, to point to external 206 | definitions of mathematical semantics.

207 | 208 |

These extension mechanisms are important because they provide a way 209 | of encoding concepts that are beyond the scope of MathML 4.0 as presently 210 | explicitly specified, which 211 | allows MathML to be used for exploring new ideas not yet susceptible 212 | to standardization. However, as new ideas take hold, they may become 213 | part of future standards. For example, an emerging character that 214 | must be represented by an mglyph element today may be 215 | assigned a Unicode code point in the future. At that time, 216 | representing the character directly by its Unicode code point would be 217 | preferable. This transition into Unicode has 218 | already taken place for hundreds of characters used for mathematics.

219 | 220 |

Because the possibility of future obsolescence is inherent in the 221 | use of extension mechanisms to facilitate the discussion of new ideas, 222 | MathML can reasonably make 223 | no conformance requirements concerning the use of 224 | extension mechanisms, even when alternative standard markup is 225 | available. For example, using an mglyph element to represent 226 | an 'x' is permitted. However, authors and implementers are 227 | strongly encouraged to use standard markup whenever possible. 228 | Similarly, maintainers of documents employing MathML 4.0 extension 229 | mechanisms are encouraged to monitor relevant standards activity 230 | (e.g., Unicode, OpenMath, etc.) and to update documents as more 231 | standardized markup becomes available.

232 |
233 |
234 | 235 |
236 |

Handling of Errors

237 | 238 |

If a MathML-input-conformant application receives 239 | input containing one or more elements with an illegal number or type 240 | of attributes or child schemata, it should nonetheless attempt to 241 | render all the input in an intelligible way, i.e., to render normally 242 | those parts of the input that were valid, and to render error messages 243 | (rendered as if enclosed in an merror element) in place of 244 | invalid expressions.

245 | 246 |

MathML-output-conformant applications such as 247 | editors and translators may choose to generate merror 248 | expressions to signal errors in their input. This is usually 249 | preferable to generating valid, but possibly erroneous, MathML.

250 |
251 | 252 |
253 |

Attributes for unspecified data

254 | 255 |

The MathML attributes described in the MathML specification are 256 | intended to allow for good presentation and content markup. However 257 | it is never possible to cover all users' needs for markup. Ideally, the MathML 258 | attributes should be an open-ended list so that users can add specific 259 | attributes for specific renderers. However, this cannot be done within 260 | the confines of a single XML DTD or in a Schema. 261 | Although it can be done using extensions of the standard DTD, say, 262 | some authors will wish to use non-standard 263 | attributes to take advantage of renderer-specific capabilities while 264 | remaining strictly in conformance with the standard 265 | DTD.

266 | 267 |

To allow this, the MathML 1.0 specification [[[?MathML1]]] 268 | allowed the attribute other on all elements, for use as a hook to pass 269 | on renderer-specific information. In particular, it was intended as a hook for 270 | passing information to audio renderers, computer algebra systems, and for pattern 271 | matching in future macro/extension mechanisms. The motivation for this approach to 272 | the problem was historical, looking to PostScript, for example, where comments are 273 | widely used to pass information that is not part of PostScript.

274 | 275 |

In the next period of evolution of MathML the 276 | development of a general XML namespace mechanism 277 | seemed to make the use of the other 278 | attribute obsolete. In MathML 2.0, the other attribute is 279 | deprecated in favor of the use of 280 | namespace prefixes to identify non-MathML attributes. The 281 | other attribute has been removed in MathML 4.0. although it 282 | is still valid (with no defined behavior) in the mathml4-legacy schema.

283 | 284 |

For example, in MathML 1.0, it was recommended that if additional information 285 | was used in a renderer-specific implementation for the maction element 286 | (), 287 | that information should be passed in using the other attribute:

288 | 289 |
290 |
291 |       <maction actiontype="highlight" other="color='#ff0000'"> expression </maction>
292 |     
293 |
294 | 295 |

From MathML 4.0 onwards, a data-* 296 | attribute could be used:

297 | 298 |
299 |
300 |       <body>
301 |         ...
302 |         <maction actiontype="highlight" data-color="#ff0000"> expression </maction>
303 |         ...
304 |       </body>
305 |     
306 |
307 | 308 |

Note that the intent of allowing non-standard attributes is 309 | not to encourage software developers to use this as a 310 | loophole for circumventing the core conventions for MathML markup. 311 | Authors and applications should use non-standard attributes 312 | judiciously.

313 | 314 |
315 | 316 | 317 |
318 |

Privacy Considerations

319 |

Web platform implementations of MathML should implement [[MathML-Core]], 320 | and so the Privacy Considerations specified there apply.

321 |
322 | 323 | 324 |
325 |

Security Considerations

326 |

Web platform implementations of MathML should implement [[MathML-Core]], 327 | and so the Security Considerations specified there apply.

328 |

In some situations, MathML expressions can be parsed as XML. The security considerations of XML parsing apply then as explained in [[?RFC7303]].

329 |
330 | 331 | 332 |
333 | -------------------------------------------------------------------------------- /src/contributors.html: -------------------------------------------------------------------------------- 1 |
2 |

Working Group Membership and Acknowledgments

3 | 4 |
5 |

The Math Working Group Membership

6 | 7 |

The current Math Working Group is chartered from April 2021, 8 | until May 2023 and is co-chaired by Neil Soiffer and Brian Kardell 9 | (Igalia).

10 | 11 |

Between 2019 and 2021 the W3C MathML-Refresh Community Group was chaired by Neil Soiffer and 12 | developed the initial proposal for MathML Core and requirements for MathML 4.

13 | 14 |

15 | The W3C Math Working Group responsible for MathML 3 (2012–2013) was co-chaired by 16 | David Carlisle of NAG and Patrick Ion of the AMS; Patrick Ion and Robert 17 | Miner of Design Science were co-chairs 2006-2011. 18 | Contact the co-chairs about membership in 19 | the Working Group. For the current membership see the 20 | W3C Math home page. 21 |

22 | 23 |

Robert Miner, whose leadership and contributions were essential 24 | to the development of the Math Working Group and MathML from their 25 | beginnings, died tragically young in December 2011.

26 | 27 |

Participants in the Working Group responsible for MathML 3.0 have been: 28 |

29 | 30 |
31 | Ron Ausbrooks, 32 | Laurent Bernardin, 33 | Pierre-Yves Bertholet, 34 | Bert Bos, 35 | Mike Brenner, 36 | Olga Caprotti, 37 | David Carlisle, 38 | Giorgi Chavchanidze, 39 | Ananth Coorg, 40 | Stéphane Dalmas, 41 | Stan Devitt, 42 | Sam Dooley, 43 | Margaret Hinchcliffe, 44 | Patrick Ion, 45 | Michael Kohlhase, 46 | Azzeddine Lazrek, 47 | Dennis Leas, 48 | Paul Libbrecht, 49 | Manolis Mavrikis, 50 | Bruce Miller, 51 | Robert Miner, 52 | Chris Rowley, 53 | Murray Sargent III, 54 | Kyle Siegrist, 55 | Andrew Smith, 56 | Neil Soiffer, 57 | Stephen Watt, 58 | Mohamed Zergaoui 59 |
60 | 61 |

62 | All the above persons have been members of the Math Working Group, 63 | but some not for the whole life of the Working Group. The 22 authors listed for MathML3 64 | at the start of that specification are those who contributed 65 | reworkings and reformulations used in the actual text of the specification. 66 | Thus the list includes the principal authors of MathML2 much of whose text was repurposed 67 | here. They were, of course, supported and encouraged by the activity and discussions 68 | of the whole Math Working Group, and by helpful commentary from outside it, both within 69 | the W3C and further afield. 70 |

71 | 72 |

73 | For 2003 to 2006 W3C Math Activity comprised a Math Interest Group, 74 | chaired by David Carlisle of NAG and Robert Miner of Design Science. 75 |

76 | 77 |

78 | The W3C Math Working Group (2001–2003) 79 | was co-chaired by Patrick Ion of the 80 | AMS, and Angel Diaz of IBM from June 2001 to May 2002; afterwards 81 | Patrick Ion continued as chair until the end of the WG's extended charter. 82 |

83 | 84 |

Participants in the Working Group responsible for MathML 2.0, second 85 | edition were: 86 |

87 |
88 | Ron Ausbrooks, 89 | Laurent Bernardin, 90 | Stephen Buswell, 91 | David Carlisle, 92 | Stéphane Dalmas, 93 | Stan Devitt, 94 | Max Froumentin, 95 | Patrick Ion, 96 | Michael Kohlhase, 97 | Robert Miner, 98 | Luca Padovani, 99 | Ivor Philips, 100 | Murray Sargent III, 101 | Neil Soiffer, 102 | Paul Topping, 103 | Stephen Watt 104 |
105 | 106 |

Earlier active participants of the W3C Math Working Group (2001 – 2003) have 107 | included: 108 |

109 |
110 | Angel Diaz, 111 | Sam Dooley, 112 | Barry MacKichan 113 |
114 | 115 |

The W3C Math Working Group was co-chaired by Patrick Ion 116 | of the AMS, and Angel Diaz of IBM from July 1998 to December 2000.

117 | 118 |

Participants in the Working Group responsible for MathML 2.0 were: 119 |

120 |
121 | Ron Ausbrooks, 122 | Laurent Bernardin, 123 | Stephen Buswell, 124 | David Carlisle, 125 | Stéphane Dalmas, 126 | Stan Devitt, 127 | Angel Diaz, 128 | Ben Hinkle, 129 | Stephen Hunt, 130 | Douglas Lovell, 131 | Patrick Ion, 132 | Robert Miner, 133 | Ivor Philips, 134 | Nico Poppelier, 135 | Dave Raggett, 136 | T.V. Raman, 137 | Murray Sargent III, 138 | Neil Soiffer, 139 | Irene Schena, 140 | Paul Topping, 141 | Stephen Watt 142 |
143 | 144 |

Earlier active participants of this second W3C Math Working Group have 145 | included: 146 |

147 |
148 | Sam Dooley, 149 | Robert Sutor, 150 | Barry MacKichan 151 |
152 | 153 |

At the time of release of MathML 1.0 [[MathML1]] the 154 | Math Working Group was co-chaired by Patrick Ion and Robert Miner, then of the 155 | Geometry Center. Since that time several changes in membership have taken 156 | place. In the course of the update to MathML 1.01, in addition to people listed in 157 | the original membership below, corrections were offered by David Carlisle, Don 158 | Gignac, Kostya Serebriany, Ben Hinkle, Sebastian Rahtz, Sam Dooley and others.

159 | 160 |

Participants in the Math Working Group responsible for the finished 161 | MathML 1.0 specification were: 162 |

163 |
164 | Stephen Buswell, 165 | Stéphane Dalmas, 166 | Stan Devitt, 167 | Angel Diaz, 168 | Brenda Hunt, 169 | Stephen Hunt, 170 | Patrick Ion, 171 | Robert Miner, 172 | Nico Poppelier, 173 | Dave Raggett, 174 | T.V. Raman, 175 | Bruce Smith, 176 | Neil Soiffer, 177 | Robert Sutor, 178 | Paul Topping, 179 | Stephen Watt, 180 | Ralph Youngen 181 |
182 |

183 | 184 | Others who had been members of the W3C Math WG for periods at 185 | earlier stages were: 186 | 187 |

188 |
189 | Stephen Glim, 190 | Arnaud Le Hors, 191 | Ron Whitney, 192 | Lauren Wood, 193 | Ka-Ping Yee 194 |
195 |
196 | 197 |
198 |

Acknowledgments

199 | 200 |

The Working Group benefited from the help of many other 201 | people in developing the specification for MathML 1.0. We 202 | would like to particularly name Barbara Beeton, Chris Hamlin, 203 | John Jenkins, Ira Polans, Arthur Smith, Robby Villegas and Joe 204 | Yurvati for help and information in assembling the character 205 | tables in , as well as Peter Flynn, 206 | Russell S.S. O'Connor, Andreas Strotmann, and other 207 | contributors to the www-math 208 | mailing list for their careful 209 | proofreading and constructive criticisms.

210 | 211 |

212 | As the Math Working Group went on to MathML 2.0, it again was 213 | helped by many from the W3C family of Working Groups with whom 214 | we necessarily had a great deal of interaction. Outside the 215 | W3C, a particularly active relevant front was the interface 216 | with the Unicode Technical Committee (UTC) and the NTSC WG2 217 | dealing with ISO 10646. There the STIX project put together a 218 | proposal for the addition of characters for mathematical 219 | notation to Unicode, and this work was again spearheaded 220 | by 221 | Barbara Beeton of the AMS. The whole problem ended split into 222 | three proposals, two of which were advanced by Murray Sargent 223 | of Microsoft, a Math WG member and member of the UTC. But the 224 | mathematical community should be grateful for essential help 225 | and guidance over a couple of years of refinement of the 226 | proposals to help mathematics provided by Kenneth Whistler of 227 | Sybase, and a UTC and WG2 member, and by Asmus Freytag, also 228 | involved in the UTC and WG2 deliberations, and always a stalwart 229 | and knowledgeable supporter of the needs of scientific notation. 230 |

231 | 232 |
233 | 234 |
235 | 236 | -------------------------------------------------------------------------------- /src/fundamentals.html: -------------------------------------------------------------------------------- 1 |
2 |

MathML Fundamentals

3 | 4 | 5 | 6 | 7 |
8 |

MathML Syntax and Grammar

9 | 10 |
11 |

General Considerations

12 | 13 |

The basic ‘syntax’ of MathML is 14 | defined using XML syntax, 15 | but other syntaxes that can encode labeled trees are possible. Notably the HTML parser 16 | may also be used with MathML. 17 | Upon this, we layer a ‘grammar’, being the rules for allowed elements, 18 | the order in which they can appear, 19 | and how they may be contained within each other, 20 | as well as additional syntactic rules for the values of attributes. 21 | These rules are defined by this specification, 22 | and formalized by a RelaxNG schema [[RELAXNG-SCHEMA]] in . 23 | Derived schema in other formats, DTD (Document Type Definition) 24 | and XML Schema [[XMLSchemas]] are also provided. 25 |

26 | 27 |

MathML's character set consists of any 28 | Unicode characters [[Unicode]] allowed by the syntax being used. (See for example [[XML]] or [[HTML]].) 29 | The use of Unicode characters for mathematics is 30 | discussed in .

31 | 32 |

The following sections discuss the general aspects 33 | of the MathML grammar as well as describe the syntaxes used 34 | for attribute values. 35 |

36 | 37 |
38 | 39 |
40 |

MathML and Namespaces

41 | 42 |

An XML namespace [[Namespaces]] is a collection of names identified by a URI. 43 | The URI for the MathML namespace is:

44 | 45 | 46 |
  47 |      http://www.w3.org/1998/Math/MathML
  48 |     
49 | 50 | 51 |

To declare a namespace when using the XML serialisation of MathML, 52 | one uses an xmlns 53 | attribute, or an attribute with an xmlns prefix.

54 | 55 |
56 |
  57 |       <math xmlns="http://www.w3.org/1998/Math/MathML">
  58 |         <mrow>...</mrow>
  59 |       </math>
  60 |     
61 |
62 | 63 |

When the xmlns attribute is used as a 64 | prefix, it declares a prefix which can then be used to explicitly associate other 65 | elements 66 | and attributes with a particular namespace. 67 | When embedding MathML within HTML using XML syntax, one might use: 68 |

69 | 70 |
71 |
  72 |       <body xmlns:m="http://www.w3.org/1998/Math/MathML">
  73 |         ...
  74 |         <m:math><m:mrow>...</m:mrow></m:math>
  75 |         ...
  76 |       </body>
  77 |     
78 |
79 | 80 |

HTML does not support namespace extensibility in the same way. The HTML parser 81 | has in-built knowledge of the HTML, SVG, and MathML namespaces. xmlns attributes are 82 | just treated as normal attributes. Thus, when using the HTML serialisation of MathML, 83 | prefixed element names must not be used. xmlns=http://www.w3.org/1998/Math/MathML 84 | may be used on the math element; it will be ignored by the HTML parser. 85 | 86 | If a MathML expression is likely to be in contexts where it may be parsed by an XML 87 | parser or an HTML parser, it SHOULD 88 | use the following form to ensure maximum compatibility:

89 | 90 |
91 |
  92 |       <math xmlns="http://www.w3.org/1998/Math/MathML">
  93 |         ...
  94 |       </math>
  95 |     
96 |
97 | 98 |
99 | 100 |
101 |

Children versus Arguments

102 | 103 |

There are presentation elements that conceptually accept only 104 | a single argument, but which for convenience have been written to accept any number 105 | of children; 106 | then we infer an mrow containing those children which acts as 107 | the argument to the element in question; see . 108 |

109 | 110 |

In the detailed discussions of element syntax given with each 111 | element throughout the MathML specification, the number of arguments required and 112 | their order, as well as other constraints on the content, are specified. 113 | This information is also tabulated 114 | for the presentation elements in .

115 | 116 |
117 | 118 |
119 |

MathML and Rendering

120 |

Web Platform implementations of [[MathML-Core]] should follow the 121 | detailed layout rules specified in that document.

122 | 123 |

This document only recommends (i.e., does not require) specific 124 | ways of rendering Presentation MathML; this is in order to allow 125 | for medium-dependent rendering and for implementations not using 126 | the CSS based Web Platform.

127 | 128 |
129 | 130 |
131 |

MathML Attribute Values

132 | 133 |

MathML elements take attributes with values that further specialize 134 | the meaning or effect of the element. Attribute names are shown in a 135 | monospaced font throughout this document. The meanings of attributes and their 136 | allowed values are described within the specification of each element. 137 | The syntax notation explained in this section is used in specifying allowed values. 138 |

139 | 140 |
141 |
Syntax notation used in the MathML specification
142 | 143 |

To describe the MathML-specific syntax of 144 | attribute values, the following conventions and notations are 145 | used for most attributes in the present document.

146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 165 | 166 | 167 | 168 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 183 | 184 | 185 | 186 | 187 | 190 | 191 | 192 | 193 | 194 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 232 | 233 | 234 | 235 | 236 | 238 | 239 | 240 | 241 | 242 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 |
NotationWhat it matches
booleanAs defined in [[MathML-Core]], a string that is an 163 | ASCII case-insensitive match to true or 164 | false.
unsigned-integerAs defined in [[MathML-Core]], an integer, whose first character is neither 169 | U+002D HYPHEN-MINUS character (-) nor 170 | U+002B PLUS SIGN (+).
positive-integerAn [=unsigned-integer=] not consisting solely of "0"s (U+0030), representing a positive integer
integeran optional "-" (U+002D), followed by an [=unsigned-integer=], 181 | and representing an integer 182 |
number 188 | an optional prefix of "-" (U+002D), followed by an [=unsigned-number=], 189 | representing a terminating decimal number (a type of rational number)
unsigned-number 195 | value as defined in 196 | [[CSS-VALUES-3]] number, whose first character is neither 197 | U+002D HYPHEN-MINUS character (-) nor 198 | U+002B PLUS SIGN (+), 199 | representing a non-negative terminating decimal number 200 | (a type of rational number)
charactera single non-whitespace character
stringan arbitrary, nonempty and finite, string of characters
lengtha length, as explained below,
namedspacea named [=length=], [=namedspace=], as explained in
colora color, using the syntax specified by [[CSS-Color-3]]
idan identifier, unique within the document; 231 | must satisfy the NAME syntax of the XML recommendation [[XML]]
idrefan identifier referring to another element within the document; 237 | must satisfy the NAME syntax of the XML recommendation [[XML]]
URIa Uniform Resource Identifier [[RFC3986]]. Note that the attribute value 243 | is typed in the schema as anyURI which allows any sequence of XML characters. 244 | Systems needing to use this string as a URI must encode the bytes of the UTF-8 encoding 245 | of any characters not allowed in URI using %HH encoding where HH are the byte value 246 | in hexadecimal. 247 | This ensures that such an attribute value may be interpreted as an IRI, 248 | or more generally a LEIRI; see [[IRI]].
italicized wordvalues as explained in the text for each attribute; see
"literal"quoted symbol, literally present in the attribute value (e.g. "+" or '+')
262 | 263 | 264 |

The ‘types’ described above, except for string, 265 | may be combined into composite patterns using the following operators. The whole 266 | attribute value must be delimited by single (') or double (") quotation marks in the 267 | marked up 268 | document. Note that double quotation marks are often used in this specification to 269 | mark up 270 | literal expressions; an example is the "-" in line 5 of the table above. 271 |

272 | 273 |

274 | In the table 275 | below a form f means an instance of a type described in the table above. 276 | The combining operators are shown in order of precedence from highest 277 | to lowest:

278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 305 | 306 | 307 | 308 | 309 | 311 | 312 | 313 | 314 | 315 | 317 | 318 | 319 | 320 | 321 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 |
NotationWhat it matches
(f)same f
f?an optional instance of f
f*zero or more instances of f, with 304 | separating whitespace characters
f+one or more instances of f, with 310 | separating whitespace characters
f1f2 fnone instance of each form fi, in sequence, 316 | with no separating whitespace
f1,f2, ,fnone instance of each form fi, in sequence, with 322 | separating whitespace characters (but no commas)
f1|f2| |fnany one of the specified forms fi
331 | 332 |

The notation we have chosen here is in the style of the syntactical notation of the 333 | RelaxNG 334 | used for MathML's basic schema, . 335 |

336 | 337 |

Since some applications are inconsistent about normalization 338 | of whitespace, for maximum interoperability it is advisable to use only 339 | a single whitespace character for separating parts of a value. 340 | Moreover, leading and trailing whitespace in attribute values should be avoided.

341 | 342 |

For most numerical attributes, only those in a subset of the 343 | expressible values are sensible; values outside this subset are not 344 | errors, unless otherwise specified, but rather are rounded up or down 345 | (at the discretion of the renderer) to the closest value within the 346 | allowed subset. The set of allowed values may depend on the renderer, 347 | and is not specified by MathML.

348 | 349 |

If a numerical value within an attribute value syntax description 350 | is declared to allow a minus sign ('-'), e.g., number or 351 | integer, it is not a syntax error when one is provided in 352 | cases where a negative value is not sensible. Instead, the value 353 | should be handled by the processing application as described in the 354 | preceding paragraph. An explicit plus sign ('+') is not allowed as 355 | part of a numerical value except when it is specifically listed in the 356 | syntax (as a quoted '+' or "+"), and its presence can change the 357 | meaning of the attribute value (as documented with each attribute 358 | which permits it).

359 | 360 |
361 | 362 |
363 |
Length Valued Attributes
364 | 365 |

Most presentation elements have attributes that accept values 366 | representing lengths to be used for size, spacing or similar properties. 367 | [[MathML-Core]] accepts lengths only in the 368 | <length-percentage> 369 | syntax defined in [[CSS-VALUES-3]]. 370 | MathML Full extends length syntax by accepting also a namedspace 371 | being one of:

372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 |
Positive spaceNegative spaceValue
veryverythinmathspacenegativeveryverythinmathspace±1/18 em
verythinmathspacenegativeverythinmathspace±2/18 em
thinmathspacenegativethinmathspace±3/18 em
mediummathspacenegativemediummathspace±4/18 em
thickmathspacenegativethickmathspace±5/18 em
verythickmathspacenegativeverythickmathspace±6/18 em
veryverythickmathspacenegativeveryverythickmathspace±7/18 em
414 | 415 | 416 |

In MathML 3, the attributes on mpadded 417 | allowed three pseudo-units, height, 418 | depth, and width (taking the place of one of the usual CSS units) 419 | denoting the original dimensions of the content. 420 | It also allowed a deprecated usage with lengths specified as 421 | a number without a unit which was interpreted as a multiple of the 422 | reference value. These forms are considered invalid in MathML 4. 423 |

424 | 425 |
426 |
Additional notes about units
427 | 428 | 429 |

Two additional aspects of relative units must be clarified, however. 430 | First, some elements such as or mfrac 431 | implicitly switch to smaller font sizes for some of their arguments. 432 | Similarly, mstyle can be used to explicitly change 433 | the current font size. In such cases, the effective values of 434 | an em or ex inside those contexts will be 435 | different than outside. The second point is that the effective value 436 | of an em or ex used for an attribute value 437 | can be affected by changes to the current font size. 438 | Thus, attributes that affect the current font size, 439 | such as mathsize 440 | and scriptlevel, must be processed before 441 | evaluating other length valued attributes. 442 |

443 | 444 |
445 |
446 | 447 | 448 |
449 |
Default values of attributes
450 | 451 |

Default values for MathML attributes are, in general, given along with the 452 | detailed descriptions of specific elements in the text. Default values 453 | shown in plain text in the tables of attributes for an element are literal, 454 | but when italicized are descriptions of how default values can be computed.

455 | 456 |

Default values described as inherited are taken from the 457 | rendering environment, as described in , 458 | or in some cases (which are described individually) taken from the values of other 459 | attributes of surrounding elements, or from certain parts of those 460 | values. The value used will always be one which could have been specified 461 | explicitly, had it been known; it will never depend on the content or 462 | attributes of the same element, only on its environment. (What it means 463 | when used may, however, depend on those attributes or the content.)

464 | 465 |

Default values described as automatic should be computed by 466 | a MathML renderer in a way which will produce a high-quality rendering; how 467 | to do this is not usually specified by the MathML specification. The value 468 | computed will always be one which could have been specified explicitly, had 469 | it been known, but it will usually depend on the element content and 470 | possibly on the context in which the element is rendered.

471 | 472 |

Other italicized descriptions of default values which appear in the 473 | tables of attributes are explained individually for each attribute.

474 | 475 |

The single or double quotes which are required around attribute values 476 | in an XML start tag are not shown in the tables of attribute value syntax 477 | for each element, but are around attribute values in examples in the 478 | text, so that the pieces of code shown are correct.

479 | 480 |

Note that, in general, there is no mechanism in MathML to simulate the 481 | effect of not specifying attributes which are inherited or 482 | automatic. Giving the words inherited or 483 | automatic explicitly will not work, and is not generally 484 | allowed. Furthermore, the mstyle element () 485 | can even be used to change the default values of presentation attributes 486 | for its children.

487 | 488 |

Note also that these defaults describe the 489 | behavior of MathML applications when an attribute is not supplied; 490 | they do not indicate a value that will be filled in by an XML parser, 491 | as is sometimes mandated by DTD-based specifications.

492 | 493 |

In general, there are a number of 494 | properties of MathML rendering that may be thought of as overall 495 | properties of a document, or at least of sections of a large 496 | document. Examples might be mathsize (the math font 497 | size: see ), or the 498 | behavior in setting limits on operators such as integrals or sums 499 | (e.g., movablelimits or displaystyle), or 500 | upon breaking formulas over lines (e.g. 501 | linebreakstyle); for such attributes see several 502 | elements in . 503 | These may be thought to be inherited from some such 504 | containing scope. Just above we have mentioned the setting of default 505 | values of MathML attributes as inherited or 506 | automatic; there is a third source of global default values 507 | for behavior in rendering MathML, a MathML operator dictionary. A 508 | default example is provided in . 509 | This is also discussed in and examples are given in 510 | .

511 |
512 | 513 |
514 | 515 |
516 |

Attributes Shared by all MathML Elements

517 | 518 |

In addition to the attributes described specifically for each element, 519 | the attributes in the following table are allowed on every MathML element. 520 | Also allowed are attributes from the xml namespace, such as xml:lang, 521 | and attributes from namespaces other than MathML, 522 | which are ignored by default.

523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 603 | 604 | 605 |
Namevaluesdefault
id[=id=]none
545 | Establishes a unique identifier associated with the element 546 | to support linking, cross-references and parallel markup. 547 | See xref and . 548 |
xref[=idref=]none
559 | References another element within the document. 560 | See id and . 561 |
class[=string=]none
572 | Associates the element with a set of style classes for use with 573 | [[CSS21]]. 574 | See for discussion of the interaction of MathML and CSS. 575 |
style[=string=]none
586 | Associates style information with the element for use with 587 | [[CSS21]]. 588 | See for discussion of the interaction 589 | of MathML and CSS. 590 |
hrefURInone
601 | Can be used to establish the element as a hyperlink to the specified URI. 602 |
606 | 607 | 608 |

All MathML presentation elements accept intent and arg attributes to support specifying 611 | intent. These are more fully described in 612 | [[[#mixing_intent]]].

613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 649 | 650 | 651 |
Namevaluesdefault
intentintent expressionnone
The intent attribute is more fully described 634 | in . It may be used on presentation 635 | elements to give information about the intended meaning of the 636 | expression, mainly for guiding audio or braille accessible 637 | renderings.
argnamenone
The arg attribute is more fully described 647 | in . It may be used to name an element to be referenced from an 648 | intent expression on an ancestor element.
652 | 653 | 654 | 655 |

See also for a list of MathML attributes 656 | which can be used on most presentation token elements. 657 |

658 | 659 |
660 | 661 |
662 |

Collapsing Whitespace in Input

663 | 664 |

In MathML, as in XML, whitespace means simple spaces, 665 | tabs, newlines, or carriage returns, i.e., characters with hexadecimal 666 | Unicode codes U+0020, U+0009, U+000A, or 667 | U+000D, respectively; see also the discussion of whitespace in Section 2.3 of 668 | [[XML]].

669 | 670 |

MathML ignores whitespace occurring outside token elements. 671 | Non-whitespace characters are not allowed there. Whitespace occurring 672 | within the content of token elements, except for <cs>, is normalized as follows. All whitespace at the beginning and end of the content is 673 | removed, and whitespace internal to content of the element is 674 | collapsed canonically, i.e., each sequence of 1 or more 675 | whitespace characters is replaced with one space character (U+0020, sometimes 676 | called a blank character).

677 | 678 |

For example, <mo> ( </mo> is equivalent to 679 | <mo>(</mo>, and

680 | 681 |
682 |
 683 |       <mtext>
 684 |      Theorem
 685 |      1:
 686 |       </mtext>
 687 |     
688 |
689 |

is equivalent to 690 | <mtext>Theorem 1:</mtext> 691 | or 692 | <mtext>Theorem&#x20;1:</mtext>.

693 | 694 |

Authors wishing to encode white space characters at the start or end of 695 | the content of a token, or in sequences other than a single space, without 696 | having them ignored, must use non-breaking space U+00A0 (or nbsp) 697 | or other non-marking characters that are not trimmed. 698 | For example, compare the above use of an mtext element 699 | with

700 | 701 |
702 |
 703 |       <mtext>
 704 |      &#x00A0;<!--nbsp-->Theorem &#x00A0;<!--nbsp-->1:
 705 |       </mtext> 
706 |
707 | 708 |

When the first example is rendered, there is nothing before 709 | Theorem, one Unicode space character between Theorem and 710 | 1:, and nothing after 1:. In the 711 | second example, a single space character is to be rendered before 712 | Theorem; two spaces, one a Unicode space character and 713 | one a Unicode no-break space character, are to be rendered before 714 | 1:; and there is nothing after the 715 | 1:.

716 | 717 |

Note that the value of the xml:space attribute is not relevant 718 | in this situation since XML processors pass whitespace in tokens to a 719 | MathML processor; it is the requirements of MathML processing which specify that 720 | whitespace is trimmed and collapsed.

721 | 722 |

For whitespace occurring outside the content of the token elements 723 | mi, mn, mo, ms, mtext, 724 | ci, cn, cs, csymbol and annotation, 725 | an mspace element should be used, as opposed to an mtext element containing 726 | only whitespace entities.

727 | 728 |
729 | 730 |
731 | 732 |
733 |

The Top-Level 734 | <math> Element

735 | 736 |

MathML specifies a single top-level or root math element, 737 | which encapsulates each instance of 738 | MathML markup within a document. All other MathML content must be 739 | contained in a math element; in other words, 740 | every valid MathML expression is wrapped in outer 741 | <math> tags. The math 742 | element must always be the outermost element in a MathML expression; 743 | it is an error for one math element to contain 744 | another. These considerations also apply when sub-expressions are 745 | passed between applications, such as for cut-and-paste operations; 746 | see .

747 | 748 |

The math element can contain an arbitrary number 749 | of child elements. They render by default as if they 750 | were contained in an mrow element.

751 | 752 |
753 |

Attributes

754 | 755 |

The math element accepts any of the attributes that can be set on 756 | , including the common attributes 757 | specified in . 758 | In particular, it accepts the dir attribute for 759 | setting the overall directionality; the math element is usually 760 | the most useful place to specify the directionality 761 | (see for further discussion). 762 | Note that the dir attribute defaults to ltr 763 | on the math element (but inherits on all other elements 764 | which accept the dir attribute); this provides for backward 765 | compatibility with MathML 2.0 which had no notion of directionality. 766 | Also, it accepts the mathbackground attribute in the same sense 767 | as mstyle and other presentation elements to set the background 768 | color of the bounding box, rather than specifying a default for the attribute 769 | (see ).

770 | 771 |

In addition to those attributes, the math element accepts:

772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 883 | 884 | 885 | 886 | 887 | 889 | 890 | 891 | 892 | 893 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | 912 | 913 | 917 | 918 | 919 | 920 | 921 | 922 | 923 | 924 | 925 | 926 | 936 | 937 | 938 |
Namevaluesdefault
display"block" | "inline"inline
794 | specifies whether the enclosed MathML expression should be rendered 795 | as a separate vertical block (in display style) 796 | or inline, aligned with adjacent text. 797 | When display=block, displaystyle is initialized 798 | to true, 799 | whereas when display=inline, displaystyle 800 | is initialized to false; 801 | in both cases scriptlevel is initialized to 0 802 | (see ). 803 | Moreover, when the math element is embedded in a larger document, 804 | a block math element should be treated as a block element as appropriate 805 | for the document type (typically as a new vertical block), 806 | whereas an inline math element should be treated as inline 807 | (typically exactly as if it were a sequence of words in normal text). 808 | In particular, this applies to spacing and linebreaking: for instance, 809 | there should not be spaces or line breaks inserted between inline math 810 | and any immediately following punctuation. 811 | When the display attribute is missing, a rendering agent is free to initialize 812 | as appropriate to the context. 813 |
maxwidthlengthavailable width
824 | specifies the maximum width to be used for linebreaking. 825 | The default is the maximum width available in the surrounding environment. 826 | If that value cannot be determined, the renderer should assume an infinite rendering 827 | width. 828 |
overflow"linebreak" | "scroll" | "elide" | "truncate" | "scale"linebreak
839 | specifies the preferred handing in cases where an expression is too long to 840 | fit in the allowed width. See the discussion below. 841 |
altimgURInone
852 | provides a URI referring to an image to display as a fall-back 853 | for user agents that do not support embedded MathML. 854 |
altimg-widthlengthwidth of altimg
865 | specifies the width to display altimg, scaling the image if necessary; 866 | see altimg-height. 867 |
altimg-heightlengthheight of altimg
878 | specifies the height to display altimg, scaling the image if necessary; 879 | if only one of the attributes altimg-width and altimg-height 880 | are given, the scaling should preserve the image's aspect ratio; 881 | if neither attribute is given, the image should be shown at its natural size. 882 |
altimg-valignlength 888 | | "top" | "middle" | "bottom" 0ex
894 | specifies the vertical alignment of the image with respect to adjacent inline material. 895 | A positive value of altimg-valign shifts the bottom of the image above the 896 | current baseline, while a negative value lowers it. 897 | The keyword "top" aligns the top of the image with the top of adjacent inline material; 898 | "center" aligns the middle of the image to the middle of adjacent material; 899 | "bottom" aligns the bottom of the image to the bottom of adjacent material 900 | (not necessarily the baseline). This attribute only has effect 901 | when display=inline. 902 | By default, the bottom of the image aligns to the baseline. 903 |
alttext[=string=]none
914 | provides a textual alternative as a fall-back for user agents 915 | that do not support embedded MathML or images. 916 |
cdgroupURInone
927 | specifies a CD group file that acts as a catalogue of CD bases for locating 928 | OpenMath content dictionaries of csymbol, annotation, and 929 | annotation-xml elements in this math element; see . When no cdgroup attribute is explicitly specified, the 930 | document format embedding this math element may provide a method for determining 931 | CD bases. Otherwise the system must determine a CD base; in the absence of specific 932 | information http://www.openmath.org/cd is assumed as the CD base for all 933 | csymbol, annotation, and annotation-xml elements. This is the 934 | CD base for the collection of standard CDs maintained by the OpenMath Society. 935 |
939 | 940 |

In cases where size negotiation is not possible or fails 941 | (for example in the case of an expression that is too long to fit in the allowed width), 942 | the overflow attribute is provided to suggest a processing method to the renderer. 943 | Allowed values are:

944 | 945 | 946 | 947 | 948 | 949 | 950 | 951 | 952 | 953 | 954 | 955 | 956 | 957 | 961 | 962 | 963 | 964 | 965 | 966 | 973 | 974 | 975 | 976 | 977 | 985 | 986 | 987 | 988 | 989 | 994 | 995 | 996 | 997 | 998 | 1005 | 1006 | 1007 |
Value Meaning
"linebreak"The expression will be broken across several lines. 958 | See for further discussion. 959 | 960 |
"scroll"The window provides a viewport 967 | into the larger complete display of the mathematical 968 | expression. Horizontal or vertical scroll bars are added to the window 969 | as necessary to allow the viewport to be moved to a different 970 | position. 971 | 972 |
"elide"The display is abbreviated by removing enough of it so that 978 | the remainder fits into the window. For example, a large polynomial 979 | might have the first and last terms displayed with + ... + 980 | between 981 | them. Advanced renderers may provide a facility to zoom in on elided 982 | areas. 983 | 984 |
"truncate"The display is abbreviated by simply truncating it at the right and 990 | bottom borders. It is recommended that some indication of truncation is 991 | made to the viewer. 992 | 993 |
"scale"The fonts used to display the mathematical expression are 999 | chosen so that the full expression fits in the window. Note that this 1000 | only happens if the expression is too large. In the case of a window 1001 | larger than necessary, the expression is shown at its normal size 1002 | within the larger window. 1003 | 1004 |
1008 | 1009 |
1010 | 1011 |
1012 | 1013 | 1014 | 1015 |
1016 | -------------------------------------------------------------------------------- /src/intent.html: -------------------------------------------------------------------------------- 1 |
2 |

Annotating MathML: intent

3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

MathML has been widely adopted by assistive technologies (AT). 14 | However, math notations can be ambiguous which can result in AT guessing at what should be spoken in some cases. 15 | MathML 4 adds a lightweight method for authors to express their intent: the intent attribute. 16 | This attribute is similar to the aria-label attribute 17 | with some important distinctions. 18 | In terms of accessibility, the major difference is that intent 19 | does not affect braille generation. 20 | Most languages have a separate braille code for math so that the words used for speech should not be affected by braille generation. 21 | Some languages, such as English, have more than one braille math code and it is impossible for the author to know which is desired by the reader. 22 | Hence, even if the author knew the (math) braille for the element, they could not override aria-label 23 | by using the proposed aria-braillelabel because they wouldn't know which code to use. 24 |

25 | 26 |

As described in , 27 | MathML elements allow attributes intent and arg that allow the 30 | intent of the term to be specified. This 31 | annotation is not meant to provide a full mathematical definition 32 | of the term. It is primarily meant to help AT generate audio and/or braille renderings, see . 33 | Nevertheless, it may also be useful to guide translations to Content MathML, or computational systems.

34 | 35 |

The intent attribute encodes a 36 | simple functional syntax representing the intended speech. 37 | A formal grammar is given below, but a typical example would be 38 | intent="power($base,$exponent)" used in a context such as:

39 | 40 |
41 |
 42 |     <msup intent="power($base,$exp)">
 43 |       <mi arg="base">x</mi>
 44 |       <mi arg="exp">n</mi>
 45 |     </msup>
 46 |    
47 |
48 |

The intent value of power($base,$exp) makes it clear that the author intends that this expression 49 | denotes exponentiation as opposed to one of many other meanings of superscripts. 50 | Since power will be a concept supported by the AT, it may choose different 51 | ways of speaking depending on context, arguments or other details. 52 | For example, the above expression might be spoken as "x to the power n", 53 | but if "2" were given instead of "n", it may say "x squared".

54 | 55 |
56 |

The Grammar for intent

57 | 58 |

The value of the intent attribute, should match the following grammar.

59 | 60 |
 61 | intent             := self-property-list | expression
 62 | self-property-list := property+ S    
 63 | expression         := S ( term property* | application ) S 
 64 | term               := concept-or-literal | number | reference 
 65 | concept-or-literal := NCName
 66 | number             := '-'? \d+ ( '.' \d+ )?
 67 | reference          := '$' NCName
 68 | application        := expression '(' arguments? S ')'
 69 | arguments          := expression ( ',' expression )*
 70 | property           := S ':' NCName
 71 | S                  := [ \t\n\r]*
 72 |    
73 | 74 |

Here NCName 75 | is as defined in in [[xml-names]], and digit is a character in the range 0–9.

76 | 77 | 78 |

The parts consist of:

79 |
80 |
concept-or-literal
81 |
Names should match the NCName production as used for 82 | no-namespace element name. 83 | A [=concept-or-literal=] are interpreted either as a [=concept=] or [=literal=]. 84 |
    85 |
  • 86 |

    A concept corresponds to some mathematical or 87 | application specific function or concept. 88 | For many concepts, the words used to speak a concept are very similar to the name 89 | used when referencing a concept.

    90 |
  • 91 |
  • 92 |

    A literal is a name starting with `_` (U+00F5). 93 | These will never be included in an [=Intent Concept Dictionary=]. 94 | The reading of a literal is generated by replacing any 95 | -, _, . in the name by 96 | spaces and then reading the resulting phrase.

    97 |
  • 98 |
99 |
100 |
number
101 |
102 | An explicit number such as 2.5 denotes itself. 103 |
104 | 105 |
reference
106 |
107 | An argument [=reference=] such as $name refers to a descendant element 108 | that has an attribute arg="name". Unlike id 109 | attributes, arg do not have to be 110 | unique within a document. When searching for a matching element the 111 | search should only consider descendants, while stopping early at any 112 | elements that have a set intent or 113 | arg attribute, without descending 114 | into them. 115 | Proper use of [=reference=], instead of inserting equivalent literals, 116 | allows intent to be used while navigating the mathematical structure. 117 |
118 | 119 |
application
120 |
121 | An application 122 | denotes a function applied to arguments using 123 | a standard prefix notation. Optionally, between the head of the 124 | function and the list of arguments there may be a [=property=] list as 125 | described below to influence the style of text reading generated, or to 126 | provide other information to any consumer of the intent. 127 |
128 | 129 | 130 |
property
131 |
132 | A [=property=] annotates the intent with an additional 133 | property which may be used by 134 | the system to adjust the generated speech or Braille in system 135 | specifc ways. The property may be directly related to the speech 136 | form, such as `:infix` or indirectly affect the style of speech 137 | with properties such as `:unit` or `:chemistry` 138 | 139 |

The list of properties supported by any system is open but should include 140 | the core properties as described below.

141 |
142 | 143 | 144 |
self-property-list
145 |
At the top level, an [=intent=] may consist of just a 146 | non-empty list of properties. These apply to the current element 147 | as described in .
148 | 149 | 150 |
expression
151 |
A simple functional syntax using the terms described above.
152 |
153 |
154 | 155 |
156 |

Intent Concept Dictionaries

157 |

Every AT system that supports intent contains, 158 | at least implicitly, a list of the concepts that it recognizes. 159 | The details of matching and using concept names is given in . 160 | Such an AT SHOULD recognize the concepts in the [=Core=] list discussed below; 161 | It MAY also include concepts in the [=Open=] list discussed below, 162 | as well as any of its own.

163 |

An Intent Concept Dictionary 164 | is an abstract mapping of [=concept=] names to speech, text or braille for that concept; 165 | it is somewhat analogous to the used by 166 | MathML renderers in that it provides a set of defaults renderers should be aware of. 167 | The property also has some analogies to the operator dictionary's use of 168 | form because a match makes use of fixity properties 169 | (prefix, infix, etc.). 170 |

171 | 172 |

173 | [=Intent=] Concept names are maintained in two lists, each maintained in the 174 | w3c/mathml-docs GitHub repository. 175 | Note that while these concept dictionaries are published as HTML tables (based on yaml data), 176 | there is no requirement on how a system implements the mapping from concepts to speech hints. 177 | Rather than a fixed list or hash table, it might use XPath matching, regular expressions, 178 | appropriately trained generative AI or any other suitable mechansim. 179 | The only requirement is that it should accept the cases listed in the Core concept dictionary 180 | and produce acceptable speech hints for those cases. 181 |

182 | 183 | 205 |

Future versions of the core concept list may incorporate names 206 | from the open list if usage indicates that is appropriate. 207 |

208 |
209 | 210 |
211 |

Intent Properties

212 | 213 |

Intent [=properties=] act as modifiers of the speech or Braille that 214 | otherwise would have been generated by the intent attribute. 215 | Most of these properties only have a 216 | defined effect in specific contexts, such as on the head of an 217 | application 219 | or applying to an <mtable>. 220 | The use of these properties in other contexts is not an error, 221 | but as with any properties, is by default ignored but may have a 222 | system-specific effect.

223 | 224 |

Similar to the lists of [=Concepts=], the Working Group maintains a [=Properties list=] of [=property=] values that should be implemented.

225 | 230 |

Here, we describe the major classes of property affecting speech generation.

231 |
232 |
:prefix, 233 | :infix, :postfix, 234 | :function, :silent
235 |
236 |

237 | These properties in a function application request that 239 | the reading of the name may be suppressed, or the word ordering may be affected. 240 | Note that the properties :prefix, :infix and :postfix 241 | refer to the spoken word order of the name and arguments, 242 | and not (necessarily) the order used in the displayed mathematical notation.

243 |
    244 |
  • 245 | In the case of a [=supported concept=] name, the property MAY be used in choosing the alternatives 246 | supported by the AT. For example union is in the 247 | Core list with speech patterns "$1 union $2" and "union of $1 and $2". 248 | An intent union :prefix ($a,$b) would 249 | indicate that the latter style is preferred. 250 |
  • 251 |
  • For [=literal=] or [=unsupported concept=] names, the text generated from the function head SHOULD be read 252 | as specified in the property. 253 |
      254 |
    • f :prefix ($x) : f x
    • 255 |
    • f :infix ($x,y) : x f y
    • 256 |
    • f :postix ($x) : x f
    • 257 |
    • f :function ($x, $y): f of x and y
    • 258 |
    • f :silent ($x,$y) : x y
    • 259 |
    260 | The specific words used above are only examples; 261 | AT is free to choose other appropriate audio renderings. 262 | For example, f:function($x, $y) could also be spoken as 263 | f of x comma y. If none of these properties is used, the 264 | function property should be assumed unless the literal is 265 | silent (for example _) in which case the :silent property 266 | should be assumed. See the examples in .
  • 267 |
268 |
269 |
:literal, :common, :legacy
270 |
271 |

These properties control the overall style of generated speech. 272 | The detailed description in each case is available in a separate document.

273 |

:literal requests that the AT should not infer any semantics 274 | and just speak the elements with a literal interpretation, including leaf content (eg | might be spoken as vertical bar). :common requests use of a specified set of heuristics do allow intents to be inferred for common notations. :legacy requests system-specific behavior.

275 |
276 |
:matrix, 277 | :system-of-equations, :lines, :continued-row, :equation-label
278 |
279 |

These properties may be used on an mtable or on a 280 | [=reference=] to an mtable, mtr and mtd. 281 | They affect the way the parts of an alignment are announced.

282 |

The exact wordings used are system specfic.

283 |
    284 |
  • :matrix 285 | should be read in style suitable for matrices, with typically 286 | column numbers being announced.
  • 287 |
  • :system-of-equations should be read in style suitable for 288 | displayed equations (and inequalities), with typically 289 | column numbers not being announced. Each table row would 290 | normally be announced as an "equation" but a 291 | `continued-row` property on an mtr indicates 292 | that the row continues an equation wrapped from the row 293 | above.
  • 294 |
  • :equation-label may be used on an mtd to mark a cell containing an equation label.
  • 295 |
296 |
297 |
298 |
299 | 300 |
301 |

Using Intent Concepts and Properties

302 |

When the intent attribute corresponding to a specific node 303 | contains a concept component, the AT's [=Intent Concept Dictionary=] should be consulted. 304 | The concept name should be normalized 305 | (`_` (U+00F5) and `.` (U+002E) to `-` (U+002D)), 306 | and compared using ASCII case-insensitive 307 | match. If arguments were given explicitly in the intent 308 | then their number gives the arity, and the 309 | fixity is determined from an explicit property 310 | or may default from the concept dictionary. Otherwise, arity is assumed to be 0.

311 |

A concept is considered a supported concept (by the AT) 312 | when the normalized name, the fixity property, and the arity 313 | all match an entry in the AT's concept dictionary. 314 | This does not exclude implementations which support additional concepts, 315 | as well as concepts with many arities, fixities or aliases, 316 | as long as they are mapped appropriately. 317 | The speech hint in the matching entry 318 | can be used as a guide for the generation of 319 | specific audio, replacement text or braille renderings, as appropriate. 320 | It can also help clarify argument order. 321 | However, because common notations have many specialized ways of being spoken, the AT 322 | is NOT constrained to use the hint as given. For example, AT may 323 | vocalize a fraction marked up with <mfrac> 324 | as three quarters or three over x 325 | or may vocalize an inline fraction marked up as <mo>/</mo> 326 | as three divided by x. 327 | The choice may depend on the contents 328 | and carrier element associated with an 329 | intent="divide($num,$denom)". 330 | Note that properties other than those specifying fixity 331 | may also indicate different rendering choices.

332 |

Otherwise, if the concept name, fixity and arity do not match that is considered to be an 333 | unsupported concept (by the AT) 334 | and will be treated the same as a [=literal=]; 335 | that is, the name is spoken as-is after normalizing each of `-`, `_` and `.` to an inter-word space. 336 | Even for an unsupported concept, if a fixity property and arguments were given, 337 | the speech for the arguments should be composed 338 | in a manner consistent with the given fixity property, if possible.

339 |

Note that future updates of an AT may add or remove concepts in its [=Intent Concept Dictionary=]. 340 | Hence which concepts are supported may change with each update.

341 | 342 |

In cases where the intent contains neither an explicit nor inferrable concept 343 | the AT should generally read out the MathML in a literal or structural fashion, 344 | as with the :literal property. 345 | However, any given [=properties=] should be respected if possible, 346 | and may be useful to indicate the kind of mathematical object, 347 | rather than giving an explicit [=concept=] name to be spoken. 348 | This can be a useful technique, especially for large constructs such as tables as 349 | it allows the children to be inferred without needing to be 350 | explicitly referenced in the `intent` as would be the case with an applicaton. 351 | For example, `<mtable intent=":array">...` might read the table as 352 | an array of values, whereas `<mtable intent=":system-of-equations">...` 353 | might read the table in a style more appropriate for a list of 354 | equations. In both cases the navigation of the underlying table 355 | structure can be supplied by the AT system, as it would for an 356 | unannotated table.

357 | 358 |

In general, depending upon the reader, AT may add words or sounds to make 359 | the speech clearer to the listener. For example, for someone 360 | who can not see the a fraction, AT might say fraction x over 361 | three end fraction so the listener knows exactly what is 362 | part of the fraction. For someone who can see the content, 363 | these extra words might be a distraction. AT should always 364 | produce speech that is appropriate to the community they serve.

365 |
366 | 367 |
368 |

Intent Error Handling

369 |

An intent processor may report errors in intent expressions in 370 | any appropriate way, including returning a message as the 371 | generated text, or throwing an exception (error) in whatever form 372 | the implementation supports. However in web platform contexts it is 373 | often not appropriate to report errors to the reader who has no 374 | access to correct the source, so intent procesors should offer a 375 | mode which recovers from errors as described below.

376 |
377 |

Intent Error Recovery

378 |
    379 |
  1. If an intent 380 | attribute does not match the grammar , 381 | then the processor should act as if the attribute were not 382 | present. 383 | Typically this will result in a suitable fallback text being 384 | generated from the MathML element and its descendants. Note that 385 | just the erroneous attribute is ignored, other intent attributes in the MathML 387 | expression should be used.
  2. 388 |
  3. If a `reference` such as `$x` does not correspond to an arg attribute with value `x` on a 390 | descendant element, the processor should act as if the reference 391 | were replaced by the literal `_dollar_x`.
  4. 392 |
393 |
394 |
395 | 396 | 397 |
398 |

A Warning about [=literal=] and [=property=]

399 |

The [=literal=] and [=property=] features extend the coverage of mathematical concepts 400 | beyond the predefined dictionaries and allow expression of speech preferences. 401 | For example, when `$x` and `$y` reference `<mi arg="x">x</mi>` and `<mi 402 | arg="y">y</mi>` respectively, then

403 | 407 |

These features also allow taking almost complete control of the generated speech. 408 | For example, compare:

409 | 419 |

However, since the literals are not in dictionaries, 420 | the meaning behind the expressions become more opaque, 421 | and thus excessive use of these features will tend to limit the AT's ability 422 | to adapt to the needs of the user, as well as limit translation and locale-specific speech. 423 | Thus, the last two examples would be discouraged.

424 |

Conversely, when specific speech not corresponding to a meaningful concept 425 | is nevertheless required, 426 | it will be better to use a [=literal=] name (prefixed with `_`) 427 | rather than an [=unsupported concept=]. 428 | This avoids unexpected collisions with future updates to the concept dictionaries. 429 | Thus, the last example is particularly discouraged. 430 |

431 |
432 | 433 |
434 |

Intent Examples

435 | 436 |

A primary use for intent is to 437 | disambiguate cases where the same syntax is used for different meanings, 438 | and typically has different readings.

439 | 440 |

Superscript, msup, may represent a power, a transpose, 441 | a derivative or an embellished symbol. These cases would be distinguished as follows, showing possible readings with and without intent

442 | 443 |
444 |
445 | <msup intent="power($base,$exp)">
446 |   <mi arg="base">x</mi>
447 |   <mi arg="exp">n</mi>
448 | </msup>
449 | 
450 |
x to the n-th power
x superscript n end superscript
451 |
452 |

An alternative default rendering without intent would be to assume that 453 | msup is always a power, so the second rendering above 454 | might also be x to the n-th power. In that case the second renderings below 455 | will (incorrectly) speak the examples using raised to the ... power. 456 |

457 |
458 |
459 | <msup intent="$op($a)">
460 |   <mi arg="a">A</mi>
461 |   <mi arg="op" intent="transpose">T</mi>
462 | </msup>
463 | 
464 |
transpose of A
A superscript T end superscript
465 |
466 |

However, with a property, this example might be read differently.

467 |
468 |
469 | <msup intent="$op :postfix ($a)">
470 |   <mi arg="a">A</mi>
471 |   <mi arg="op" intent="transpose">T</mi>
472 | </msup>
473 | 
474 |
A transpose
475 |
476 | 477 |
478 |
479 | <msup intent="derivative($a)">
480 |   <mi arg="a">f</mi>
481 |   <mi>′</mi>
482 | </msup>
483 | 
484 |
derivative of f
f superscript prime end superscript
485 |
486 |
487 |
488 | <msup intent="x-prime">
489 |   <mi>x</mi>
490 |   <mo>′</mo>
491 | </msup>
492 | 
493 |
x prime
x superscript prime end superscript
494 |
495 | 496 |

Custom accessible descriptions, such as author-preferred variable or operator names, can also be annotated compositionally, via the underscore function.

497 |

The above notation could instead intend the custom name "x-new", which we can mark with a single literal `intent="_x-new"`, or as a compound narration of two arguments:

498 |
499 |
500 | <msup intent="_($base,$script)">
501 |   <mi arg="base">x</mi>
502 |   <mo arg="script" intent="_new">′</mo>
503 | </msup>
504 | 
505 |
x new
x superscript prime end superscript
506 |
507 | 508 |

Using the underscore function may also add clarity when the fragments of a compound name are explicitly localized. A cyrillic (Bulgarian) example:

509 |
510 |
511 | <msup intent="_($base,$script)">
512 |   <mi arg="base" intent="_хикс">x</mi>
513 |   <mo arg="script" intent="_прим">′</mo>
514 | </msup>
515 | 
516 |
хикс прим
x superscript prime end superscript
517 |
518 | 519 |

Alternatively, the narration of individual fragments could be fully delegated to AT, while still specifying their grouping:

520 |
521 |
522 | <msup intent="_($base,$script)">
523 |   <mi arg="base">x</mi>
524 |   <mo arg="script">′</mo>
525 | </msup>
526 | 
527 |
x prime
x superscript prime end superscript
528 |
529 | 530 |

An overbar may represent complex conjugation, or mean (average), again with possible readings with and without intent:

531 | 532 |
533 |
534 | <mover intent="conjugate($v)">
535 |   <mi arg="v">z</mi>
536 |   <mo>&#xaf;</mo>
537 | </mover>
538 | <mtext>&#x00A0;<!--nbsp-->is not&#x00A0;<!--nbsp--></mtext>
539 | <mover intent="mean($var)">
540 |   <mi arg="var">X</mi>
541 |   <mo>&#xaf;</mo>
542 | </mover>
543 | 
544 | 545 |
conjugate of z is not mean of X
546 | z with bar above is not X with bar above
547 |
548 | 549 |

The intent mechanism is extensible through the use of [=unsupported concept=] names. 550 | For example, assuming that the Bell Number is not present in any of the dictionaries, 551 | the following example

552 |
553 |
554 | <msub intent="bell-number($index)">
555 |   <mi>B</mi>
556 |   <mn arg="index">2</mn>
557 | </msub>
558 | 
559 |

will still produce the expected reading:

560 |
bell number of 2
561 |
562 | 563 |
564 |

CSS and Style

565 | 566 |

CSS customization of MathML is generally not made available to AT and is ignored 567 | in accessible readouts. 568 | In cases where authors have meaningful stylistic emphases, 569 | or stylized constructs with custom names, using an intent attribute is appropriate. 570 | For example, color-coding of subexpressions is often helpful in teaching materials:

571 |
572 |
573 | <mn>1</mn><mo>+</mo>
574 | <mrow style="padding:0.1em;background-color:lightyellow;"
575 |       intent="highlighted-step($step)">
576 |   <mfrac arg="step"><mn>6</mn><mn>2</mn></mfrac>
577 | </mrow>
578 | <mi>x</mi>
579 | <mo>=</mo>
580 | <mn>1</mn><mo>+</mo>
581 | <mn style="padding:0.1em;background-color:lightgreen;"
582 |     intent="highlighted-result(3)">3</mn>
583 | <mi>x</mi>
584 | 
585 |
one plus highlighted step of six over two end highlighted step x 586 | equals one plus highlighted result of three end highlighted result x 587 |
588 |
589 |
590 | 591 |
592 |

Tables

593 | 594 |

The <mtable> element is 595 | used in many ways, for denoting matrices, systems of equations, 596 | steps in a proof derivation, etc. In addition to these uses it 597 | may be used to implement forced line breaking and alignment, 598 | especially for systems that do not implement 599 | [[[#presm_linebreaking]]], or for conversions from (La)TeX where 600 | alignment constructs are used in similar ways.

601 |

Whenever a kind of tabular construct has an associated property, 602 | it is usually better to use only the property and allow AT to infer 603 | how to speak navigate the expression. By use of properties in this way the 604 | author can give hints to the speech generation and generate 605 | speech suitable for a list of aligned equations rather than say a matrix.

606 | 607 |

When core properties are insufficient to represent a tabular 608 | layout, the use of intent concept names and, if appropriate, also 609 | properties from the open list of properties should be used to 610 | convey the desired speech and navigation of the tabular 611 | layout. Because of the likely complexity of these layouts, 612 | testing with AT should be done to verify that users hear the 613 | expression as the author intended.

614 | 615 | 616 | 617 |

Matrices

618 |
619 |
620 | <mrow intent='$m'>
621 |   <mo>(</mo>
622 |   <mtable arg='m' intent=':matrix'>
623 |     <mtr>
624 |       <mtd><mn>1</mn></mtd>
625 |       <mtd><mn>0</mn></mtd>
626 |     </mtr>
627 |     <mtr>
628 |       <mtd><mn>0</mn></mtd>
629 |       <mtd><mn>1</mn></mtd>
630 |     </mtr>
631 |   </mtable>
632 |   <mo>)</mo>
633 | </mrow>
634 | 
635 |
636 | The 2 by 2 matrix;
637 | column 1; 1;
638 | column 2; 0;
639 | column 1; 0;
640 | column 2; 1;
641 | end matrix 642 |
643 |
644 | 645 | 646 |

Aligned equations

647 |
648 |
649 | <mtable intent=':equations'>
650 |   <mtr>
651 |     <mtd columnalign="right">
652 |       <mn>2</mn>
653 |       <mo>&#x2062;<!--InvisibleTimes--></mo>
654 |       <mi>x</mi>
655 |     </mtd>
656 |     <mtd columnalign="center">
657 |       <mo>=</mo>
658 |     </mtd>
659 |     <mtd columnalign="left">
660 |       <mn>1</mn>
661 |     </mtd>
662 |   </mtr>
663 |   <mtr>
664 |     <mtd columnalign="right">
665 |       <mi>y</mi>
666 |     </mtd>
667 |     <mtd columnalign="center">
668 |       <mo>></mo>
669 |     </mtd>
670 |     <mtd columnalign="left">
671 |       <mi>x</mi>
672 |       <mo>-</mo>
673 |       <mn>3</mn>
674 |     </mtd>
675 |   </mtr>
676 | </mtable>
677 | 
678 |
679 | 2 equations,
680 | equation 1; 2 x, is equal to, 1;
681 | equation 2; y, is greater than, x minus 3; 682 |
683 |
684 | 685 |

Aligned Equations with wrapped expressions

686 | 687 |
688 |
689 | <mtable intent=':equations'>
690 |   <mtr>
691 |     <mtd columnalign="right">
692 |       <mi>a</mi>
693 |     </mtd>
694 |     <mtd columnalign="center">
695 |       <mo>=</mo>
696 |     </mtd>
697 |     <mtd columnalign="left">
698 |       <mi>b</mi>
699 |       <mo>+</mo>
700 |       <mi>c</mi>
701 |       <mo>-</mo>
702 |       <mi>d</mi>
703 |     </mtd>
704 |   </mtr>
705 |   <mtr intent=':continued-row'>
706 |     <mtd columnalign="right"></mtd>
707 |     <mtd columnalign="center"></mtd>
708 |     <mtd columnalign="left">
709 |       <mo form="infix">+</mo>
710 |       <mi>e</mi>
711 |       <mo>-</mo>
712 |       <mi>f</mi>
713 |     </mtd>
714 |   </mtr>
715 | </mtable>
716 | 
717 |
718 | 1 equation; a, is equal to, b plus c minus d; plus e minus f; 719 |
720 |
721 |
722 |
723 | 724 | 725 | 726 |
727 | -------------------------------------------------------------------------------- /src/introduction.html: -------------------------------------------------------------------------------- 1 |
2 |

Introduction

3 | 4 | 5 | 6 | 7 |
8 |

Mathematics and its Notation

9 | 10 |

Mathematics and its notations have evolved over several centuries, or even millennia. 11 | To the experienced reader, mathematical notation conveys 12 | a large amount of information quickly and compactly. 13 | And yet, while the symbols and arrangements of the notations 14 | have a deep correspondence to the semantic structure and meaning 15 | of the mathematics being represented, the notation and semantics 16 | are not the same. The semantic symbols and structures are 17 | subtly distinct from those of the notation.

18 | 19 |

Thus, there is a need for a markup language 20 | which can represent both the traditional displayed notations 21 | of mathematics, as well as its semantic content. 22 | While the traditional rendering is useful to sighted readers, 23 | the markup language must also support accessibility. 24 | The semantic forms must support a variety of computational purposes. 25 | Both forms should be appropriate to all educational levels from 26 | elementary to research.

27 |
28 | 29 |
30 |

Overview

31 | 32 |

33 | MathML is a markup language for describing mathematics. 34 | It uses XML syntax when used standalone or within other XML, 35 | or HTML syntax when used within HTML documents. 36 | Conceptually, MathML consists of two main strains of markup: 37 | Presentation markup is used to display mathematical expressions; 38 | and Content markup is used to convey mathematical meaning. 39 | These two strains, along with other external representations, 40 | can be combined using parallel markup. 41 |

42 | 43 |

44 | This specification is organized as follows: 45 | discusses Fundamentals common to Presentation and Content markup; 46 | and cover Presentation and Content markup, 47 | respectively; 48 | discusses how markup may be annotated, particularly for accessibility; 49 | discusses how markup may be annotated so that Presentation, Content and other formats may be combined; 50 | addresses how MathML interacts with applications; 51 | Finally, a discussion of special symbols, 52 | and issues regarding characters, entities and fonts, 53 | is given in . 54 |

55 |
56 | 57 |
58 |

Relation to MathML Core

59 |

60 | The specification of MathML is developed in two layers. 61 | MathML Core ([[MathML-Core]]) covers (most of) Presentation Markup, 62 | with the focus being the precise details of displaying mathematics in web browsers. 63 | MathML Full, this specification, extends [[[MathML-Core]]] 64 | primarily by defining Content MathML, in . 65 | It also defines extensions to Presentation MathML consisting 66 | of additional attributes, elements or enhanced syntax of attributes. 67 | These are defined for compatibility with legacy MathML, 68 | as well as to cover , 69 | and other aspects not included in level 1 of [[[MathML-Core]]] 70 | but which may be incorporated into future versions of [[[MathML-Core]]]. 71 |

72 |

73 | This specification covers both MathML Core and its extensions; 74 | features common to both are indicated with 75 | , 76 | whereas extensions are indicated with . 77 |

78 |

79 | It is intended that MathML Full is a proper superset of MathML Core. 80 | Moreover, it is intended that any valid Core Markup be considered as valid Full Markup as well. 81 | It is also intended that an otherwise conforming implementation of MathML Core, 82 | which also implements parts or all of the extensions of MathML Full, 83 | should continue to be considered a conforming implementation of MathML Core. 84 |

85 | 86 | 87 | 88 |
89 |
90 |

MathML Notes

91 |

92 | In addition to these two specifications, the Math WG group has developed the non-normative 93 | [[[MathML-Notes]]] 94 | that contains additional examples and information to help understand best practices when using MathML. 95 |

96 |
97 |
98 | -------------------------------------------------------------------------------- /src/mathml-index.html: -------------------------------------------------------------------------------- 1 |
2 |

Index

3 | 4 | 5 | 6 | 7 |
8 |

MathML Elements

9 | 10 | 11 |

References to sections in which an element is defined are marked in bold.

12 | 13 |
14 | 15 |
16 |

MathML Attributes

17 | 18 | 19 |

In addition to the standard MathML attributes, some attributes from 20 | other namespaces such as Xlink or XML Schema are also listed here.

21 | 22 |
23 |
-------------------------------------------------------------------------------- /src/mmlindex.html: -------------------------------------------------------------------------------- 1 |
2 |

MathML Index

3 |
4 |

Index of elements

5 |
6 |
7 | 8 |
9 |
10 | -------------------------------------------------------------------------------- /src/parsing-1.html: -------------------------------------------------------------------------------- 1 |
2 |

Validating MathML

3 | 4 |

The Relax NG schema may be used to check the XML serialization of 5 | MathML and serves as a foundation for validating other serializations 6 | of MathML, such as the HTML serialization.

7 |

Even when using the XML serialization, some normalization of 8 | the input may be required before applying this schema. Notably, 9 | following HTML, [[MathML-Core]] allows attributes such as 10 | onclick to be specified in any case, eg 11 | OnClick="...". 12 | It is not practically feasible to specify that attribute names are 13 | case insensitive here so only the lowercase names are allowed. 14 | Similarly any attribute with name starting with the prefix 15 | data- should be considered valid. The schema here only 16 | allows a fixed attribute, data-other, so input should be 17 | normalized to remove data attributes before validating, or the schema 18 | should be extended to support the attributes used in a particular 19 | application.

20 | 21 |
22 | 23 | -------------------------------------------------------------------------------- /src/parsing-2.html: -------------------------------------------------------------------------------- 1 |
2 |

Using the MathML DTD

3 | 4 |

The MathML DTD uses the strategy outlined in 5 | [[?Modularization]] to allow the use of namespace prefixes 6 | on MathML elements. However it is recommended that 7 | namespace prefixes are not used in XML serialization of 8 | MathML, for compatibility with the HTML serialization.

9 | 10 |

Note that unlike the HTML serialization, when using the 11 | XML serialization, character entity references such as 12 | &int; may not be used unless a DTD is 13 | specified, either the full MathML DTD as described here or the 14 | set of HTML/MathML entity declarations as specified by [[Entities]]. 15 | Characters may always be specified by using character data directly, or numeric character references, so 16 | or &#x222B; rather than 17 | &int;.

18 | 19 |
20 | 21 | -------------------------------------------------------------------------------- /src/parsing-3.html: -------------------------------------------------------------------------------- 1 |
2 |

Using the MathML XML Schema

3 | 4 |

MathML fragments can be validated using the XML Schema for MathML, 5 | located at http://www.w3.org/Math/XMLSchema/mathml4/mathml4.xsd. The 6 | provided schema has been mechanically generated from the Relax NG schema, it omits 7 | some constraints that can not be enforced using XSD syntax.

8 | 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /src/privacy.html: -------------------------------------------------------------------------------- 1 |
2 |

Privacy Considerations

3 |

Web platform implementations of MathML should implement [[MathML-Core]], 4 | and so the Privacy Considerations specified there apply.

5 |
6 | 7 | -------------------------------------------------------------------------------- /src/respec.rnc: -------------------------------------------------------------------------------- 1 | start = html|section 2 | 3 | html = element html {head,body} 4 | 5 | head = element head {meta+,title,link*,script*,style*} 6 | 7 | meta = element meta { 8 | attribute charset {"UTF-8"} | 9 | (attribute http-equiv {text} , attribute content {text}) 10 | } 11 | 12 | style = element style { 13 | attribute class {"removeOnSave"}?, 14 | text} 15 | 16 | script = element script { 17 | attribute class {"remove"|"removeOnSave"}?, 18 | attribute type {"module"}?, 19 | (attribute src {text} | text) 20 | } 21 | 22 | link = element link { 23 | attribute rel {"stylesheet"}, 24 | attribute type {"text/css"}, 25 | attribute href {text} 26 | } 27 | 28 | 29 | title = element title {text} 30 | 31 | section = element section { 32 | attribute class {list {("appendix"|"informative"|"fold")+}}?, 33 | attribute data-max-toc {xsd:integer}?, 34 | (h2|h3|h4|h5|h6|attribute id {text}),divcontent*} 35 | 36 | section-include = element section { 37 | attribute data-include {text}, 38 | attribute data-oninclude {text}?, 39 | attribute data-oninclude-format {"text"|"html"}?, 40 | attribute data-include-replace{"true"}? 41 | } 42 | pre-include = element pre { 43 | attribute class {text}?, 44 | attribute style {text}?, 45 | attribute data-include {text}, 46 | attribute data-include-format {"text"|"html"}, 47 | attribute data-oninclude {text}?, 48 | attribute data-oninclude-format {"text"|"html"}?, 49 | attribute data-include-replace{"true"}? 50 | } 51 | 52 | body = element body {divcontent} 53 | 54 | divcontent=((\div|p|blockquote|pre|pre-include|table|ul|ol|dl|inlinecontent|script|section|section-include)*) 55 | inlinecontentnoa=((text|b|i|em|strong|code|q|sub|sup|hr|br|span|dfn|img|svg|button)*) 56 | inlinecontent=((inlinecontentnoa|a)*) 57 | 58 | \div = element \div { 59 | attribute data-number {xsd:integer}?, 60 | attribute class {text}?, 61 | attribute style {text}?, #FIX 62 | attribute id {text}?, 63 | attribute tabindex {text}?, 64 | attribute role {text}?, 65 | h6?, #FIX 66 | attribute title {text}?, 67 | (divcontent|label|input)* 68 | } 69 | 70 | button = element button { 71 | attribute class {text}?, 72 | attribute style {text}?, 73 | attribute id {text}?, 74 | attribute tabindex {text}?, 75 | attribute onclick {text}?, 76 | text} 77 | 78 | p = element p { 79 | attribute data-number {xsd:integer}?, 80 | attribute class {text}?, 81 | attribute style {text}?, 82 | attribute id {text}?, 83 | (inlinecontent|label|input)* 84 | } 85 | 86 | blockquote = element blockquote { 87 | attribute class {text}?, 88 | attribute style {text}?, 89 | attribute id {text}?, 90 | (divcontent|label|input)* 91 | } 92 | pre = element pre { 93 | attribute class {text}?, 94 | attribute style {text}?, 95 | attribute id {text}?, 96 | inlinecontent 97 | } 98 | 99 | 100 | # should always use tbody, should lose cellpadding,rowsep 101 | table = element table { 102 | attribute border {"1"}?, # FIX 103 | attribute class {text}?, 104 | attribute style {text}?, # FIX 105 | attribute id {text}?, 106 | attribute rowsep {text}?, 107 | attribute cellpadding {text}?, 108 | (caption?,colgroup?,thead?,tbody+,tfoot?) 109 | } 110 | 111 | caption = element caption { 112 | inlinecontent} 113 | 114 | colgroup = element colgroup { 115 | attribute span {text}?, 116 | col+ 117 | } 118 | 119 | col = element col { 120 | attribute span {text}?, 121 | attribute class {text}? 122 | } 123 | 124 | thead = element thead { 125 | tr+ 126 | } 127 | 128 | tbody = element tbody { 129 | attribute id {text}?, 130 | attribute class {text}?, 131 | tr+ 132 | } 133 | 134 | tfoot = element thead { 135 | tr+ 136 | } 137 | 138 | # should not allow empty tr 139 | tr = element tr { 140 | attribute class {text}?, 141 | (td|th)* 142 | } 143 | 144 | th = element th { 145 | attribute abbr {text}?, 146 | attribute id {text}?, 147 | attribute class {text}?, 148 | attribute style {text}?, 149 | attribute colspan {text}?, 150 | attribute rowspan {text}?, 151 | inlinecontent 152 | } 153 | 154 | # should lose width= 155 | td = element td { 156 | attribute id {text}?, 157 | attribute class {text}?, 158 | attribute style {text}?, 159 | attribute width {text}?, 160 | attribute colspan {text}?, 161 | attribute rowspan {text}?, 162 | (inlinecontent|\div|p|blockquote|pre|table|ol|ul|dl)* 163 | } 164 | 165 | ul = element ul { 166 | attribute class {text}?, 167 | li+ 168 | } 169 | 170 | ol= element ol { 171 | attribute class {text}?, 172 | li+ 173 | } 174 | 175 | li = element li { 176 | attribute id {text}?, 177 | attribute class {text}?, 178 | (inlinecontent|\div|table|ol|ul|p|pre)* 179 | } 180 | 181 | dl= element dl { 182 | attribute id {text}?, 183 | attribute class {text}?, 184 | (dt|dd)* 185 | } 186 | 187 | 188 | dt = element dt { 189 | attribute id {text}?, 190 | attribute class {text}?, 191 | attribute data-errortype {text}?, 192 | inlinecontent 193 | } 194 | dd = element dd { 195 | attribute class {text}?, 196 | (inlinecontent|\div|table|ul|ol|dl|p|pre)* 197 | } 198 | 199 | 200 | strong = element strong {inlinecontent} 201 | b = element b {inlinecontent} 202 | i = element i { 203 | attribute class {text}?, 204 | inlinecontent} 205 | em = element em {inlinecontent} 206 | code = element code { 207 | attribute data-diff {text}?, 208 | attribute data-namespace {"xhtml"|"openmath"|"mathml-error"|"future-mathml"|"svg"}?, 209 | attribute class {text}?, 210 | inlinecontent} 211 | sub = element sub {inlinecontent} 212 | sup = element sup {inlinecontent} 213 | q = element q {inlinecontent} 214 | 215 | hr = element hr { 216 | attribute class {text}?, 217 | attribute style {text}?, 218 | empty} 219 | 220 | 221 | img = element img { 222 | attribute align {"middle"}?, 223 | attribute class {text}?, 224 | attribute style {text}?, 225 | attribute src {text}, 226 | attribute alt {text}, 227 | empty} 228 | 229 | br = element br { 230 | attribute class {text}?, 231 | empty} 232 | 233 | h1 = element h1 { 234 | attribute class {text}?, 235 | attribute id {text}?, 236 | (text|br)* 237 | } 238 | 239 | h2 = element h2 { 240 | attribute class {text}?, 241 | attribute id {text}?, 242 | inlinecontent 243 | } 244 | 245 | h3 = element h3 { 246 | attribute class {text}?, 247 | attribute id {text}?, 248 | inlinecontent 249 | } 250 | 251 | 252 | h4 = element h4 { 253 | attribute class {text}?, 254 | attribute id {text}?, 255 | inlinecontent 256 | } 257 | 258 | 259 | h5 = element h5 { 260 | attribute class {text}?, 261 | attribute id {text}?, 262 | inlinecontent 263 | } 264 | 265 | h6 = element h6 { 266 | attribute class {text}?, 267 | attribute id {text}?, 268 | inlinecontent 269 | } 270 | 271 | span = element span { 272 | attribute class {text}?, 273 | attribute style {text}?, #FIX 274 | attribute id {text}?, 275 | attribute onclick {text}?, 276 | attribute data-diff {text}?, 277 | attribute title {text}?, 278 | inlinecontent} 279 | 280 | dfn = element dfn { 281 | attribute id {text}?, 282 | attribute data-dfn-for {text}?, 283 | inlinecontent} 284 | 285 | input= element input { 286 | attribute class {text}?, 287 | attribute style {text}?, 288 | attribute id {text}?, 289 | attribute type {"button"|"radio"|"checkbox"}?, 290 | attribute value {text}?, 291 | attribute onclick {text}?, 292 | attribute checked {"checked"}?, 293 | attribute autocomplete {"off"}?, 294 | attribute name {text}?, 295 | empty} 296 | 297 | label= element label { 298 | attribute class {text}?, 299 | attribute id {text}?, 300 | (inlinecontent|input)*} 301 | 302 | 303 | a = element a { 304 | attribute id {text}?, 305 | attribute class {text}?, 306 | attribute rel {"disclosure"}?, 307 | attribute href {text}?, 308 | attribute title {text}?, 309 | attribute onclick {text}?, 310 | attribute data-cite {text}?, 311 | attribute data-link-for {text}?, 312 | attribute data-link-type {"dfn"}?, 313 | inlinecontentnoa 314 | } 315 | 316 | 317 | # svg currently allows anything below svg 318 | 319 | svg = element svg { 320 | anysvg* 321 | } 322 | 323 | anysvg = (attribute * {text}*| element (title|path|g|desc|rect|defs|circle|use|text|tspan|polygon|filter|pattern|feComposite|feFlood|symbol|namedview|metadata|flowRoot|flowRegion|flowPara|polyline|line) { anysvg*}|text) 324 | 325 | # restricted inline mathml 326 | 327 | mml = (mi|mn|mo|msup|msub|msubsup|mfrac|mrow) 328 | math = element math { 329 | attribute class {"doc"}, 330 | attribute alttext {text}, 331 | mml+} 332 | mi = element mi {text} 333 | mn = element mn {text} 334 | mo = element mo {text} 335 | msub = element msub {mml,mml} 336 | msup = element msup {mml,mml} 337 | msubsup = element msubsup {mml,mml,mml} 338 | mfrac = element mfrac {mml,mml} 339 | mrow = element mrow {mml*} 340 | 341 | inlinecontentnoa |= math 342 | 343 | -------------------------------------------------------------------------------- /src/schemas.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/security.html: -------------------------------------------------------------------------------- 1 |
2 |

Security Considerations

3 |

Web platform implementations of MathML should implement [[MathML-Core]], 4 | and so the Security Considerations specified there apply.

5 |
6 | 7 | -------------------------------------------------------------------------------- /src/sotd.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |

Public discussion of MathML and issues of support through the W3C 5 | for mathematics on the Web takes place on the public mailing list of the Math Working 6 | Group (list archives). 7 | To subscribe send an email to www-math-request@w3.org 8 | with the word subscribe in the subject line. 9 | Alternatively, report an issue at this specification's 10 | GitHub repository.

11 |

12 | A fuller discussion of the document's evolution can be found in 13 | [[[#changes]]]. 14 |

15 |

Some sections are collapsed and may be expanded to reveal more details. 16 | The following button may be used to expand all such sections. 17 |

18 |
19 |
20 | -------------------------------------------------------------------------------- /w3c.json: -------------------------------------------------------------------------------- 1 | { 2 | "group": [35549] 3 | , "contacts": ["bert-github"] 4 | , "repo-type": "rec-track" 5 | } 6 | --------------------------------------------------------------------------------