#14104: Implement an interface for displaying objects in HTML from the command 
line
----------------------------------+-----------------------------------------
       Reporter:  andrew.mathas   |         Owner:  andrew.mathas
           Type:  enhancement     |        Status:  new          
       Priority:  major           |     Milestone:  sage-5.8     
      Component:  user interface  |    Resolution:               
       Keywords:                  |   Work issues:               
Report Upstream:  N/A             |     Reviewers:               
        Authors:  Andrew Mathas   |     Merged in:               
   Dependencies:                  |      Stopgaps:               
----------------------------------+-----------------------------------------

Comment (by slabbe):

 At the LMFDB workshop in Edimbourg last January, we had those kind of
 discussions about the fact that each !SageObject could/should have html
 representation (see for instance the thread on
 [https://groups.google.com/d/topic/sage-devel/1sH0xC4H7Uo/discussion Sage
 Explorer] on sage-devel). At the time, I was thinking the interface could
 be the same as it is now for latex, or string representation :

 {{{
 #!python
 def _repr_(self):
     r"""
     Returns string representation.
     """
 def _latex_(self):
     r"""
     Returns latex representation.
     """
 def _html_(self):
     r"""
     Returns html representation.
     """
 }}}

 These methods do not show up on tab completion without the first
 underscore but `html(s)` could work... The problem here may be that `html`
 can be defined as just returning the code without opening a browser. Then,
 `html_display` would be the name for that? Just saying here that the
 choice of the name of this method should be the same for all !SageObject,
 so we should make sure there is no better choice!

 ----

 Related to this, the documentation of a function can be consulted in the
 browser and opened from the command-line (works in the notebook as well):

 {{{
     sage: browse_sage_doc(factor)
 }}}

 It works also for methods of an object::

 {{{
     sage: m = matrix(2, range(4))
     sage: browse_sage_doc(m.inverse)
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14104#comment:9>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to