Hi,

On Wed, Mar 25, 2009 at 11:57 AM, Jason Grout
<jason-s...@creativetrax.com> wrote:
> As a guess, we might be calling out to maxima to latex the integral or
> derivative, so that might explain where the problem lies.

Yes, you are quite right. Now I have been able to locate the code where
Sage is calling maxima for Tex-ing symbolic expressions. In
"sage/interfaces/maxima.py" the following line does the job.
s = P._eval_line('tex(%s);'%self.name(), reformat=False)

However, Sage does it only when it fails to do so by its own _latex_
method. This also means that current typesetting of Sage can become
highly inconsistent for symbolics. For example, consider
--------------
var('alpha_nu');
f(x) = function('f',x)
g(x) = integrate(alpha_nu*exp(-alpha_nu*x)*f(x),x)
latex(g(x))
---
{\alpha_{\nu} \int {e^ {- {\it alpha\_nu}\,x }\,f\left(x\right)}{\;dx}}
---------------

The variable "alpha_nu" is being typeset as two different objects
in the same expression which is a disaster!!!


It seems to me that one can take three approaches to fix the
problem of typesetting functions as Greek letters.

(1) Enhance tex-ing of symbolic functions in Maxima.

(2) Edit the tex-ed expressions returned by maxima on-the-fly.
     (I tried this and it works but it is also error-prone!)

(3) Implement _latex_ method for "diff", "integrate", ....
      within Sage itself. Assuming, pynac-based symbolics in Sage
      is in near-horizon, one would need these methods anyway.

At this point, I think, it would be better to hear from those
who are involved with pynac. In particular, whether some
of these _latex_ methods are already being implemented!

Thanks,
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