numbas / Numbas

A completely browser-based e-assessment/e-learning system, with an emphasis on mathematics
http://www.numbas.org.uk
Apache License 2.0
200 stars 118 forks source link

Polynomials extension, display polynomial #841

Closed ugoertz closed 3 years ago

ugoertz commented 3 years ago

Displaying a polynomial p (defined using the polynomials extension) by \var{p} is currently broken, and in fact latex(p) generates an error (jme.display.texName is not a function). Example question One can work around it using \var{latex(string(p))} but that's a bit ugly (and removing the multiplication asterisks from string(p) makes it even more cumbersome).

RocketingRacer commented 3 years ago

A work around for this is to use \var{expr(p)} instead of \var{string(p)}. Deals with the asterisks problem and can easily be done inline. Best of luck

christianp commented 3 years ago

Thanks for reporting this. It broke with v6's new texifying code. I've fixed it now.