#14266: Simple Ascii-Art
---------------------------------------+------------------------------------
       Reporter:  elixyre              |         Owner:  was     
           Type:  task                 |        Status:  new     
       Priority:  major                |     Milestone:  sage-5.8
      Component:  user interface       |    Resolution:          
       Keywords:  ascii-art            |   Work issues:          
Report Upstream:  N/A                  |     Reviewers:          
        Authors:  Jean-Baptiste Priez  |     Merged in:          
   Dependencies:                       |      Stopgaps:          
---------------------------------------+------------------------------------

Comment (by elixyre):

 I don't reinventing the wheel... Then I prefere a nice LaTeX
 representation too but with some objects the LaTeX compilation is very
 slow.
 Then thanks to the method
 {{{
 sage: sage_input(m)
 }}}
 I didn't know but... after try...
 {{{
 sage: R = NonCommutativeSymmetricFunctions(QQ).R()
 sage: a = R[1]**3; a
 R  + R   + R   + R
  *    **     *    ***
  *    *     **
  *
 sage: %pcp
 'Pretty Console Print' is uninstalled
 sage: sage_input(a)
 ---------------------------------------------------------------------------
 ValueError                                Traceback (most recent call
 last)
 <ipython-input-10-7eccf1bd1684> in <module>()
 ----> 1 sage_input(a)

 /home/priezjea/sage-5.8.beta4/local/lib/python2.7/site-
 packages/sage/misc/sage_input.pyc in sage_input(x, preparse, verify,
 allow_locals)
     252     if not verify:
     253         sib = SageInputBuilder(allow_locals=allow_locals,
 preparse=preparse)
 --> 254         return sib.result(sib(x))
     255
     256     # In verify mode, we actually compute and verify the answer
 with

 /home/priezjea/sage-5.8.beta4/local/lib/python2.7/site-
 packages/sage/misc/sage_input.pyc in __call__(self, x, coerced)
     540             return SIE_literal_stringrep(self, loc_name)
     541         else:
 --> 542             raise ValueError, "Can't convert %r to sage_input
 form"%x
     543
     544     def preparse(self):

 ValueError: Can't convert R[1, 1, 1] + R[1, 2] + R[2, 1] + R[3] to
 sage_input form
 }}}

 and

 {{{
 sage: R[1]**3
 R[1, 1, 1] + R[1, 2] + R[2, 1] + R[3]
 }}}
 can be easily be copy.

 So I don't say I invented something... I just purpose something to work
 (In my case) easily with linear combination.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14266#comment:5>
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