Closed jolyonb closed 5 years ago
Here's a new one: deltaE+
gives a math error too.
Without our preprocessEqn
similar to lambdabar
:
{:bar:}
(we already prevent this from happening in preprocessEqn see #170 ){:fbar:}
error{:fdot:}
errorSeems a group ending in any math-over symbol is bad.
similar to deltaE+
:
{:f:}+
no error{:ff:}+
error{:fff:}+
no errorAsciimath seems to parse these expressions just fine. It's mathjax that isn't rendering them. I should learn more about mathjax and edX's configuration in particular...
I think edX's MathJax version is somewhat out of date. They're planning to update it with the python3 push, so perhaps this isn't worth figuring out just at this moment.
Re lambdabar
, Asciimath wants barlambda
for "lambda with a bar on top". I'm guessing you want physics lambdabar, though, in which case we should do it like hbar and use this unicode symbol: https://www.fileformat.info/info/unicode/char/019b/index.htm
I'm out till this afternoon.
Yeah, I do convert it to unicode. I'd just like to stop math processing errors from displaying!
So, edX appears to be using MathJax 2.7.5, which is the latest version. However, all of these issues appear to be fixed in the latest version of AsciiMath (http://asciimath.org/) and MathJax (https://www.mathjax.org/#demo), so there seems to be a bug in the edX configuration. I don't think this is something we should be worrying about; I've reported the bug to edX.
OK. Still, do you want
// This is lambdabar, angular wavelength
AM.newsymbol({
input:"lambdabar",
tag:"mo",
output:"\u019b",
tex:null,
ttype:AM.TOKEN.CONST});
in our default updateMathJax()
? This works fine in edX for me for generating
(Although {:deltaE:}+{:lambdabar:}
still gives a mysterious error on edX, but not on MathJax preview site.)
Not in the default. I currently do
eqn = eqn.replace(/lambdabar/g, '\u019B');
to make it work, which works fine.
That last one you found is really annoying... changing lambdabar to hbar also has the error. I don't think there's much to be done though :-(
Oh Asciimath, why do you taunt us so?