On 10/29/07, Joel B. Mohler <[EMAIL PROTECTED]> wrote:
> On Saturday 27 October 2007 16:23, Joel B. Mohler wrote:
> > Round about calculus.py line 3283 is a really charming latex-ification
> > algorithm. I have some questions about it. Could the if statement that
> > puts the 'tails' into the subscript be moved into the latex_varify
> > function?
>
> So, I've made a patch which overhauls the latex variable name handling (well,
> it doesn't overhaul as much as brings a few obvious rings up to date).
> http://trac.sagemath.org/sage_trac/ticket/1032
>
> It's really quite uneventful except that I now allow underscores in variable
> names.  I'm wondering if anyone has objections to this?

I do.  See below.

> sage: P.<alpha_15>=ZZ[[]]
> sage: latex(P)
> \mathbf{Z}[[\alpha_{15}]]
>
> sage: P,alpha_beta12=PolynomialRing(ZZ,'alpha_beta12').objgen()
> sage: latex(alpha_beta12)
> \alpha_{\beta_{12}}
>
> Both of the above examples throw an exception in 2.8.10 about not being
> alphanumeric.  I think that was a slightly overzealous requirement and I've
> changed the validation in preparser.py and parent_gens.pyx to allow
> non-leading '_' characters in variable names.

No, there was a very good reason why underscores were
not allowed in variable names.  I think it was that they
are not allowed in SINGULAR polynomial variable names,
hence you're changing sage to strongly encourage creation
of variable names, so that any time we coerce them to Singular
it will go boom.   I can't remember if Singular was the
only system with this sort of problem; there might be others.

William

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to