5 ms·
At first glance it seems that it not only has functional whitespace, but has overloaded it (used for grouping numerator and denominator or for pre- and suffixes
by t_mann 2y ago
At first glance it seems that it not only has functional whitespace, but has overloaded it (used for grouping numerator and denominator or for pre- and suffixes). Also, it seems inconsistent in how it handles commands, some seem to be reserved words while others seem to require \`X`. It might be the right choice for its intended use case of quick and easy math, but it seems like it might come with a few footguns if you use it for anything more than that. Any experiences?
- runarberg 2y agoAuthor here. The intended use case is indeed quick and easy math expressions, and the target users are those that may or may not know LaTeX. I tried to make most expressions possible (I even added tensor notation a couple of weeks ago) but if you want to author complex equations you should probably use LaTeX. In my opinion very complex equations are much more manageable with LaTeX (this is also true of AsciiMath proper). When your write LaTeX you maintain some structure for complex equations, while here you kind of take the quickest route possible and very quickly loose your footing in the equation’s complexity. In LaTeX you can very easily write out a very complex equation with nothing but your text editor, but here once you are maybe 6 or 7 terms deep you loose your place and will probably need to see a visual rendering to find your footing and continue. Mathup makes this problem worse than in AsciiMath proper, because in AsciiMath proper you are forced to at least parenthesize many of your sub-expressions, while here you are free to go wild with the whitespace. The whitespace grouping is actually even more powerful than just for fractions, e.g. you can use it group terms around any infix (incl. sub- and superscripts) as well as after any prefix (such as sqrt): `e ^ -x^2/2 / sqrt 2pi` will give you the standard normal distribution. The rule is that if there is space between the operator and the operand it will operate on everything until the next applicable whitespace, the space between sqrt and 2pi applies the the sqrt prefix, and is not applicable to the fraction, but the space before slash is applicable to the ^ so the sqrt 2pi term are not apart of the superscript. I actually don’t recommend relying on this and just use parentheses for all but the simplest expressions (it is fine in sub-expressions though). But like I said the target usecase is quick and easy expressions, so people that write a+b / c+d are favored over the ones that write `(e^(-(x^2)/2))/sqrt(2pi)` - but honestly I would write this as `e^(-(x^2)/2) / sqrt(2pi)`.