Skip to content

kedyou/mathlive

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

math live

Kedyou's fork of MathLive

A Web Component for Math Input

Maintenance GitHub license

MathLive is a powerful web component that provides an easy-to-use interface for editing math formulas.

With over 800 built-in LaTeX commands, MathLive renders beautiful, TeX-quality typesetting.

It's designed for mobile devices with an extensive set of virtual keyboards for math input, and is compatible with screen readers, including custom math-to-speech support for improved accessibility.

MathLive outputs to LaTeX, MathML, ASCIIMath, and MathJSON formats, making it incredibly versatile.

And the best part? It's easy to customize to your needs!

The popover panel A Virtual Keyboard
The Loop Equation

🚀 Getting Started

Using MathLive is easy! Simply add a <math-field> tag to your page. It initializes automatically and works just like a <textarea> or <button> element. You can manipulate the mathfield using methods of the element and listen for events to be notified when its internal state changes.

npm install mathlive

import 'mathlive';
<!DOCTYPE html>
<html lang="en-US">
  <body>
    <math-field>f(x)=</math-field>
  </body>
</html>

You can also add it using CDN

<head>
    <script src="https://unpkg.com/mathlive"></script>
</head>

Check documentation for React and interaction with Mathfield.

📖 Documentation

MathLive has an extensive set of documentation to help you get started, including guides on interacting with a mathfield, customizing it, executing commands, defining custom LaTeX macros, managing inline and keyboard shortcuts, controlling speech output, and displaying static math formulas. You can find all of these guides on the CortexJS.io website.

In addition to the guides, you can also find reference documentation of the MathLive API on the MathLive SDK page.

⋯ Related Projects

MathJSON (on GitHub)
A lightweight data interchange format for mathematical notation.
Compute Engine (on GitHub)
The CortexJS Compute Engine performs calculations on MathJSON expressions
Cortex (on GitHub)
Cortex is a programming language for scientific computing

💬 Contact Us

📃 License

This project is licensed under the MIT License.

Kedyou

The Kedyou modification of MathLive allows users to type multi-lined math quickly and easily, simplifying the inputs to create and modify aligned environments.

Update with the latest changes from arnog:

# Add the remote, call it "upstream":
git remote add upstream https://github.com/arnog/mathlive/
# Fetch all the branches of that remote into remote-tracking branches
git fetch upstream
# Make sure that you're on your master branch:
git checkout master
# Rewrite your master branch so that any commits of yours that
# aren't already in upstream/master are replayed on top of that
# other branch:
git rebase upstream/master
# After finishing rebase/merging changes, force push
git push --force

Local testing

To test the MathLive in Kedyou before publishing, use pnpm link --global:

# In mathlive repo
pnpm link --global
# In the kedyou-frontend repo
pnpm link --global @kedyou/mathlive

sites/frontend/package.json

-"@kedyou/mathlive": "^0.98.6"
+"@kedyou/mathlive": "link:^0.98.6"

About

A web component for easy math input

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 84.1%
  • HTML 5.9%
  • JavaScript 4.9%
  • Less 4.1%
  • Other 1.0%