New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mathlive

Package Overview
Dependencies
Maintainers
1
Versions
176
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.74.0

Diff

Changelog

Source

0.74.0 2022-06-06

Improvements

  • Improved API/workflow to control the behavior of the virtual keyboard when multiple mathfields are displayed in the page.

    In order to get a coordinated behavior between the mathfields, it is now only necessary to call makeSharedVirtualKeyboard().

    The use-shared-virtual-keyboard attribute is now only necessary when using a mathfield in an iframe.

    If the virtual-keyboard-mode attribute of mathfield is set to auto or onfocus, the virtual keyboard will activate and hide automatically. It is no longer necessary to set the mode to off and to listen for focus change event to show/hide the keyboard manually.

    If the virtual keyboard is visible and the focus changes between two mathfields, the virtual keyboard will stay visible (it will not hide with an animation, then get revealed again).

    If changing focus between two mathfields with identical keyboard configurations the keyboard will not blink (previously the keyboard would get destructed and reconstructed, even if its configuration was identical between two mathfields).

Issues Resolved

  • #1477 Undo/redo did not generate an input event
arnog
published 0.73.7 •

Changelog

Source

0.73.7 2022-05-29

Improvements

  • Preferably use serialized atoms for clipboard copy/paste operations. This internal format captures more of the editing state than the LaTeX representation.
  • Change the default textual output to clipboard to use $$ as a format indicator.

Issues Resolved

  • #1467 Improvements to the Typescript public declarations
  • #1475 Copying a formula containing a matrix could render the mathfield unresponsive
arnog
published 0.73.6 •

Changelog

Source

0.73.6 2022-05-28

Issues Resolved

  • #1466 In LaTeX mode, doing a Select All (cmd+A), then delete would put the mathfield in an inconsistent state
  • While in LaTeX mode, doing a Select All (cmd+A) with a partial command followed by an auto-complete suggestion would render the mathfield unresponsive
arnog
published 0.73.4 •

Changelog

Source

0.73.4 2022-05-27

Issues Resolved

  • Correctly export the Typescript declaration for some static functions.
  • When editing a formula that contains a matrix, the formatting of the matrix could change, for example when pasting some content.
  • #1465 The bounds of large operators (integral, sum) would not accept any content.
  • When setting the background color of an entire equation, the color command would not be generated.
  • #1445 Improve the \colorbox command, and other text mode commands, to be more interoperable when they contain math content (use $ and $$ rather than \\( and \\[))
  • #1443 On mobile, prevent the focus from changing while the alternate key panel is up
arnog
published 0.73.3 •

arnog
published 0.73.2 •

arnog
published 0.73.1 •

Changelog

Source

0.73.1 2022-05-24

Issues Resolved

  • Using macros without arguments (e.g. \RR) could result in incorrect LaTeX
  • The virtual keyboard could become invisible when re-focusing a mathfield
  • Typing a , (comma) would be rendered as a . (dot)
arnog
published 0.73.0 •

Changelog

Source

0.73.0 2022-05-23

Breaking Changes

  • The following attributes of the <math-field> element that were previously boolean attributes are now enumerated attributes.

    A boolean attribute has a value of true if present and false if absent (it's an HTML standard thing).

    An enumerated attribute has an explicit value, usually a string.

    As a result of this change the default value of some mathfield attributes have changed from false to true.

    • keypress-vibration: "on" | "off" | "" (default "on")
    • remove-extraneous-parentheses: "on" | "off" | "" (default "on")
    • smart-fence: "on" | "off" | "" (default "on")
    • smart-superscript: "on" | "off" | "" (default "on")
    • smart-mode: "on" | "off" | "" (default"off")

If you previously used:

<math-field></math-field>

in order to preserve the same settings, you would now use:

<math-field
  keypress-vibration="off"
  remove-extraneous-parentheses="off"
  smart-fence="off"
  smart-superscript="off"
></math-field>
  • The commands \mleft and \mright are no longer generated automatically.

    Previously, when using smart-fence mode, () or \left(...\right), could be replaced with a \mleft(...\mright) command. This was done to ensure the proper spacing of delimiters after a function, e.g. \sin(x). Without it, there is excessive space between the function and the delimiter.

    Now the \left...\right command automatically adjust its left spacing based on the symbol to its left. If the symbol to its left is a function, the spacing will be tighter. Therefore, \mleft...\mright are no longer required, although they are still recognized as valid commands.

    This change was made because not every LaTeX environment recognize the \mleft...\mright commands, and this caused interoperability issues.

New Features

  • Comma , as a decimal separator

    The options.decimalSeparator option can be set to . or ,. The default value is . which corresponds to the current behavior.

    When set to ,, pressing the , key on the keyboard will insert a {,} LaTeX string, if in math mode and if before a digit. The LaTeX sequence {,} is traditionally used to correctly typeset the comma and ensure the correct amount of space around it. Without the {}, the , is interpreted as a delimiter and has excessive amount of space around it.

    The virtual keyboard is also changed so that the . key is , instead and also contextually insert a {,} when appropriate.

    A new command insertDecimalSeparator has also been added, which inserts either {,} if in math mode, right after a digit, and when decimalSeparator is set to ",". Otherwise, it inserts a "."

  • Multi character symbols

    The onMulticharSymbol() hook provides an opportunity to recognize multi character symbols and wrap them in an appropriate command.

    For example typing speed [\ \to ] \mathrm{speed}

    While conventionally \mathrm{} is frequently used to denote multicharacter symbols in LaTeX, in some contexts \mathit can also be used, for example using \mathrm to indicate multicharacter function names, but \mathit for multicharacter variable names.

    By default, the hook does nothing and multicharacter symbols are not recognized.

  • Support for the \mathnormal{} command, which displays text in italic and includes italic correction. As opposed to \mathit{} which displays text in italic, but without italic correction.

  • Correctly handle double-clicking words styled with \mathrm or \mathit

  • The appearance of the placeholder symbol has changed to stand out more. Also, the LaTeX generated for the default placeholder is now simply \placeholder{}. The argument of \placeholder{} was always optional, and is still supported. Only the default serialization of the \placeholder{} has changed.

Improvements

  • The MathJSON which is exported to the clipboard during copy/cut operations now include the verbatim LaTeX from the mathfield.

Issues Resolved

  • When extending the selection backwards over a captureSelection group, do not extend more than necessary
  • #1354 Correctly render {,}, which is used for French decimal point. Also correctly handle navigating with the keyboard, that is, handle it as a single character, not a group. Also correctly render it to MathML (as a .).
  • The "contains highlight" and selection rectangles would not always account for the children of the expression, for example with \sqrt{\frac12}
  • The LaTeX output of subscript or superscripts was incorrect when no value for the superscript/subscript was provided. For example, typing x, ^, right arrow, 2, would incorrectly serialize x^2. It now serializes x^{}2
  • Improved parsing and layout of functions with arguments, i.e. \sin\left(x\right). Previously, there would be an excessive amount of white space between the \sin and (. The expression is now correctly interpreted as a function.
  • #1459 When using a non-QWERTY physical keyboard layout, creating multiple mathfields could result in the keyboard layout being erroneously reset to QWERTY. This would manifest itself for example by the / keybinding no longer inserting a fraction.
  • #1462 When copying and pasting an expression that could not be parsed with the Compute Engine, the resulting pasted content was displayed as an error.
arnog
published 0.72.3 •

arnog
published 0.72.2 •

Changelog

Source

0.72.2 2022-04-30

Issues Resolved

  • #1427 An issue introduced in the previous release: the serialization to LaTeX of some functions (e.g. \log) failed.
  • Serialization to MathML of subscripts/superscripts was incorrect in some cases
  • In Chrome, setting the readonly attribute on mathfield caused the content of the mathfield to be set to empty.
  • #1431 AutoRender of static math expressions would not render correctly when using <script type='math/tex; mode=text'>. Auto-render could also fail catastrophically in some cases.
  • Cortexjs.io #15 When loading the fonts (and sounds), the origin of the library needs to be resolved to determine the relative location of those files. This was done with a http GET for each font file, which caused the entire library to be redownloaded multiple times. The base URL resolution is now only done once, and with a HEAD request to avoid the download. As a result, getting the MathLive library ready, especially when using a CDN and a slow network, is an order of magnitude faster.
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