ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 07 Mar 2012 06:11:46 -0600How to remove \left( \right)http://ask.sagemath.org/question/8775/how-to-remove-left-right/latex(2^(3*x)) gives 2^{3\, x}
this is fine, but
latex(e^(3*x)) gives e^{\left(3\, x \right)}.
How can i change this behaviour?
Thanks for help
Tue, 06 Mar 2012 22:30:06 -0600http://ask.sagemath.org/question/8775/how-to-remove-left-right/Answer by kcrisman for <p>latex(2^(3*x)) gives 2^{3\, x}
this is fine, but</p>
<p>latex(e^(3*x)) gives e^{\left(3\, x \right)}.</p>
<p>How can i change this behaviour?</p>
<p>Thanks for help</p>
http://ask.sagemath.org/question/8775/how-to-remove-left-right/?answer=13338#post-id-13338This is *not* an answer, but just diagnosing.
sage: a = e^(3*x)
sage: b = 2^(3*x)
sage: a.operands()
[3*x]
sage: b.operands()
[2, 3*x]
sage: a.operator()
exp
sage: b.operator()
<built-in function pow>
We treat the exponential function differently, because it's considered a function in that sense. Since there are no extra operands, our LaTeX method senses the need for parentheses. This would have to be fixed at the Pynac level, if one were to consider it a bug.
Wed, 07 Mar 2012 06:11:46 -0600http://ask.sagemath.org/question/8775/how-to-remove-left-right/?answer=13338#post-id-13338