Socket
Socket
Sign inDemoInstall

mathlive

Package Overview
Dependencies
3
Maintainers
1
Versions
168
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
2345
17Next

0.98.6

Diff

Changelog

Source

0.98.6 2024-01-27

New Features

  • Added StaticRenderOptions.TeX.className to specify that an element with the specified class name should be rendered as a LaTeX formula.
  • #2273 Added a --keycap-width CSS variable to specify the width of a keycap in a virtual-keyboard. By default, if the CSS variable is not specified, the width of the keycap is calculated based on the width of the parent container. However, this requires browser that support the cq CSS unit. If the browser does not support the cq CSS unit, this CSS variable can be used to specify the width of the keycap. (See #2028, #2133)
  • #2255 Support for gather* environment
  • #2242 A virtual keyboard keycap can now include a tooltip for its shifted variant.

Issues Resolved

  • When using some APIs such as renderToMarkup() or renderToMathML() in a server-side environment, a runtime error would occur.
  • When tabbing in a mathfield with multiple prompts, tab out of the mathfield when the last or first prompt is reached.
  • **#2243##, **#2245** Unicode characters such as ² or are now interpreted as their LaTeX equivalent only when in math mode.
  • #2237 The command \iff now renders correctly
  • #2246 Changing the mf.value property would not always update the value of the mathfield.
  • #2244 Worked around an issue in Safari on iOS where doing a double-tap on the virtual keyboard would result in the mathfield losing focus and the virtualy keyboard closing.
  • #2252 At some viewport sizes, the integral sign in the symbols virtual keyboard would be clipped.
  • #2235 Improved serialization to ASCIIMath.
  • Avoid conflicts with some class names when rendering static math.
  • When using renderMathToElement() or renderMathInDocument(), coalesce adjacent text nodes.
  • Correctly parse the \cfrac optional alignment argument
  • The commands \bf, \bfseries, \mdseries, \upshape, \itshape, \slshape, \scshape, \rmfamily, \sffamily, \ttfamily are now interpreted correctly.
  • The command \operatorname is now spoken correctly
  • #2152 On Safari, fill-in-the-blank prompts containing a fraction were rendered incorrectly.
arnog
published 0.98.5 •

Changelog

Source

0.98.5 2023-12-27

Issues Resolved

  • When a font size command is inside a \left...\right command, apply the font size to the content of the command. As a result \frac34 + \left( \scriptstyle \frac12 \right) will now render as expected.

  • #2214 When using Linux or Windows with a German keyboard layout, typing the ^ key will now switch to superscript.

  • #2214 When typing Unicode characters such as ² or , correctly interpret them as their LaTeX equivalent. This also affects parsing of the value property.

  • #2000, #2063 A mathfield with multiple lines now generate correct LaTeX using the \displaylines command.

  • When a superscript or subscript is attached to a function, correctly position a following \left...\right command closer to the function.

  • When typing a superscript after f, g or some other function, correctly interpret the superscript as an exponent, not as a function argument.

  • #787, #1869 The f, g and h symbols are no longer hardcoded as symbols representing functions.

    Whether a symbol is considered a function affects the layout of a formula, specifically the amount of space between the symbol and a subsequent delimiter such as a parenthesis.

    Now whether a symbol should be treated as a function is determined by the MathfieldElement.isFunction hook.

    By the default, this hook uses the MathfieldElement.computeEngine to determine if the domain of a symbol is a function.

    This can be customized by setting the isFunction property of the mathfield or by declaring a symbol as a function using the declare() method of the compute engine. For example:

    MathfieldElement.computeEngine.declare("f", "Functions");
    

    In addition, a new isImplicitFunction hook has been added which can be used to indicate which symbols or commands are expected to be followed by an implicit argument. For example, the \sin function can be followed by an implicit argument without parentheses, as in \sin \frac{\pi}{2}. This affects the editing behavior when typing a / after the function. If an implicit function, the / will be interpreted as an argument to the function, otherwise it will be interpreted as a fraction with the function as the numerator.

  • The "phi" keycap in the virtual keyboard was incorrectly displaying the \varphi symbol. It now displays the \phi symbol.

  • #2227 Updating the content of the mathfield with mf.innerText will now correctly update the value of the mathfield.

  • #2225 For consistency with <textarea>, when setting the value change the selection to be at the end of the mathfield.

arnog
published 0.98.4 •

arnog
published 0.98.3 •

Changelog

Source

0.98.3 2023-12-07

Improvements

  • Improved contrast calculation for the checkmarks over color swatches, now using APCA.

  • In some situations, the virtual keyboard would not be displayed when the mathfield was focused and the mathVirtualKeyboardPolicy was set to "auto".

arnog
published 0.98.2 •

Changelog

Source

0.98.2 2023-12-06

Improvements

  • In some rare cases, the menu was not positioned correctly or would not display at all.

  • When dynamically changing the layout of the mathfield, for example when using a font-size attribute based on viewport units, correctly redraw the selection

  • Selection while dragging would stop after a few milliseconds

  • The "contains highlight" indicator is no longer displayed when the mathfield is not focused or when the indicator is outside of a prompt.

  • #2194 Ignore long press events when the pointer is a mouse.

Issues Resolved

  • #2195 If the mathfield had a variable width the selection would not be displayed correctly.

  • #2190 Under some circumstances, commands selected from the menu could be executed twice.

arnog
published 0.98.1 •

Changelog

Source

0.98.1 2023-12-05

New Features

  • Added mf.showMenu() method to programmatically show the context menu.

Issues Resolved

  • Correctly position the menu when the document has been scrolled.

  • When serializing, do not generate a \text command around a \texttt command.

Improvements

  • Keyboard navigate submenus with a grid layout
arnog
published 0.98.0 •

Changelog

Source

0.98.0 2023-12-03

Breaking Changes

  • The mf.setPromptContent() method has been renamed to mf.setPromptValue() for consistency with the mf.getPromptValue() method.

  • The mf.stripPromptContent() method has been removed. Its functionality can be achieved with:

const prompts = mf.getPrompts();
const values = prompts.map(id => mf.getPromptValue(id));
prompts.forEach(id => mf.setPromptValue(id, ""));

Improvements

  • A new mf.getPromptRange() method returns the selection range of a prompt. This can be used for example to focus a mathfield and select a specific prompt:
mf.focus();
mf.selection = mf.getPromptRange(id);
  • The Color, Background Color and Variant menus correctly toggle the colors and variant, and reflect their state with a checkmark or mixedmark.

  • Setting the mf.menuItems property before the mathfield is inserted in the DOM will now correctly update the menu items.

  • Correctly display tooltips in the menu when invoked via the menu icon.

  • Localized menu items in the context menu.

New Features

  • #348 Added a placeholder attribute, similar to the placeholder attribute of a <textarea> element. This specifies a short hint as a LaTeX string that describes the expected value of the mathfield. When the mathfield is empty, the placeholder text is displayed. The placeholder text can be styled with the math-field::part(placeholder) CSS selector.

  • #2162 Added a "latex-without-placeholders" format to the getValue() method. This format is similar to the "latex" format, but does not include the placeholders (for "fill-in-the-blanks").

Issues Resolved

  • #2169 Changing the selection programatically will now correctly update the mathfield.

  • #2189 If the decimal separator is set to ,, the virtual keyboard will now correctly display the decimal separator as a comma.

  • #2139 On some keyboard layouts, <kbd>ALT</kbd>+<kbd>/</kbd> would insert a \/ command, which is not standard. Now, the simple / is inserted.

arnog
published 0.97.4 •

Changelog

Source

0.97.4 2023-11-29

Issues Resolved

  • When a global .row class was defined, it would be applied to the virtual keyboard rows, resulting in incorrect layout.

Improvements

  • Added mf.queryStyle() method to query the style of a selection or the current style if no selection.
arnog
published 0.97.3 •

Changelog

Source

0.97.3 2023-11-28

Improvements

  • The mode-change event is now dispatched more consistently when the mode changes.

  • When the mathfield loses focus, if some of the content is in LaTeX mode, it remains in LaTeX mode. Previously, it would switch to math mode when losing focus.

  • Changing the user-select CSS property before inserting the mathfield in the DOM would not always be respected.

  • Use the DOM Popover API when available, which should ensure menus are displayed on top of other elements more consistently.

  • Added support for accented characters in the virtual keyboard (press and hold a vowel on an alphabetic keyboard to get accented variants), including a modified AZERTY layout (<kbd>SHIFT</kbd>+digits to get common accented characters).

  • Improved rendering of the menu for CJK and LTR languages.

Issues Resolved

  • If there were multiple mathfield elements on the page, only the last one would display tooltips.

  • #2184 Pressing the <kbd>TAB</kbd> key when in a prompt (fill-in-the-blank) would not move to the next prompt

  • #2183 The MathML serialization of factorial was incorrect.

  • #2181 The MathML serialization of limits was incorrect.

arnog
published 0.97.2 •

Changelog

Source

0.97.2 2023-11-21

Issues Resolved

  • Keybindings for German Linux keyboard layout were not working correctly.
2345
17Next
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