## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
• 12:28
SushantGautam commented #939
• 11:25
SushantGautam commented #939
• 11:24
SushantGautam commented #939
• 11:24
SushantGautam commented #939
• 11:24
SushantGautam commented #939
• 11:24
SushantGautam commented #939
• 10:52
dependabot[bot] edited #941
• 10:52
dependabot[bot] synchronize #941
• 10:52
dependabot[bot] edited #941
• 10:52
dependabot[bot] synchronize #937
• 10:52
dependabot[bot] edited #941
• 10:52
dependabot[bot] edited #937
• 10:52
dependabot[bot] synchronize #942
• 10:52
dependabot[bot] synchronize #935
• 10:51
dependabot[bot] synchronize #922
• 10:51
dependabot[bot] synchronize #923
• 10:51
dependabot[bot] edited #942
• 10:51
dependabot[bot] edited #935
• 10:51
dependabot[bot] synchronize #918
• 10:51
dependabot[bot] synchronize #936
Arno Gourdol
@arnog

### Bug Fixes

• A \chi13 (0.1em) gap between the nucleus and the above element was missing
in OverUnder atoms (\overset, etc...).
• On Safari iOS, correctly display the keyboard toggle glyph.
• #907 When using renderMathInElement() or renderMathInDocument(),
formulas containing styling information would get too aggressively coalesced,
dropping some styling.
• #910 Fixed an issue introduced in 0.61.0 where some content would not get
rendered when calling renderMathInElement() or renderMathInDocument().
Arno Gourdol
@arnog
I've discovered an issue loading mathlive from a CDN in some browsers that prevented the fonts from loading properly. Since that's a pretty serious problem, I'm pushing an update with a fix. Say hello to mathlive 0.63

### New Features

• #788 Added virtualKeyboardState property to indicate if the virtual
keyboard is currently visible or hidden. The property can also be modified to
show or hide the virtual keyboard.
• In read-only mode, do not attempt to load the sounds and do not allow the
virtual keyboard to be shown.
• Export version (previously available as MathLive.version).
• #199 Added infty and int inline shortcuts.

### Bug Fixes

• #708 Pressing on the bottom part of the virtual keyboard keycap did not
trigger the key action.
• The asset directory (fonts/sounds) was not properly located in some browsers
when using a CDN to load Mathlive.
• Correctly focus the mathfield when the virtual keyboard is invoked.
xugo
@xugo:matrix.org
[m]
Hi guys. Please tell me what I'm doing wrong?
When I typing the exponent the formula is not displayed in the output. https://prnt.sc/129qz2u
Although this works correctly in examples. https://prnt.sc/129r0bg
Thanks!
https://codepen.io/Xugo/pen/PoWvXyw
Arno Gourdol
@arnog
Hmmm... I don't think you're doing anything wrong, it looks like a bug. The example on mathlive.io may be using an older version that doesn't have that bug.
A sort of workaround would be to use getValue('latex-expanded')...
Arno Gourdol
@arnog
OK, I have a fix for this issue. It would happen when a macro (such as \exponentialE) is insert in the formula, then modified with a superscript/subscript (which happens when it is inserted via the virtual keyboard)
xugo
@xugo:matrix.org
[m]
Thank you!
zoranpopovic
@zoranpopovic
it seems that new options plonkSound and keypressSound can't accept null, at least when types are checked...
Arno Gourdol
@arnog
yes, I forgot to update the public type definition. I have fixed this a while ago, but I need to push a new version with the fix.
stefnotch
@stefnotch
One thing I've noticed for quite a while with mathlive is how equations seem to shake around when moving the cursor. Is that a 'unfixable' issue, since it's some browser specific rendering stuff or is that an issue I should totally report on GitHub?
(Huh, Gitter doesn't like the webm format. Oh well, downloading the video and playing it still works)
stefnotch
@stefnotch
To answer my own question, it's totally fixable. Just use box-shadow instead of borders. So, something like this should work
.ML__caret:after {
content:"";
border:none;
border-right:0px solid var(--caret);
margin-right:0px;
box-shadow: 0px 0px 0px 1px var(--caret);
width:0px;
...
Arno Gourdol
@arnog
ah, that's a good find.
I think using 'box-sizing: content-box' should work as well
what browser/OS are you seeing the "shaking" with?
stefnotch
@stefnotch
Firefox 88, Windows 10
stefnotch
@stefnotch
I haven't had any luck getting box-sizing: content-box to work. Maybe I haven't tried the right combination of CSS magic though
Arno Gourdol
@arnog
I've just pushed to main a pretty significant update to the layout algorithm. It should be closer to what TeX produces, especially when it comes to scriptstyle.
stefnotch
@stefnotch
Woah, that's amazing 🥳 I definitely didn't expect there to be so many subtle little things that one has to watch out for
Arno Gourdol
@arnog
Yeah... working out through this has been a bit of a slog, but I'm glad it's done.
and debugging all those things are infuriating. The way TeX's algorithm work, so many things influence or depend on other things that when something goes wrong trying to figure out and how to fix it without breaking something else is... a challenge.
if you do get the chance, and if you're setup to do so, this latest version includes changes to the box-sizing. If you can try out and see if it fixes the "dancing caret" issue that would be great. Otherwise, we can always switch to your suggestion.
Arno Gourdol
@arnog
mathlive 0.64 has been posted to npm

### Breaking Changes

• The FontSize type is now an integer between 1 and 10. It previously was
size1, size2, etc... The default font size is 5, the smallest is 1.
However, when using applyStyle(), the size can still be specified with
size1, etc... The following size values can also be used: tiny,
scriptsize, footnotesize, small, normal or normalSize, large,
Large, LARGE, huge, Huge.
• Previously, named colors (yellow, red...) mapped to the dvips color set.
They can now map to different values to improve their legibility. To ensure
that a particular color is used, specify the colors as a hex triplet

The following color names are recommended: they will map to values that have
been optimized for legibility as a foreground or background color, they cover
all the hues of the color circle and have been adjusted to provide similar
apparent brightness and intensity:

• colors: orange, yellow, lime, green, teal, blue, indigo,
purple, magenta
• shades of grey: black, dark-grey, grey, light-grey, white

### New Features

• The background of fractions, radicals and parentheses group (\left/\right
commands) is now highlited when they contain the caret. This makes it easier
to distinguish some cases when the cursor is at the edge of the element and
could be either inside or outside. The appearance of the highliting can be
controlled with the --contains-highlight CSS variable. Set it to
transparent to restore the previous behavior.

• colorMap option. To map a color name such as "yellow" to a custom RGB
color, set the colorMap or backgroundColorMap option to a function that
takes the color name as an argument and return a matching CSS RGB string.
Return undefined to proceed with the default mapping.

• In macro dictionary, added option to expand or not the macro when using the
latex-expanded output format (when copying to the clipboard, for example).

• Added the \lparen and \rparen delimiters.

• Added the \mod, \pmod and \bmod commands, defined as macros.

• Added support for dashed column separators in matrix, using ":" in the matrix
preamble. See the
arydshln
package.

• Added support for optional below argument to \stackrel and \stackbin as
per the
stackrel package

• When using renderMathInDocument() or renderMathInElement(), ASCII Math
format can be used. The default delimiters for ASCII Math are
"" (backtick) and can be changed with theasciiMath.delimiters option.

### Layout Improvements

• Substantial rewrite of the stacked layout algorithm (fractions, superscripts,
etc...). The previous algorithm did not work correctly when mixing absolute
sizing commands (\Huge) and relative ones (\scriptstyle) and had various
issues and inconsistenceis with what TeX produced. The result is now close to
TeX.

• Display the placeholder symbol using the caret color.

• Added the --smart-fence-opacity and --smart-fence-color CSS variables.

• In the layout of superscript/subscript and accents, use the correct font
metrics for spacing and layout (previously, the font metric for the base size
was always used). This may result in very slightly different placement of
superscripts, subscripts and limits (but closer to TeX).

• Fixed cases where the inter-atom spacing was incorrect (when spacing atoms or
super/subscripts were used with a binary atom, or when some other atom types
were used, such as BoxAtom and more).

### Clipboard Improvements

• When pasting from the clipboard, recognize text bracketed with
\begin{math}...\end{math} or \begin{displaymath}...\end{displaymath}