Socket
Socket
Sign inDemoInstall

mathlive

Package Overview
Dependencies
0
Maintainers
1
Versions
170
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

mathlive


Version published
Maintainers
1
Install size
4.65 MB
Created

Changelog

Source

0.58.0 2020-10-11

New Features

  • #225 Added onCommit listener to mf.options. This listener is invoked when the user presses Enter or Return key, or when the field loses focus and its value has changed since it acquired it. In addition, a change event is triggered when using a MathfieldElement. The event previously named change has been renamed to input. This mimics the behavior of <input> and <textarea> elements.

  • #225 Changed the keyboard shortcuts to add columns and rows:

    | Shortcut | Command | | :-------------------------------------------------- | :---------------- | | ctrl/cmd + Return/Enter | addRowAfter | | ctrl/cmd + shift + Return/Enter | addRowBefore | | ctrl/cmd + ; | addRowAfter | | ctrl/cmd + shift + ; | addRowBefore | | ctrl/cmd + , | addColumnAfter | | ctrl/cmd + shift + , | addColumnBefore |

    Note that Enter/Return no longer create a matrix/vector when inside a parenthesized expression. Use ctrl/cmd + Return/Enter instead.

  • Added a commit command to programmatically trigger the onCommit listener change event.

  • Added mount and unmount events to MathfieldElement

  • The $text() method, which is deprecated, was accidentally prematurely removed. It has been added back.

Issues Resolved

  • Inline shortcuts would not always be triggered correctly, for example x=sinx\sin instead of x=\sin
  • The text in tooltip was not vertically centered in narrow layouts (mobile devices)
  • #668 Extensible symbols, such as \xrightarrow were incorrectly treated as if they had an invisible boundary, resulting in the cursor being positioned incorrectly when navigating with the keyboard.

Readme

Source

math live

Screenshot

MathLive: A Web Component for Math Input

  • A Web Component easy to integrate in your project, regardless of the framework you use (or even if you use no framework)
  • Beautiful, TeX-quality typesetting
  • Easy to use interface for formula editing
  • Designed for mobile devices with an extensive set of virtual keyboards
  • Accessility support: screen reader compatible, and includes custom math-to-speech support
  • Outputs LaTeX, MathML and MathJSON (Abstract Syntax Tree)
  • And it is easy to customize to your needs!

Maintenance GitHub license Build Status David

See cortexjs.io for more info or try it at mathlive.io

The popover panel A Virtual Keyboard
The Loop Equation

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.

Keywords

FAQs

Last updated on 11 Oct 2020

Did you know?

Socket

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc