Socket
Socket
Sign inDemoInstall

mathlive

Package Overview
Dependencies
3
Maintainers
1
Versions
170
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
50K
decreased by-15.01%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

0.93.0 2023-05-08

New Features

  • Support for \the command. For example, \the\year. Its argument can be a literal or a register, preceded by an optional factor literal.
  • In addition to the label property, the key property can also now be used for keycap shortcuts. This allow overriding of the shortcut label. For example {key: "[undo]", label: "undo"}
  • Added support for --keyboard-row-padding-left and --keyboard-row-padding-right as an option to account for shadows or other decoration that may spill outside the box of a keycap.
  • Fixed opacity of Undo button in virtual keyboard, when the button is not applicable.
  • The minFontScale property has been added that specifies the minimum font size that should be used for nested superscripts and fractions. The value should be between 0 and 1. The size is in releative em units relative to the font size of the math-field. The default value is 0, which allows the math-field to use its default sizing logic.
  • If no mathfield is focused the virtual keyboard will dispatch a keydown/keyup event pair. Add an event listener to the keyboard to receive those events.

Improvements

  • Improved performance of creation and destruction of mathfields by 50%.
  • Fixed memory and listener leaks. After creating, inserting in the DOM, then removing over 100,000, the memory is back to its starting point and there are no listeners left (except for those associated with the Virtual Keyboard).
  • Improved behavior of undo/redo. #1924 works in LaTeX mode. Undo shortcut substitution. Repeated operations (e.g. backspace) are considered a sinle operation for undo/redo purposes.
  • Importing the Compute Engine and MathLive in the same projec should no longer trigger a conflict.

Issues Resolved

  • #1646 mhchem: states of aggregation is now rendered correctly. Added support for the \mskip command
  • When editing a mathfield, after inserting both a superscript and subscript, the subscript would be offset from the superscript.
  • #1668 Correctly handle \space, ~
  • #1939 When the parent of the Mathfield is scaled, apply the scaling to the selection rectangles
  • Fixed parsing of emojis such as 🧑🏻‍🚀
  • The focus outline is no longer displayed when in readonly mode
  • #1940 New attempt to preserve the focus of mathfields when a window loses, then regains focus (when switching tabs, for example).
  • At certain sizes, the \left...\right command did not display the visual indicator that the caret was inside the argument of the command.

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 enables beautiful, TeX-quality typesetting. It's designed for mobile devices with an extensive set of virtual keyboards for math input, and is also compatible with screen readers, including custom math-to-speech support for improved accessibility. In addition, 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, and it 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.

<!DOCTYPE html>
<html lang="en-US">
  <body>
    <math-field>f(x)=</math-field>
    <script src="https://unpkg.com/mathlive"></script>
  </body>
</html>

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 MathLive 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 08 May 2023

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