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
I already posted this to sage-support, so sorry for any cross-posting.
Cheers,
Stan
-------- Original Message --------
Subject: Re: [Sage] #6290: [with patch, positive review] Allow keywords
such as latex_name=LaTeX while defining symbolic function
Date: Thu, 25 Jun 2009 10:44:11 -0000
From: Sage <[email protected]>
Reply-To: [email protected]
CC: [email protected]
References: <[email protected]>
#6290: [with patch, positive review] Allow keywords such as latex_name=LaTeX
while
defining symbolic function
-------------------------------------------+--------------------------------
Reporter: gmhossain | Owner:
Type: enhancement | Status: closed
Priority: major | Milestone: sage-4.1
Component: symbolics | Resolution: fixed
Keywords: latex_name, symbolic function | Reviewer: Nick Alexander
Author: Golam Mortuza Hossain | Merged: 4.1.alpha0
-------------------------------------------+--------------------------------
Comment(by gmhossain):
Replying to [comment:8 schymans]:
> Would something similar be possible whenever a variable is defined?
> E.g. if I want to use multiple subscripts, I would like to define
> var('A_gs', latex_name="A_{gs}").
Hmmm, thats a great suggestion. Could you please post this to sage-devel?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6290#comment:9>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
________________________________________
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 [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-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---