Follow

I have a user interface problem that I hope isn't only solved by adding yet another option for authors to understand.

Student types a mathematical expression. We allow implicit multiplication, so `xy` is interpreted as `x*y`.

What to do about `pi`? Is it `p*i` or `π`?

I guess most of the time, you'd expect it to be interpreted as π. But you might be doing something with complex numbers, and `p*i` is really what you meant.

I suppose rendering π would at least give you a hint to add the * symbol

My position is that we should do our best to be generous interpreting what the student means.

We also show multiplication symbols in the preview, but if you're not expecting to see one, you won't notice it's missing.

@christianp that a goodbye point. In my application, the difference would be how xy is displayed vs x y, which might not be be readily obvious to a beginner.

There is only reliable solution I can think of is to completely disallow multi character symbols and also display the multiplication signs.

This is a really frustrating problem, trying to work around users who can't (and shouldn't, for the purpose of the assessment) be relied on to apply the rules you give them

Too much like "It is given..." for those of us to whom it has not been clearly understood.

@petrilaarne what about the letter ξ, transliterated as 'xi'? I reckon `x*i` is the most common interpretation of that.

The system already renders a preview of the interpreted expression on the fly, but students either ignore it or misinterpret it - if they're not expecting a multiplication symbol, they don't notice it's missing.

I would require the implicit multiplication to be separated by a space. This would also improve the readability of expressions and you could distinguish "3 pi" from "3 p i"

@kimreece yes, adding space to TeX markup is almost always a good idea.

@tpfto worse: is `sin2x` \( \sin^2(x) \) or \(\sin(2x)\)?

Elias Mårtenson@loke@functional.cafe@christianp I think the problem is the implicit multiplication.

It's better to be clear. I may, however, be biased since I'm working on a symbolic maths UI (based on Maxima). In it, you are explicit in what you type, such as: a*%pi, and it will render as: a π. Of course, it's reasonable to allow a user to type a*π as well, although it's not supported at the moment.

I believe that trying to be "clever" when parsing maths will lead to problems, because no matter how you choose to parse it, a user will always end up being unsure as to exactly how their input was parsed, which is definitely not what you want when doing maths.

Here's an example of my UI: https://peertube.mastodon.host/videos/watch/df751bd5-5a26-44da-90d5-f47624161649