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

Elliptic Curve latex method can create new latex commands by accident #12524

Closed
williamstein opened this issue Feb 17, 2012 · 8 comments
Closed

Comments

@williamstein
Copy link
Contributor

sage: K.<phi> = NumberField(x^2-x-1)
sage: a = phi
sage: E = EllipticCurve([0,0,a,27*a-43,-80*a+128])
sage: latex(E)
y^2 + \phiy = x^3 + \left(27 \phi - 43\right)x + \left(-80 \phi + 128\right) 

See the \phiy. Not good

Component: elliptic curves

Keywords: latex, sd51

Author: Frédéric Chapoton

Reviewer: Alex Ghitza

Merged: sage-5.12.beta2

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

@kcrisman
Copy link
Member

comment:1

This is not a problem about latex().

sage: var('phi,y')
(phi, y)
sage: phi*y
phi*y
sage: latex(phi*y)
\phi y

It's a problem in E.latex():


        elif b[2]:
            s += "+ %sy "%a[2]

Umm, yeah. Probably the intended use case is

sage: L.<z>=NumberField(x^2-x-1)
sage: b = z
sage: F = EllipticCurve([0,0,b,27*b-43,-80*b+128])
sage: latex(F)
y^2 + zy = x^3 + \left(27 z - 43\right)x + \left(-80 z + 128\right) 

So do you think that a one-whitespace change would fix this? (Actually, there are a few similar places.)

@kcrisman kcrisman changed the title latex of var named phi next to a y is bad news. Elliptic Curve latex method can create new latex commands by accident Feb 22, 2012
@kcrisman
Copy link
Member

comment:2

Sorry, E._latex_().

@fchapoton
Copy link
Contributor

comment:3

Attachment: trac_12524_latex_elliptic.patch.gz

Here is a proposal, needs review

@fchapoton
Copy link
Contributor

Author: Frédéric Chapoton

@fchapoton
Copy link
Contributor

Changed keywords from none to latex

@aghitza
Copy link

aghitza commented Jul 23, 2013

Reviewer: Alex Ghitza

@aghitza
Copy link

aghitza commented Jul 23, 2013

Changed keywords from latex to latex, sd51

@jdemeyer
Copy link

Merged: sage-5.12.beta2

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

6 participants