Socket
Socket
Sign inDemoInstall

mathlive

Package Overview
Dependencies
3
Maintainers
1
Versions
168
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mathlive

A web component for math input


Version published
Weekly downloads
45K
decreased by-13.36%
Maintainers
1
Install size
8.23 MB
Created
Weekly downloads
 

Changelog

Source

0.98.6 2024-01-27

New Features

  • Added StaticRenderOptions.TeX.className to specify that an element with the specified class name should be rendered as a LaTeX formula.
  • #2273 Added a --keycap-width CSS variable to specify the width of a keycap in a virtual-keyboard. By default, if the CSS variable is not specified, the width of the keycap is calculated based on the width of the parent container. However, this requires browser that support the cq CSS unit. If the browser does not support the cq CSS unit, this CSS variable can be used to specify the width of the keycap. (See #2028, #2133)
  • #2255 Support for gather* environment
  • #2242 A virtual keyboard keycap can now include a tooltip for its shifted variant.

Issues Resolved

  • When using some APIs such as renderToMarkup() or renderToMathML() in a server-side environment, a runtime error would occur.
  • When tabbing in a mathfield with multiple prompts, tab out of the mathfield when the last or first prompt is reached.
  • **#2243##, **#2245** Unicode characters such as ² or are now interpreted as their LaTeX equivalent only when in math mode.
  • #2237 The command \iff now renders correctly
  • #2246 Changing the mf.value property would not always update the value of the mathfield.
  • #2244 Worked around an issue in Safari on iOS where doing a double-tap on the virtual keyboard would result in the mathfield losing focus and the virtualy keyboard closing.
  • #2252 At some viewport sizes, the integral sign in the symbols virtual keyboard would be clipped.
  • #2235 Improved serialization to ASCIIMath.
  • Avoid conflicts with some class names when rendering static math.
  • When using renderMathToElement() or renderMathInDocument(), coalesce adjacent text nodes.
  • Correctly parse the \cfrac optional alignment argument
  • The commands \bf, \bfseries, \mdseries, \upshape, \itshape, \slshape, \scshape, \rmfamily, \sffamily, \ttfamily are now interpreted correctly.
  • The command \operatorname is now spoken correctly
  • #2152 On Safari, fill-in-the-blank prompts containing a fraction were rendered incorrectly.

Readme

Source
math live

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.

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.

Keywords

FAQs

Last updated on 27 Jan 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc