On Jul 15, 2009, at 10:47 PM, william ratcliff wrote:

> Hi!  My student, William Flynn, has been working a lot this summer  
> using sympy--thanks for all of the efforts on this project.   We're  
> doing some work in a windows environment and find that pretty  
> printing (to generate pngs) still has a problem.  Our hack at the  
> moment is to use the python subprocessing module to call latex and  
> later run yap.  We need to clean things up so that we check for  
> existence of latex on the user's machine, etc--but is this the  
> approach that the community would like to take?  We also considered  
> tried to go the matplotlib route to generate pngs, but ran into a  
> problem with long equations (which ironically, was a problem in  
> latex as well).
>
> Also, we have some rather long expressions involving exponentials,  
> dirac delta functions, etc. and latex has difficulty breaking them  
> up automatically.  In the mathematical literature, it would seem  
> that people generally do this themselves using several
> align statements.  One possibility that we are considering is  
> breaking up the expression by numbers of terms, but in sympy,
> is there an easy way to determine if for example a '+' sign is  
> inside of a function, or outside of a function?  Also, while this  
> may work for us, might some kind of "printing_strategies" class be  
> useful, which a user could subclass?
If I understand your question correctly, you want to break expressions  
that are additions up into smaller parts.  You can do expr.is_Add to  
check if it is an instance of an addition class, and expr.args to get  
the various parts of the Add (expr.args works for other classes as  
well, such as multiplications, powers, and functions).

Aaron Meurer
>
> Cheers,
> William
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to