#11775: Make pretty_print take multiple arguments
--------------------------------------+-------------------------------------
    Reporter:  ppurka                 |         Owner:  jason       
        Type:  enhancement            |        Status:  needs_review
    Priority:  major                  |     Milestone:  sage-4.8    
   Component:  misc                   |    Resolution:              
    Keywords:  pretty print           |   Work_issues:              
    Upstream:  N/A                    |      Reviewer:  Keshav Kini 
      Author:  Punarbasu Purkayastha  |        Merged:              
Dependencies:                         |  
--------------------------------------+-------------------------------------

Comment(by jhpalmieri):

 Proof of concept of typesetting function (to typeset a string using
 LaTeX):
 {{{
 #!python
 # something like this could be in latex.py...
 def typeset(s, debug=False, viewer=None, **kwds):
     r"""nodetex
     Typeset a string using LaTeX.
     """
     if EMBEDDED_MODE and viewer is None:
         Latex(density=130, debug=debug, **kwds).eval(s, globals=globals())
         return
     png_file = tmp_filename()
     Latex().eval(s, globals=globals(), filename=png_file, debug=debug,
 **kwds)
     import sage.misc.viewer
     viewer = sage.misc.viewer.png_viewer()
     if viewer.startswith('sage-native-execute '):
         viewer = viewer.split()[1]
     if debug:
         print 'viewer: "{0}"'.format(viewer)
     subprocess.call(['sage-native-execute', viewer, png_file+'.png'],
                     stdout=subprocess.PIPE, stderr=subprocess.PIPE)
     return
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11775#comment:27>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to