mathlive
Advanced tools
Changelog
0.50.4 2020-05-09
Changelog
0.50.2 2020-05-07
config.error
to config.onError
for consistency with the other
listeners.Changelog
0.50.1 2020-05-06
A new option, config.error
can be used to catch errors while parsing LaTeX.
This is invoked both for the initial content of the mathfield, when the content of the mathfield is changed programmatically, and when the user pastes latex content in the field.
An error code will indicate the problem encountered, but the parsing will attempt to recover, in keeping with the previous behavior.
\mleft.
and \mright.
commands would not be
rendered correctly (or propertly converted to ASCIIMath).
(https://github.com/benetech/MathShare/issues/1182)Changelog
0.35.0 2020-03-24
Extensible (stretchy) symbols:
#126 (\overgroup
, \overrightarrow
, \overleftrightarrow
), #180
(\xrightarrow
, \xrightleftharpoons
), #292 (\widehat
, \overbrace
,
\underbrace
), #338 (\vec
, \bar
).
This work has been made possible thanks to the financial support of a generous sponsor.
It is now possible for a symbol with operands above or below, or for a decoration above or below an expression, to stretch (extend) so that its width will match the width of the operands or expression.
These extensible symbols and decorations are important for some domains such as geometry and chemistry.
This release introduces the following new commands:
\overrightarrow{base}
\overleftarrow{base}
\Overrightarrow{base}
\overleftharpoon{base}
\overrightharpoon{base}
\overleftrightarrow{base}
\overbrace{base}
\overlinesegment{base}
\overgroup{base}
\underrightarrow{base}
\underleftarrow{base}
\underleftrightarrow{base}
\underbrace{base}
\underlinesegment{base}
\undergroup{base}
\xrightarrow[below]{above}
\xleftarrow[below]{above}
\xRightarrow[below]{above}
\xLeftarrow[below]{above}
\xleftharpoonup[below]{above}
\xleftharpoondown[below]{above}
\xrightharpoonup[below]{above}
\xrightharpoondown[below]{above}
\xlongequal[below]{above}
\xtwoheadleftarrow[below]{above}
\xtwoheadrightarrow[below]{above}
\xleftrightarrow[below]{above}
\xLeftrightarrow[below]{above}
\xrightleftharpoons[below]{above}
\xleftrightharpoons[below]{above}
\xhookleftarrow[below]{above}
\xhookrightarrow[below]{above}
\xmapsto[below]{above}
\xtofrom[below]{above}
\xrightleftarrows[below]{above}
\xrightequilibrium[below]{above}
\xleftequilibrium[below]{above}
In addition, the following commands can now be used to represent stretchy accents:
\widehat{base}
\widecheck{base}
\widetilde{base}
\utilde{base}
Improved rendering and layout of \enclose
Improved layout of overunder
atoms
Improved layout of accent
atoms
Improved fidelity of styling commands (\textup
, \fontseries
, etc...). They
are now closer to what LaTeX does, in all its wonderful weirdness (see
https://texfaq.org/FAQ-2letterfontcmd). Added \selectfont
command.
#371: When clicking after the last element in the mathfield, always set
the anchor to be the last element in the root, i.e. as if moveToMathFieldEnd
had been performed. For example, if the content is "x^2", clicking after the
end of the field will put the caret after the last element (not after the "2"
in the superscript)
#372: Using an argument in a macro will result in the argument to be
substituted without a group being inserted. Previously, #1
with ax
as a
value for the first argument would have resulted in {ax}
. This was
noticeable when using the x^2
key in the virtual keyboard: if the equation
was ab
, pressing that key resulted in {ab}^2
. It now results in ab^2
Fixed an issue rendering some commands such as \boxed
and others when in
static mode. An over-agressive optimization would coalesce spans with no
content, even though they may include important styling info.
Fixed the rendering of infix commands with arguments, e.g. \atopwithdelims
and overwithdelims
. The arguments of infix commands were incorrectly merged
with the suffix.
Fixed inter-atom spacing of overunder
atoms (they should space as mord
)
Re-factored the definitions of functions, symbols and environments which are
now split in multiple files instead of being all contained in
core/definitions.js
Re-factored and isolated the metadata about LaTeX commands (frequency and
category). This should reduce the amount of data carried by the core package.
All the metadata is now in definitions-metadata.js
. As a side effect, the
examples displayed in the popover window might be less complete, but the
removal of popover is on the roadmap.
Removal of default export for some modules. Need to complete it for all the remaining modules.
Changelog
0.34.0 2020-02-05
\mleft
and \mright
. This
format is intended for inter-exchange with other TeX-compatible renderers
and the \mleft
and \mright
commands are not widely deployed.$$
to more
clearly indicate that the content is using TeX format.$
or $$
, assume LaTeX format\operatorname
is of type 'math', not 'text'. This
means that using the '\text' command inside the argument is valid and that
spaces should be ignored by default (but the ~
character can be used to
insert a space in that context).\sin
) following some text is incorrectly considered
to be part of the text.suppressChangeNotifications
options for $insert()
config.smartMode
(#312)mf.$setConfig({readOnly: true})
. When this mode is activated, the formula
can be selected (so it can be copied), but it cannot be modified by the user.
Progammatic modification is still possible.