Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extraneous parentheses in latex(e^-x) #26337

Open
slel opened this issue Sep 21, 2018 · 2 comments
Open

Extraneous parentheses in latex(e^-x) #26337

slel opened this issue Sep 21, 2018 · 2 comments

Comments

@slel
Copy link
Member

slel commented Sep 21, 2018

Reported by Andy Howell on sage-devel.

Current:

sage: h = e^-x
sage: latex(h)
e^{\left(-x\right)}

Wish:

sage: h = e^-x
sage: latex(h)
e^{-x}

See further analysis and links in the 2018-09 sage-devel discussion.

CC: @DaveWitteMorris @rwst @slel

Component: symbolics

Keywords: latex, symbolic expression

Issue created by migration from https://trac.sagemath.org/ticket/26337

@slel slel added this to the sage-8.4 milestone Sep 21, 2018
@embray embray removed this from the sage-8.4 milestone Jan 7, 2019
@embray embray added the pending label Jan 7, 2019
@slel
Copy link
Member Author

slel commented Jan 7, 2019

comment:2

Not sure whether the fix belongs in Sage or GiNaC or Pynac. Any insight anyone?

@slel
Copy link
Member Author

slel commented Feb 2, 2022

comment:4

Likewise:

sage: a = exp(2*x)
sage: a  # good: we need those parentheses
e^(2*x)
sage: latex(a)  # should skip parentheses
e^{\left(2 \, x\right)}

and

sage: b = exp(x/2)
sage: b  # good: we need those parentheses
e^(1/2*x)
sage: latex(b)  # should skip parentheses
e^{\left(\frac{1}{2} \, x\right)}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants