MathLive: A Web Component for Math Input
![David](https://img.shields.io/david/dev/arnog/mathlive.svg)
See cortexjs.io for more info or try it at mathlive.io
Using MathLive
Editing Math
To add a mathfield element in your page use a <math-field>
tag. It works
just like a <textarea>
or <button>
. You can manipulate the mathfield using
methods of the element and listen for events to be notified when its internal
state changes.
<!DOCTYPE html>
<html lang="en-US">
<body>
<math-field>f(x)=</math-field>
<script src="https://unpkg.com/mathlive/dist/mathlive.min.js"></script>
</body>
</html>
Displaying Static Math
Render static math equations by
adding two lines to your web page.
<!DOCTYPE html>
<html lang="en-US">
<body>
<h1>Euler's Identity</h1>
<p>$$e^{i\pi} + 1 = 0$$</p>
<script type="module">
import { renderMathInDocument } from 'https://unpkg.com/mathlive/dist/mathlive.min.mjs';
renderMathInDocument();
</script>
</body>
</html>
Want to Help?
- Using MathLive in your project? Want to support the project ongoing maintenance?
Consider making a donation with PayPal
- Something wrong? Got ideas for new features? Write up an issue. Read about
Contributing and follow our Code of Conduct
- Want to contribute some code for an issue or a feature? Read the
Contributor Guide and the
docs. Looking for inspiration? Pick one of
the good first issues
More Questions?
License
This project is licensed under the MIT License.