I think I have a solution for you: After
sage: R.<x> = QQ[] sage: f = -2*x^2-x+1 when you type latex(f) it runs the method f._latex_(), which has an extra parameter called name: sage: f._latex_? Definition: f._latex_(self, name=None) (etc etc) so you can call this function directly like this, with your own name: sage: f._latex_(name='alpha') '-2 alpha^{2} - alpha + 1' John On Saturday, May 5, 2012 1:25:03 PM UTC+1, Nicu Tofan wrote: > > Hello! > > I see that is possible to rename() a symbol. But is it possible to > customise the (latex) output? > say: > sage: x = PolynomialRing(QQ, 'x', sparse=True).gen() > sage: g = x^3 + x - 5 > sage: latex(g) > > will print "x^{3} + x - 5", I know that. But is it possible to adjust x so > that it prints "\alpha^{3} + \alpha - 5"? > > On Saturday, May 5, 2012 1:25:03 PM UTC+1, Nicu Tofan wrote: > > Hello! > > I see that is possible to rename() a symbol. But is it possible to > customise the (latex) output? > say: > sage: x = PolynomialRing(QQ, 'x', sparse=True).gen() > sage: g = x^3 + x - 5 > sage: latex(g) > > will print "x^{3} + x - 5", I know that. But is it possible to adjust x so > that it prints "\alpha^{3} + \alpha - 5"? > > -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org