Thanks for the quick reply. This is now Ticket #6403. How much effort would it be to expose this Pynac functionality?
Cheers, Stan Burcin Erocal wrote: > On Thu, 25 Jun 2009 13:22:46 +0200 > Stan Schymanski <schym...@gmail.com> wrote: > > >> Dear all, >> >> I have been asked to forward the below to the sage-devel list. Ticket >> #6290 introduced a way to custom-define the latex style of functions, >> but it would be great if something similar was made possible for any >> variable. Is there a way for this already? I used to do it in the >> following way, but now I get an error message: >> >> sage: var('hi kunsati delyui') >> sage: hi._latex_ = lambda: 'h_i' # Matric suction >> head in layer i (=pcapvec) >> sage: kunsati._latex_ = lambda: 'K_{unsat,i}' # Unsaturated >> hydraulic conductivity in layer i >> sage: delyui._latex_ = lambda: '\delta_{yu,i}' # Soil layer >> thickness in layer i >> Traceback (most recent call last): >> ... >> AttributeError: 'sage.symbolic.expression.Expression' object attribute >> '_latex_' is read-only >> > > Since Expression is a cython class, you cannot overwrite the _latex_() > method. > > Pynac supports setting latex names for variables at creation, but this > functionality is not exposed in the wrapper. Another solution by > hacking latex_variable_name() might be possible, but I would like to > avoid that if possible. > > Feel free to open a new issue in trac about it. > > > Cheers, > Burcin > > > > > -- ________________________________________ Stan Schymanski Scientist Max Planck Institute for Biogeochemistry Postfach 10 01 64 D-07701 Jena Phone: +49.3641.576264 Fax: +49.3641.577274 WWW: http://www.bgc-jena.mpg.de/~sschym Biospheric Theory and Modelling Group http://www.bgc-jena.mpg.de/bgc-theory/ _________________________________________ --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---