mathlive
Advanced tools
Changelog
0.53.2 2020-06-10
Changelog
0.53.1 2020-06-01
\scriptstyle
to display small symbols\leftright
Changelog
0.53.0 2020-05-31
#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
#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.
Changelog
0.51.0 2020-05-19
#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
#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
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.
Changelog
0.50.8 2020-05-13
\inf
, \Pr
, \liminf
, \limsup
sinh
, cosh
, sec
, csc
, cot
,
arcsin
, arccos
, arctan
\rbrack a
would generate \rbracka
)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)
Changelog
0.50.7 2020-05-11
Changelog
0.50.5 2020-05-10