mathquill / mathquill

Easily type math in your webapp

Home Page:http://mathquill.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation for Which TeX Functions Are Supported

hoffm386 opened this issue · comments

Hello! When I use MathQuill there is a lot of trial and error when trying to reuse TeX code that worked successfully on another platform.

For example,

\rho_{X,Y}= \frac{\operatorname{cov}(X,Y)}{\sigma_X \sigma_Y}

is a way of representing Pearson's correlation coefficient. When I try to put that into my LMS (which uses MathQuill under the hood), there is a rendering error.

I know enough about which functions are more commonly used, so I guessed that operatorname was causing the problem, and was able to fix the formula by replacing operatorname with text, i.e. \rho_{X,Y}= \frac{\operatorname{cov}(X,Y)}{\sigma_X \sigma_Y}.

Ideally MathQuill would have something like the documentation provided by KaTeX that lists out which functions are supported as well as which functions aren't. If that's challenging, just documentation listing the functions that are supported would be nice.

I tried looking through the source code and found some symbols listed out in advancedSymbols.js but the logic is split up over multiple files so that isn't easily usable for someone who is using MathQuill to author content. And some logic is written as regexes so a control + F would work there either. That's why I'm requesting this be added to the documentation.

My hope is that this documentation could be generated automatically, and if you are seeking contributors or already have a project like this in the works, please let me know and I'll try to help! I have worked with JavaScript before but not this kind of library specifically. Or, if MathQuill is using logic from another library and I should just go look at their documentation instead, I'm happy to do that. Thanks!

I would love to see this too! Has anyone figured it out?

I was thinking of having something similar to MathLive (https://github.com/arnog/mathlive) where you have a search bar for which relevant commands you are currently inputting.

The LatexCmds dictionary should already contain all the commands used. It may take a while but I'm pretty certain it wouldn't be too hard to remove the unused commands through a blacklist system and use the LatexCommandInput as a search bar and a command line input.