On Saturday, December 10, 2016 at 12:31:20 PM UTC-8, Qian Hong wrote:
>
> Thanks David, 
>
> On Sun, Dec 11, 2016 at 7:02 AM, David Roe <roed...@gmail.com 
> <javascript:>> wrote: 
> > The issue is with the simplification of the expression, rather than the 
> > latex function.  The following currently works: 
> > 
> > sage: latex(x.mul(x.power(-1),hold=True)) 
> > \frac{x}{x} 
> > 
> > Is this sufficient for your purposes?  If not, the relevant code is in 
> > sage/symbolic/expression.pyx (it's a big file: search for `hold=False`). 
>
> No, this is not automatically enough, I'm looking for an automatic way 
> rather than manually rewriting every expressions.


So it seems like you'd want a parser for symbolic expressions that "holds" 
by default. There is a parser in sage, see sage.misc.parser .
You might be able to subclass/modify that with relatively little effort to 
ensure that operations are "held".

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to