It would be nice actually to have it available in Sage and support
classes with _latex_ but no _repr_ - right now it is OK to have the
opposite, i.e. define _repr_ and then it is used wrapped as verbatim
text for _latex_, if no special method is provided. I wrote several
classes recently whose output is a quite elaborate nested array and I
had no desire to figure out a plain text replacement. Not a problem
for me or my student as we just turn on typeset mode, but if someone
wants to use command line only or write comprehensible tests,
automatic text version would be convenient.

Andrey

On Nov 12, 10:34 am, Nils Bruin <nbr...@sfu.ca> wrote:
> On Nov 12, 7:21 am, Andrea Lazzarotto <andrea.lazzaro...@gmail.com>
> wrote:
>
> > > is there any method which gives me an Ascii output for a
> > > mathematical-express like sqrt(x)?
>
> You can use some of maxima's capabilities for that:
>
> sage: maxima(x^(1/x)).display2d()
>                                       1/x
>                                      x
>
> although maxima prefers "sqrt(x)" over "\/x"
>
> With this approach you're limited to expressions that can be converted
> to maxima and maintain enough of their meaning to be allowed to render
> correctly.
>
> > This one looks nice:http://asciitex.sourceforge.net/
>
> If that just accepts latex input you should be able to do something
> along the lines of
>
> E=latex(sqrt(x))
> os.system("asciiTex '%s'%E)
>
> since sage does try to have methods for pretty much anything to be
> rendered as latex.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
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.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.


Reply via email to