Skip to content

Commit

Permalink
Add some snippets (MathML).
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiedecock committed Aug 18, 2015
1 parent 0d3aeba commit b31226e
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 0 deletions.
28 changes: 28 additions & 0 deletions mathml/README.md
@@ -0,0 +1,28 @@
# MathML

## What is MathML?

"Mathematical Markup Language (MathML) is a mathematical markup language,
an application of XML for describing mathematical notations and capturing
both its structure and content. It aims at integrating mathematical
formulae into World Wide Web pages and other documents. It is a
recommendation of the W3C math working group and part of HTML5."
(https://en.wikipedia.org/wiki/MathML)

## Reference sites

- Renference (W3C): http://www.w3.org/Math/
- MathML reference (on Mozilla): https://developer.mozilla.org/en-US/docs/Web/MathML
- Mozilla MathML Project: https://developer.mozilla.org/en-US/docs/Mozilla/MathML_Project
- On wikipedia:
- https://en.wikipedia.org/wiki/MathML
- https://en.wikipedia.org/wiki/OpenMath
- The OpenMath Standard: http://www.openmath.org/standard/ (describes the semantic of formulae)
- MathML tutorials:
- http://danielscully.co.uk/projects/mathml-guide/
- http://rypress.com/tutorials/mathml/index

## Main alternative

- [MathJax](https://www.mathjax.org/)

24 changes: 24 additions & 0 deletions mathml/embedded_in_html5_example.html
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example of MathML embedded in an HTML5 file</title>
</head>
<body>
<h1>Example of MathML embedded in an HTML5 file</h1>
<p>
The area of a circle is
<math>
<mi>&pi;</mi>
<mo>&InvisibleTimes;</mo>
<msup>
<mi>r</mi>
<mn>2</mn>
</msup>
</math>.
</p>
<p>
Source: https://en.wikipedia.org/wiki/MathML
</p>
</body>
</html>
25 changes: 25 additions & 0 deletions mathml/embedded_in_xhtml_example.xhtml
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Example of MathML embedded in an XHTML file</title>
<meta name="description" content="Example of MathML embedded in an XHTML file"/>
</head>
<body>
<h1>Example of MathML embedded in an XHTML file</h1>
<p>
The area of a circle is
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mi>&#x03C0;<!-- π --></mi>
<mo>&#x2062;<!-- &InvisibleTimes; --></mo>
<msup>
<mi>r</mi>
<mn>2</mn>
</msup>
</math>.
</p>
<p>
Source: https://en.wikipedia.org/wiki/MathML
</p>
</body>
</html>
18 changes: 18 additions & 0 deletions mathml/example.xml
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mi>a</mi>
<mo>&InvisibleTimes;</mo>
<msup>
<mi>x</mi>
<mn>2</mn>
</msup>
<mo>+</mo>
<mi>b</mi>
<mo>&InvisibleTimes; </mo>
<mi>x</mi>
<mo>+</mo>
<mi>c</mi>
</mrow>
</math>
1 change: 1 addition & 0 deletions web/mathml

0 comments on commit b31226e

Please sign in to comment.