Macaulay2 / M2

The primary source code repository for Macaulay2, a system for computing in commutative algebra, algebraic geometry and related fields.
https://macaulay2.com
347 stars 232 forks source link

Extra space in expressions of sequences #3502

Open mahrud opened 1 month ago

mahrud commented 1 month ago
i1 : R = kk[x,y];

i2 : net ideal x

o2 = ideal x

i3 : net ideal(x+y)

o3 = ideal(x + y)

Now notice the extra space before the parentheses:

i4 : net ideal(x+y,x-y)

o4 = ideal (x + y, x - y)

i5 : net ideal(x,y)

o5 = ideal (x, y)

@pzinn do you have a guess of what's causing this?

pzinn commented 1 month ago

Yeah it's been like this for as long as I can remember. During my expression upgrade I don't think I changed this behaviour. It's controlled by net Adjacent in expressions.m2. You can try to fiddle with it, but beware of unintended consequences. Also, you can compare with texMath Adjacent (which I suspect I [re]wrote), which has slightly different spacing behaviour. (in particular the issue you mention doesn't arise in WebApp mode).