mathquill / mathquill

Easily type math in your webapp
http://mathquill.com
Mozilla Public License 2.0
2.61k stars 687 forks source link

leftrightharpoons and rightleftharpoons not rendering #1000

Closed sgiacinto closed 1 year ago

sgiacinto commented 1 year ago

Like the title says, \leftrightharpoons and \rightleftharpoons are not being recognised by the MathQuill input box. I've checked Symbola.woff2 (this is the one loading) and it definitely contains these glyphs. Every other character I've tried is working, only these 2 are not.

Mathquill Ver. 0.10.1, Jquery 3.6.1, using mathquill.js (not mathquill-basic.js)

Not an expert with Latex so apologies if this is a simple question.

drlippman commented 1 year ago

There are a lot of latex symbols that mathquill doesn't have defined, and these are two of them. You could add support to your version by defining the new symbols in /src/commands/math/advancedSymbols.js. You'd need to add a line like

LatexCmds.rightleftharpoons = bind(BinaryOperator,'\\rightleftharpoons ',⇌');

sgiacinto commented 1 year ago

Very nice, works like a charm. Thanks a lot for the quick and accurate answer.