#6403: Custom definitions for latex style
-------------------------+--------------------------------------------------
 Reporter:  schymans     |       Owner:       
     Type:  enhancement  |      Status:  new  
 Priority:  major        |   Milestone:       
Component:  symbolics    |    Keywords:  latex
 Reviewer:               |      Author:       
   Merged:               |  
-------------------------+--------------------------------------------------
 #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.
 I used to do it in the following way, but now I get an error message:

 sage: var('hi kunsati delyui')[[BR]]
 sage: hi._latex_ = lambda: 'h_i'[[BR]]
 sage: kunsati._latex_ = lambda: 'K_{unsat,i}' [[BR]]
 sage: delyui._latex_ = lambda: '\delta_{yu,i}'[[BR]]

 Traceback (most recent call last):[[BR]]

 ...[[BR]]
 AttributeError: 'sage.symbolic.expression.Expression' object attribute
 '_latex_' is read-only[[BR]]

 Comment by Burcin Erocal on sage-devel (25/06/2006):

 >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

 How could the Pynac funtionality of setting latex names for variables at
 creation be exposed?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6403>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
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-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to