Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
MathLive is a JavaScript library to render and edit math.
Try it at mathlive.io!
You can use MathLive to simply render math equations by adding a few lines to your web page.
<!doctype html><html lang="en-US">
<head>
...
<link rel="stylesheet" href="https://unpkg.com/mathlive/dist/mathlive.core.css">
<link rel="stylesheet" href="https://unpkg.com/mathlive/dist/mathlive.css">
<script src="https://unpkg.com/mathlive"></script>
</head>
<body>
<h1>Euler's Identity</h1>
<p>$$e^{i\pi} + 1 = 0$$</p>
<script>
MathLive.renderMathInDocument();
</script>
</body>
</html>
You can also incorporate a “math field” to edit math just like you would edit text. The MathLive APIs allow you to interact with the math field, including extracting its content, inserting placeholders and more.
<!doctype html><html lang="en-US">
<head>
...
<link rel="stylesheet" href="https://unpkg.com/mathlive/dist/mathlive.core.css">
<link rel="stylesheet" href="https://unpkg.com/mathlive/dist/mathlive.css">
</head>
<body>
<div id='mathfield'>f(x)=</div>
<script type='module'>
import MathLive from 'https://unpkg.com/mathlive/dist/mathlive.mjs';
MathLive.makeMathField('mathfield');
</script>
</body>
</html>
More examples are available at https://mathlive.io/deploy/examples/
The examples above use a CDN, which is the fastest and easiest way to get started. However, if you:
To do so:
$ npm install -s mathlive
$ npm run start
This will make a local build of MathLive, run a local HTTP server and open a page with the examples in your browser.
This project is licensed under the MIT License.
FAQs
A web component for math input
The npm package mathlive receives a total of 37,100 weekly downloads. As such, mathlive popularity was classified as popular.
We found that mathlive demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.