AsciiMath is quite liberal when it comes to spacing. All of following are correct and equivalent:
sum_(i=1)^ni^3=((n(n+1))/2)^2
sum _ ( i = 1 ) ^ n i ^ 3 = ( ( n ( n + 1 ) ) / 2 ) ^ 2
sum_(i = 1)^n i^3 = ((n (n + 1)) / 2)^2
And they render to:
Which style is preferred? IMO third one is the best, but it involves some spacing rules, so obviously it will be more difficult to implement than the other ones. The other two are very straightforward to implement, with the reservation that in the "never add spaces" mode there is a small risk that a sequence of variables will collide with a reserved word, e.g. sum and s u m have different meanings. There is no such danger in "always add spaces" mode AFAIK.
AsciiMath is quite liberal when it comes to spacing. All of following are correct and equivalent:
sum_(i=1)^ni^3=((n(n+1))/2)^2
sum _ ( i = 1 ) ^ n i ^ 3 = ( ( n ( n + 1 ) ) / 2 ) ^ 2
sum_(i = 1)^n i^3 = ((n (n + 1)) / 2)^2
And they render to:
Which style is preferred? IMO third one is the best, but it involves some spacing rules, so obviously it will be more difficult to implement than the other ones. The other two are very straightforward to implement, with the reservation that in the "never add spaces" mode there is a small risk that a sequence of variables will collide with a reserved word, e.g.
sum
ands u m
have different meanings. There is no such danger in "always add spaces" mode AFAIK.@ronaldtse WDYT?