Socket
Socket
Sign inDemoInstall

mathlive

Package Overview
Dependencies
Maintainers
1
Versions
171
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mathlive - npm Package Versions

1
18

0.85.1

Diff

Changelog

Source

0.85.1 2022-11-18

  • Updated to Compute Engine 0.11.0
arnog
published 0.85.0 •

Changelog

Source

0.85.0 2022-11-15

New Features

  • Added support for \mathtip{math}{tip} and \texttip{math}{tip} commands. These commands are also supported by MathJax.
  • Added options.enablePopover option which can be set to false to prevent the auto-complete popover from being displayed.
  • Changed the layout of the popover to display multiple options at once
  • Added the \error{} command which displays its content with a red underline.
  • A specific Compute Engine instance can be associated with a mathfield using mf.computeEngine = ce. If none is provided, a default Compute Engine instance is created when necessary. Setting the property to null will prevent the Compute Engine from being used, but the MathJSON format will not be available.

Improvements

  • Audio feedback is now using the Web Audio API. Previously, audio feedback was provided using an Audio element, but browsers have limitations to the number of Audio elements which can be instantiated in a page at a time, and this limit is reached surprisingly quickly wiht multiple mathfields on a page.
  • The window.mathlive global is now globalThis[Symbol.for("mathlive")]. This is mostly used internally for coordination between mathfields in the same context but it also includes the version property which may be of use for debugging or to report issues.

Issues Resolved

  • #1715, #1716: fill-in-the-blank placeholders inside a <math-field> did not inherit the options from their parent container.
arnog
published 0.84.0 •

Changelog

Source

0.84.0 2022-10-19

New Features

  • When using renderMathInElement or renderMathInDocument to render math content, the math content can now be provided as MathJSON in addition to LaTeX by using a <script> tag with a type of math/json.
<script type="math/json">
  ["Cos", ["Divide", "Pi", 7]]
</script>

Improvements

  • The MathfieldElement now has a setter for expression, which allows to set the value of a mathfield to a MathJSON expression.

Issues Resolved

  • #1669 Don't attempt to get the local URL base when using absolute URLs. Allow null as a value for fontsDirectory and soundDirectory to prevent any attempt to resolve these values.
arnog
published 0.83.0 •

Changelog

Source

0.83.0 2022-10-02

Improvements

  • When navigating with the keyboard from a numerator to a denominator (or any above/below branch), determine the new position of the caret visually, rather than by its index in the subexpression. Contributed by @manstie

  • Commands and key bindings to manipulate array/matrix:

    | Key Binding | Command | | :--------------------------------------------------------------------- | :---------------- | | <kbd>ctrl/⌘</kbd>+<kbd>;</kbd><br/><kbd>ctrl/⌘</kbd>+<kbd>RETURN</kbd> | addRowAfter | | <kbd>ctrl/⌘</kbd>+<kbd>shift</kbd>+<kbd>;</kbd> | addRowBefore | | <kbd>ctrl/⌘</kbd>+<kbd>,</kbd> | addColumnAfter | | <kbd>ctrl/⌘</kbd>+<kbd>shift</kbd>+<kbd>,</kbd> | addColumnBefore | | <kbd>ctrl/⌘</kbd>+<kbd>BACKSPACE</kbd> | removeRow | | <kbd>shift</kbd>+<kbd>BACKSPACE</kbd> | removeColumn |

    Contributed by @manstie

  • Updated to Compute Engine 0.8

Issues Resolved

  • The caret after an environment without fences (e.g. matrix, aligned, etc) would not be displayed.
arnog
published 0.82.0 •

Changelog

Source

0.82.0 2022-09-30

Improvements

  • Update Compute Engine to 0.7.0
arnog
published 0.81.0 •

Changelog

Source

0.81.0 2022-09-28

Improvements

  • #1639 When navigating with the keyboard from a cell in a matrix to another cell above or below, the new position of the caret is determined visually so that the caret is approximately in the same horizontal position. Previously, the position was determined by position/index. Contributed by @manstie. Thank you!
  • Expose the placeholders property on MathfieldElement to get access to the "fill-in-the-blank" mathfields, i.e. <math-field readonly>f(x)=\placeholder[var1]{x}</math-field>
  • Don't apply smart superscript on big operators (e.g. \sum). Smart superscript moves immediately out of the superscript if the input is a single digit. Works well for, e.g. x^2 but is less desirable with \sum.
arnog
published 0.80.0 •

Changelog

Source

0.80.0 2022-09-27

Issues Resolved

  • #1540 When changing the readonly or disabled attribute of a mathfield, hide the virtual keyboard if the mathfield had the focus.
  • #1641 A read-only mathfield would still accept inline shortcuts.
  • #1618 In some cases, on touch-capable devices the OS virtual keyboard would be displayed instead of the virtual keyboard.
  • #1620 On devices with a touch screen and a physical keyboard (Lenovo Yoga, Chromebooks), pressing the Enter key would input the string Enter into the mathfield.
  • #1631 Hit-testing detection improvements
  • #1640 An input event was dispatched when the value of the mathfield was changed programatically.
  • #1330 Make MathLive convertLatexToMarkup() usable from Node.js
  • #1641 Correctly render units in a chemical equation, e.g. \pu{123 kJ//mol}.
  • #1643 Physical units with multiplication are now rendered correctly, e.g. \pu{123 J*s}.

New Features

  • #1541 To be notified when the visibility of the virtual keyboard changes and using makeSharedVirtualKeyboard(), listen for the virtual-keyboard-toggle on the object returned by makeSharedVirtualKeyboard():
const k = makeSharedVirtualKeyboard();
k.addEventListener('virtual-keyboard-toggle', (ev) =>
  console.log('toggling ', ev)
);
  • The math-mode event is now cancelable (by calling .preventDefault() on the event). This can be used for example to turn off the ability to switch to the LaTeX editing mode:
// Prevent change to LaTeX (or text) mode
mf.addEventListener('mode-change', (ev) => ev.preventDefault(), {
  capture: true,
});
  • The command plonk was added. It plays a sound indicating an error, and can associated with a keybinding, or triggered with mf.executeCommand().
  • To determine the offset (caret position) in a mathfield given a viewport coordinate, use mf.offsetFromPoint().
  • #1641 Support for the \mathchoice command.
  • #1643 Support for the \kern, \mkern and \mspace command.
arnog
published 0.79.0 •

Changelog

Source

0.79.0 2022-09-06

Breaking Changes

  • The onMulticharSymbol handler has been renamed to onInlineShortcut
  • The deprecated modelHooks have been removed. Use the corresponding events instead: move-out, focus-out, announce.
  • The onModeChange, onReadAloudStatusChange, onBlur, onFocus, onContentWillChange, onContentDidChange, onSelectionDidChange, onUndoStateWillChange, onUndoStateDidChange and onCommit deprecated listeners have been removed. Used the corresponding events mode-change, read-aloud-status-change, blur, focus, beforeinput, input, selection-change, undo-state-change and change.
  • The onKeystroke handler has been removed. Instead use mf.addEventListener("keydown",...)
  • Improved editing of left-right delimiters:
    • keep leftright atom if only one of its delimiters is removed
    • only hoist body if both delimiters are removed

Improvements

  • More inline shortcut patterns are now recognized, which can be useful for more complex multicharacter symbols, e.g. alpha2 -> \alpha_{2}
  • Pressing the space bar will flush the inline shortcut buffer, allowing the input of a key combination that would otherwise trigger a shortcut
  • #1584 Pressing the spacebar when at the root level now does nothing. Previously it would jump at the end of the expression, which wasn't very useful and potentially confusing.
  • #1585 In some situations, improve the accuracy of the hit testing
  • Upconvert unicode characters to corresponding LaTeX command when available
  • When a scaling factor is applied to the mathfield or one of its DOM ancestors, correctly scale the selection background accordingly

Issues Resolved

  • #1042 Spacing atoms (e.g. \;) are now clickable and selectable
  • #1590 Improved selection of content inside tabular environments (matrix, etc...)
  • #1591 Improved cursor order when deleting values in fraction when fractionNavigationOrder mode is denominator-numerator.
  • #1592 When applying color to some math content, the command \mathcolor would be serialized. The correct command is \textcolor which despite its name is also applicable in math mode.
  • #1605 In some cases, clicking on the space between two atoms would not position the caret.
arnog
published 0.78.2 •

Changelog

Source

0.78.2 2022-08-18

Features

  • #1580 Added support for infix commands \brace and \brack. These commands are provided for improved compatibility with existing LaTeX content, but in general infix commands are not recommended to create new content.

Issues Resolveded

  • #1583 Changing the focus programatically could result in subsequent keyboard input being incorrect

  • #1581 Added padding to labels below and above extensible arrows (e.g. \xrightarrow)

  • The \ce command would not render chemical equations (regression).

arnog
published 0.78.1 •

Changelog

Source

0.78.1 2022-08-12

Issues Resolved

  • #1570 Multichar symbols (using onMulticharSymbol) would not always be recognized, for example when following a binary operator.

  • #1576 regression in 0.78.0: crash when entering Unicode characters with no special mapping, e.g. "°".

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc