#11428: Customizable latex for functions
---------------------------+------------------------------------------------
   Reporter:  SimonKing    |          Owner:  burcin    
       Type:  enhancement  |         Status:  new       
   Priority:  major        |      Milestone:  sage-4.7.1
  Component:  symbolics    |       Keywords:            
Work_issues:               |       Upstream:  N/A       
   Reviewer:               |         Author:            
     Merged:               |   Dependencies:            
---------------------------+------------------------------------------------
 There should be a way to customize how a function is printed and how it is
 translated into Latex, as requested on
 [http://ask.sagemath.org/question/579/how-to-change-_latex_-of-log-to-ln
 ask-sage].

 I suggest, as a first step, to add methods `set_name()` and
 `set_latex_name()` that change the value of the cdefined attributes
 `_name` used for printing and `_latex_name` used for translation to latex.
 Then, the following would work:
 {{{
 sage: tan.set_name('tg')
 sage: tan
 tg
 sage: tan.set_latex_name(r'\tg')
 sage: latex(tan)
 \tg
 }}}

 However, that can really only be the first step. Because, when I did so, I
 still got
 {{{
 sage: tan(x)
 tan(x)
 sage: latex(tan(x))
 \tan\left(x\right)
 }}}
 Hence, in addition to that, the given latex name should be propagated to
 expressions.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11428>
Sage <http://www.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