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.53.3

Diff

Changelog

Source

0.53.3 2020-06-24

Issues Resolved

  • #504 "Spacing is inconsistent after editing"

    The spacing of operators should be adjusted depending on what's around them: there is less space after a "-" sign when used as an infix operator than there is around a "-" sign used as a prefix operator (i.e. "-4" vs "3-4").

    The code that was handling this was accounting for it by modifying the type of the element. This worked well enough for static rendering, but for dynamic rendering (i.e. editing), once modified the previous type of the element was lost and could not be restored (i.e. after deleting the atom in front of a "-" sign, the "-" was no longer a binary operator but a regular symbol).

    This is now handled during layout without modifying the type of the element.

  • Workaround for a Safari bug where in some cases the caret would not blink.

  • #505 More consistent spacing between elements. Previously some Unicode math spacing characters were used. However, these characters are not rendered consistently. Switched to using CSS margins instead.

  • The LaTeX generated for a \left command with another command as a fence was lacking a space, e.g. \left\lbracka\right\rbrack instead of \left\lbrack a\right\rbrack

  • Smart fence for square brackets was not working correctly.

  • Fixed smartmode to avoid converting a decimal point to text when entering, e.g. "314.1576"

  • The alt/option+V shortcut now correctly inserts a placeholder in the square root

  • The "\arcos" function was incorrectly spelled "\arccos".

New Feature

  • #508 In order to better support some deployment configurations, added a 'mathlive-fonts.css' file to the distribution package.

    This is intended to be used by build/bundle environments that have an asset pipeline that can move/rename assets, including the font-files

    Note that this method is not recommended. It will result in some cases where the layout is incorrect until the page is reloaded (especially for formulas using large symbols such as integrals or large parentheses).

    To use it, add the following to the web pages using MathLive:

<link rel="stylesheet" href="dist/mathlive-fonts.css" />
arnog
published 0.53.2 •

Changelog

Source

0.53.2 2020-06-10

Issues Resolved

  • Adjusted height of square root (there was some extra blank space above)
  • Ensure that the 'dt' inline shortcut does not trigger when writing "width" (it should only apply in the math mode)
  • #492 Typing "/" to insert as fraction when some items were selected would result in an erroneous output.
arnog
published 0.53.1 •

Changelog

Source

0.53.1 2020-06-01

Issues Resolved

  • In the virtual keyboard, use \scriptstyle to display small symbols
  • Better vertical alignment of extensible arrows
  • Don't display a double caret after a \leftright
arnog
published 0.53.0 •

Changelog

Source

0.53.0 2020-05-31

Breaking Change / New Feature

  • #158 The CSS files mathlive.css and mathlive.core.css have been deprecated and removed from the distribution.

    The necessary CSS is now injected dynamically into the page. This simplifies the use of the library, but also reduces the amount of CSS in the page, potentially improving performance. That's particularly the case when the virtual keyboard is not used, as the CSS stylesheet for the virtual keyboard is substantial, and it is now injected only when the keyboard is used.

    To transition, you should remove from your code any instance of:

    <link rel="stylesheet" href="mathlive.core.css" type="text/css" />
    <link rel="stylesheet" href="mathlive.css" type="text/css" />
    

    (the path to your CSS file may be different).

    You may need to specify the location of the 'fonts' directory. By default, the 'fonts' directory is expected to be next to the 'mathlive.js', 'mathlive.mjs' file. If you need to copy the 'fonts' directory to a different location, specify it using the Config.fontsDirectory option. It should be either a relative path or a full URL pointing to the directory that contains the fonts. (Fix for #425)

    You no longer need to manually specify the stylesheets when using renderMathInElement() or renderMathInDocument() either. The necessary stylesheet will get injected in the document as needed. Note that this stylesheet for these functions is smaller than the stylesheet used when the editor is in use. These two functions also gain a property to specify the location of the 'fonts' directory, if necessary (by default, the 'fonts' directory is expected to be next to the 'mathlive.js', 'mathlive.mjs' file.)

    In some rare cases, you may have used the CSS stylesheet without the MathLive library, for example, after you may have saved the output of latexToMarkup() to a database and use it to render later in a page. In that case, you would need to use the CSS stylesheet dist/mathlive-static.css, which is suitable for this use case. Note that it does reference a 'fonts' folder that may need to be adjusted. By default, the fonts folder should be placed next to the stylesheet. If you need a different location when using the static stylesheet, you will need to modify it.

  • #425 Added CSS variable --ML_keyboard-zindex to control the zindex of the virtual keyboard.

  • Add support for ^^ and ^^^^ constructs in LaTeX. See TexBook p. 56:

    There’s also a special convention in which ^^ is followed by two
    “lowercase hexadecimal digits,” 0–9 or a–f. With this convention, all 256 characters are
    obtainable in a uniform way, from ^^00 to ^^ff. Character 127 is ^^7f.
    

    XeTeX extends this convention with ^^^^ for four-digit Unicode characters.

  • Added support for more TeX primitives, including \string, \csname, \endcsname, \obeyspaces

  • Improved the handling of parameters (e.g. #1) to more accurately match the TeX behavior (previously parameters could only substitute for an entire argument, i.e. {#1}). They are now handled by replacing their value with their corresponding tokens.

  • Added support for \laplace and \Laplace symbols

Issues Resolved

  • #469 The keyboard layout on Linux was not detected correctly, resulting in some keys (such as arrows and backspace) not working correctly.

  • Integers in a LaTeX stream would not always be parsed correctly. As per the TeXBook, an integer can be preceded by an arbitrary number of "+", "-" or whitespace characters, so \char -+ +- "4A is valid and equivalent to \char"4A

  • Integers in a latex stream specified with a backtick ("alphabetic constant") would not be parsed correctly. Now \char`A gives the expected result (A).

  • Consecutive whitespace where not always coalesced.

  • The bounding box of the initial selection (before the 'first' atom was inserted) was incorrect.

  • The sizing commands (\huge, \small, \tiny, etc...) should not apply in 'math' mode.

arnog
published 0.52.0 •

arnog
published 0.51.0 •

Changelog

Source

0.51.0 2020-05-19

New Features

  • #450 Custom keybindings. A keybinding (also called keyboard shortcut) associate a keystroke combination on a physical keyboard with a command. MathLive previously had some built-in keybindings, but now they can be extended or replaced.

    See config.keybindings and Keybinding

  • Added setKeyboardLayout() and setKeyboardLayoutLocale() functions to customize the current physical keyboard layout

Improvements

  • #461 The array editing commands only worked in math mode. They now apply in text mode as well

  • #459: Add a placeholder for incomplete commands, for example entering \frac in command mode

  • Added some missing commands: <del>deleteNextChar</del> deleteForward, <del>deletePreviousChar</del> deleteBackward, deleteNextWord, deletePreviousWord, deleteToGroupStart, deleteToGroupEnd, deleteToMathFieldEnd, moveToSubscript, applyStyle, toggleVirtualKeyboard, hideVirtualKeyboard, showVirtualKeyboard

  • In some cases, the top of the placeholder character could be cut off

Issues Resolved

  • The Read Aloud feature would not work when a Neural Engine AWS voice was used (such as Joana or Matthew)

  • In the Vue wrapper, the onKeystroke handler would error

  • Styling (applying color, style) was disabled. This also affected mode change (i.e. alt+= to switch between text and math mode)

  • After completing a command in command mode (i.e. pressing the return key), the mode did not switch not math mode and remained in command mode.

arnog
published 0.50.8 •

Changelog

Source

0.50.8 2020-05-13

Improvements

  • The Symbols keyboard is now a top-level keyboard. Previously it was accessible only from the Roman keyboard
  • Added some standard LaTeX commands: \inf, \Pr, \liminf, \limsup
  • Added inline shortcuts for some commands: sinh, cosh, sec, csc, cot, arcsin, arccos, arctan
  • When generating LaTeX output, only insert spaces when necessary (i.e. after commands that are followed by a letter). Conversely, always generate the space when necessary (\rbrack a would generate \rbracka)
  • Minor rendering performance improvement

Issues Resolved

  • The absolute value character "|" (and other small delimiters) would be displayed in the wrong font (and too small)

  • The absolute value key from the virtual keyboard would insert '|#@|'

  • The 'sqrt' key from the virtual keyboard or keyboard shortcut (option+V) would do nothing. The problem affected any inline shortcut or key that included a '#0' argument when there was no selection

  • Fixed an issue with long inline shortcuts that could trigger text mode (e.g. 'arcsin') and never apply the inline shortcut

  • Do not trigger smart mode conversion with arrow keys

  • Fixed an issue on iOS 12 and Firefox/Android where the mathfield could not be focused (fix contributed by (https://github.com/beneater)

arnog
published 0.50.7 •

Changelog

Source

0.50.7 2020-05-11

  • Fix #448: Fix an issue where the "^" keyboard shortcut would not work
arnog
published 0.50.6 •

Changelog

Source

0.50.6 2020-05-11

  • Fix date stamping of declaration files
arnog
published 0.50.5 •

Changelog

Source

0.50.5 2020-05-10

  • Fix #311 Before making a build, check the correct version of node and npm are installed
  • Make the build system work better on Windows
  • Do not update /dist on each push
  • When using a UMD module, do not export 'default'
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc