MathML代表数学标记语言,是一个基于XML的应用程序。它用于描述数学和科学符号。它是1和2版本由数学工作组创建和开发的,该工作组是1996- 2004年最早的W3C工作组之一。MathML第3版是在Math Working Group的第二个活动期(2006)创建的,是ISO标准。
This tutorial will cover MathML basics and its commands available in version 3. We are using MathJax library to render MathML syntax so that it can run on all major browsers. MathJax is a javascript based platform to draw mathematical expressions and symbols in web applications.
This tutorial is designed for all those individuals who are looking for a starting point of learning MathML commands using MathJax and we cover topics suited for a beginner and an advanced user.
Before proceeding with this tutorial it is advisable for you to understand the basics concepts of HTML and CSS. But the tutorial is self contained and you will be able to learn on various concepts of MathML even if you are a beginner. You just need to have a basic understanding of working with a simple text editor and command line.
We"ve used MathJax 2.6 using the MathJax Content Distribution Network (CDN) by putting following code snippet in head section of our demo html pages:
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"],["(",")"]] }, "HTML-CSS": { linebreaks: { automatic: true } }, SVG: { linebreaks: { automatic: true } } MathML: { extensions: ["mml3.js"] } }); </script>
For most of the examples given in this tutorial you will see,the output. Just right click over the expression. Select following options from context menu: Show Math As > MathML Code to see the source code.
<math xmlns="http://www.w3.org/1998/Math/MathML"> <mfrac linethickness="1pt"> <mrow> <mi>a</mi> <mo>+</mo> <mn>1</mn> </mrow> <mi>b</mi> </mfrac> </math>