Open kwangkim opened 7 years ago
Something analogous happens with just sage
instead of sagestr
, where one gets (as expected) the latex()
results above.
The really interesting part is that the strings returned by Sage seem to be identical:
sage: latex(expr1)
'4 x^{2} + 1'
sage: latex(expr2)
'4 x^{2} + 1'
sage: srepr(expr1)
"Add(Mul(Integer(4), Pow(Symbol('x'), Integer(2))), Integer(1))"
sage: srepr(expr2)
"Add(Mul(Integer(4), Pow(Symbol('x'), Integer(2))), Integer(1))"
but nonetheless somehow they are not coming out the same; maybe the internal representation, but I traversed both expression trees for these in Sage as well and can't find a difference. This would be worth investigating, but is relatively low priority since just avoiding Sympy (which after all isn't what SageTeX is designed for) would solve this particular issue.
Shows Which means sagetex does not convert '4*x**2+1' properly? I did it using cocalc.com
Could you give me an advice?