>From the discussion of trac #4575:

There are already at least five functions that produce jsmath output
in the notebook, which all behave differently:

show():

    Produces latex in display mode. And works with graphic objects of
course.

view():

    Produces latex in inline mode (which is hard to read in the
notebook). This has many options that only work
    on the commandline and with xdvi. For graphic objects it returns a
string representation.

typeset():

    Same behaviour as view() but has no options.

pretty_print():

    produces latex in inline mode.

    If used on the graphics objects, it shows it like show(). But it
doesn't accept any options, as show() does.

jsmath():

    produces latex in display mode. For graphic objects it returns a
string representation, but inside latex
    math-mode.

    The docstring says that there is a option mode which changes
between display and inline mode.

    Unfortunately this only works in doctest mode. In the notebook I
get:

        sage: jsmath(x^2, 'inline')
        Traceback (click to the left for traceback)
        ...
        TypeError: __call__() takes exactly 2 arguments (3 given)

Is there a deeper reason why Sage has all these functions? Or have
they just accumulated over the years?
A few of these should probably be deprecated.

In my opinion show() is the best of these, because also x.show()
works, so it is consistent. It's short and easy
to remember. It just needs better documentation.

Would a mode flag for show() like the one for jsmath() be okay? Then
it could be extended in the future without adding additional keywords.

What should be the user interface for latex output in the notebook?

Greetings,
Wilfried
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to