Hi Stan,

On Wed, Apr 1, 2009 at 4:42 AM, Stan Schymanski <schym...@gmail.com> wrote:
> -----------------------------------------
> sui.set_latex('s_{u,i}')
> sui(x) = function('sui',x)
> latex(sui(x))
> ----
> s_{u,i}\left(x\right)
> -----------------------------------------
>
> Or would the function assignment sui(x) = function('sui',x) overwrite
> the previous set_latex command? In other words, my question is whether
> the latex definition for sui would automatically be applied to sui(x) or
> whether I would have to explicitly give a latex definition for sui(x).
> In the latter case, would I have to define the function first and then
> its latex representation as you did, or could it also be done the other
> way round?


It seems that view/show/latex methods are called only after an
expression has been evaluated.  So during typesetting one has
access to "sui(x)" and not to "sui". Consequently, custom latex string
needs to be assigned to "sui(x)". Admittedly, my current understanding
of Sage is limited so there may be different ways of doing the same.

New "set_latex()" method is defined for evaluated symbolic
functions. So one needs to define "sui(x)" first and then call
sui(x).set_latex('s_{u,i}'). Doing it in reverse order will raise
error.

> I like the user_defined_latex_dict idea. Good work!

Thanks!

Cheers,
Golam

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to