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

Beautifully typeset math made easy


Version published
Weekly downloads
54K
decreased by-7.86%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

0.0.15 2017-07-01

New Features

  • Properly exported public API, including renderMathInDocument() and renderMathInElement()
  • Added \enclose command, implementing the MathML equivalent.
  • Added \cancel, \bcancel and \xcancel commands
  • Added preserveOriginalContent option to MathLive.renderMathIn...()
  • Made \backslash work in text mode, for example when an argument of \rlap{}
  • Added revertToOriginalContent() when a math field is no longer needed for an element
  • Added customization of the command bar. See MathField.$setConfig() and config.commands
  • Added revertToOriginalContent() and getOriginalContent()
  • Added optional namespacing of data- attributes
  • Added onContentWillChange and onContentDidChange handlers in the math field config object.
  • Added tutorials and improved documentation

Issues Resolved

  • Fixed #5: AZERTY keyboard input was misbehaving, particularly for the ^ key
  • Dead keys (´, ^, ¨, ˜ and others on some keyboards) were not properly handled
  • Complex emojis (emojis made of multiple codepoints, such as emojis with skin tone modifiers, or emojis with a ZERO WIDTH JOINER, such as the David Bowie emoji) would be incorrectly recognized as multiple symbols
  • Fixed the \color command
  • Properly roundtrip to LaTeX \rlap, \color and many other commands. Now, copying content using these commands in a math field will result in the correct LaTeX code to be generated.

Readme

Source

Build Status David Greenkeeper badge Maintenance GitHub license

MathLive is a Javascript library to render and edit math.

It is fast, small and provides TeX-quality typesetting with an easy to use interface for math editing. Try it at mathlive.io!

The popover panel The command bar panel
The Loop Equation

How To Use MathLive

To display math

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="mathlive.core.css">
    <link rel="stylesheet" href="mathlive.css">
</head>
<body>
    <h1>Euler's Identity</h1>
    <p>$$e^{i\pi} + 1 = 0$$</p>

    <script src="mathlive.js"></script>
    <script>
        MathLive.renderMathInDocument();
    </script>
</body>
</html>

To edit math

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="mathlive/mathlive.core.css">
    <link rel="stylesheet" href="mathlive/mathlive.css">
</head>
<body>
    <div id='mathfield'>
        f(x)=
    </div>

    <script src="mathlive/mathlive.js"></script>
    <script>
        const mathfield = MathLive.makeMathField('mathfield');
    </script>
</body>
</html>

How You Can Help

  • Something wrong? Got ideas for new features? Write up an issue. Read about Contributing and follow our Code of Conduct
  • Want to use MathLive in your web page? The Usage Guide has all the details.
  • Want to contribute some code for an issue or a feature? Read the Contributor Guide and the docs. Looking for inspiration? Pick one of those open issues for beginners

More Questions?

License

This project is licensed under the MIT License.

Keywords

FAQs

Last updated on 02 Jul 2017

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