On Sun, Aug 9, 2009 at 10:23 AM, DMadd <misc.dav...@gmail.com> wrote:

>
> Hi.
>
> I'm new to sage, and python. I'm working with in the interactive sage
> prompt environment with the intention of moving the code later into a
> python script.
>
> I just wanted to know, is it possible to get a latex version of a
> (preparsed) input string without being evaluated/simplified/reduced?
>
> For example:
>
> 1.) latex(eval(preparse("10/60"))) is \frac{1}{6}, but I need \frac{10}
> {60}
> 2.) latex(eval(preparse("(a*b*c*d^2)/(d*z)"))) is \frac{a b c d}{z}
> but need \frac{a b c d^2}{d z}
>
> and of course latex(preparse(x)) does not work since preparse returns
> a string and not a sage object.
>
> Does such a function exist?


Definitely not.


> Could it be added to a future version of sage?


Maybe, though it might not be easy.


> How would one go about creating such a function?


I have no idea really.   It would definitely never ever work for everything
in Sage.  It's possible it could maybe work for symbolic calculus
expressions though.  There has been interest in this before in the form of a
"hold" command that avoids doing any symbolic simplifications.

 - William


>
>
> >
>


-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to