![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
mathlive
Advanced tools
Changelog
0.98.5 2023-12-27
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.
Readme
MathLive is a powerful web component that provides an easy-to-use interface for editing math formulas.
With over 800 built-in LaTeX commands, MathLive renders beautiful, TeX-quality typesetting.
It's designed for mobile devices with an extensive set of virtual keyboards for math input, and is compatible with screen readers, including custom math-to-speech support for improved accessibility.
MathLive outputs to LaTeX, MathML, ASCIIMath, and MathJSON formats, making it incredibly versatile.
And the best part? It's easy to customize to your needs!
![]() |
![]() |
![]() |
Using MathLive is easy! Simply add a <math-field>
tag to your page. It
initializes automatically and works just like a <textarea>
or <button>
element. You can manipulate the mathfield using methods of the element and
listen for events to be notified when its internal state changes.
npm install mathlive
import 'mathlive';
<!DOCTYPE html>
<html lang="en-US">
<body>
<math-field>f(x)=</math-field>
</body>
</html>
You can also add it using CDN
<head>
<script src="https://unpkg.com/mathlive"></script>
</head>
Check documentation for React and interaction with Mathfield.
MathLive has an extensive set of documentation to help you get started, including guides on interacting with a mathfield, customizing it, executing commands, defining custom LaTeX macros, managing inline and keyboard shortcuts, controlling speech output, and displaying static math formulas. You can find all of these guides on the CortexJS.io website.
In addition to the guides, you can also find reference documentation of the MathLive API on the MathLive SDK page.
This project is licensed under the MIT License.
FAQs
A web component for math input
The npm package mathlive receives a total of 49,830 weekly downloads. As such, mathlive popularity was classified as popular.
We found that mathlive demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.