Changelog
0.73.4 2022-05-27
\colorbox
command, and other text mode commands, to be
more interoperable when they contain math content (use $
and $$
rather
than \\(
and \\[
))Changelog
0.73.1 2022-05-24
\RR
) could result in incorrect LaTeX,
(comma) would be rendered as a .
(dot)Changelog
0.73.0 2022-05-23
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.
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.
captureSelection
group, do not
extend more than necessary{,}
, 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 .
).\sqrt{\frac12}
x
, ^
,
right arrow
, 2
, would incorrectly serialize x^2
. It now serializes
x^{}2
\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./
keybinding no longer
inserting a fraction.Changelog
0.72.2 2022-04-30
\log
) failed.readonly
attribute on mathfield caused the content of
the mathfield to be set to empty.<script type='math/tex; mode=text'>
. Auto-render could also fail
catastrophically in some cases.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.Changelog
0.72.0 2022-04-18
\ne
commands were entered, older ones
would disappear.\mod
command (and \pmod
and \bmod
) no longer captures the
cursor or allow its content to be selected\operatorname
jumped to the end of the expression.\mathord
, \mathbin
, etc...\mathbb{N}
, etc... for NN
shortcutChangelog
0.71.0 2022-04-12
find
and replace
methods. These methods were difficult to use,
since they were based on LaTeX serialization and the mapping from atom to
LaTeX is not always intuitive. To replace them it is recommended to extract
the MathJSON representation of the value, and manipulate it using the CortexJS
Compute Engine."math-json"
can be used as a format for setValue()
applyStyle()
was not propagated to its
children