On Friday, 6 June 2014 23:13:39 UTC+2, Andrei Berceanu wrote: > > I define a function gamma with the following code: > > from sympy import * > x = Symbol('x') > class gamma(Function): pass > > Its latex representation is > > print latex(gamma(x)) > > \Gamma\left(x\right) > > whereas I would like it to be > > \gamma\left(x\right) > > i.e. lowercase instead of capital. > > How can I achieve this? > > This should do it:
class gamma(Function): def _latex(self, printer): return r'\gamma{\left(%s \right)}' % printer._print(self.args[0]) -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/e4addabc-3010-4107-b270-9767ee113c5d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.