Hi Adam,
On 2012-03-28, Adam Sorkin <[email protected]> wrote:
> ------=_Part_852_32340732.1332963705957
> Content-Type: text/plain; charset=ISO-8859-1
>
> This works fine when the variable is of type
> sage.symbolic.expression.Expression
> but when I make the polynomial ring PolynomialRing(QQ, a), it breaks.
I agree that there should be a way
* to set the latex name of a variable: x.set_latex_name('foo')
* to set the latex names for all variables of a polynomial ring:
P.set_latex_variable_names(['foo', 'bar'])
* to define the latex names during initialisation of the ring:
P.<x,y> = PolynomialRing(QQ, latex_names=['foo','bar'])
However, it *is* possible to change the latex names, in a "slightly"
hackish way:
sage: P.<x,y> = QQ[]
sage: latex(x)
x
sage: P._latex_names = ['peter','paul']
sage: latex(x)
peter
Cheers,
Simon
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org