#11775: Make pretty_print take multiple arguments
---------------------------+------------------------------------------------
   Reporter:  ppurka       |          Owner:  jason                
       Type:  enhancement  |         Status:  needs_review         
   Priority:  major        |      Milestone:  sage-4.7.2           
  Component:  misc         |       Keywords:  pretty_print         
Work_issues:               |       Upstream:  N/A                  
   Reviewer:  Keshav Kini  |         Author:  Punarbasu Purkayastha
     Merged:               |   Dependencies:                       
---------------------------+------------------------------------------------
Changes (by kini):

  * reviewer:  => Keshav Kini


Comment:

 I rebased the patch on 4.7.2.alpha3 (because of #11498 mainly). I got rid
 of the last chunk since I'm not sure that it's still relevant. Please
 sanity check! Here's the patch diff:

 {{{
 #!diff
 diff --git a/11775-pretty_print_multiple_args.patch
 b/.hg/patches/11775-pretty_print_multiple_args.patch
 index 8d4bdbf..0a9516d 100644
 --- a/11775-pretty_print_multiple_args.patch
 +++ b/.hg/patches/11775-pretty_print_multiple_args.patch
 @@ -1,14 +1,14 @@
  # HG changeset patch
  # User P Purkayastha <[email protected]>
 -# Date 1315137052 -28800
 +# Date 1317393015 25200
  # Node ID a5526ce127658e2865704fd6c30f8cde603c0a45
 -# Parent 2a2abbcad325ccca9399981ceddf5897eb467e64
 +# Parent 8a0b4f90f1ca76dbdba159897c39209c5da85442
  trac #11775: make pretty_print accept multiple arguments

  diff --git a/sage/misc/latex.py b/sage/misc/latex.py
  --- a/sage/misc/latex.py
  +++ b/sage/misc/latex.py
 -@@ -2077,7 +2077,7 @@
 +@@ -2120,7 +2120,7 @@
       else:
           print(object)

 @@ -17,14 +17,14 @@ diff --git a/sage/misc/latex.py b/sage/misc/latex.py
       r"""
       Try to pretty print an object in an intelligent way.  For graphics
       objects, this returns their default representation.  For other
 -@@ -2096,24 +2096,39 @@
 +@@ -2139,24 +2139,39 @@

           sage: from sage.misc.latex import pretty_print
           sage: pretty_print(ZZ)  # indirect doctest
  -        <html><span
 class="math">\newcommand{\Bold}[1]{\mathbf{#1}}\Bold{Z}</span></html>
 -+        <html><span
 class="math">\newcommand{\Bold}[1]{\mathbf{#1}}\hbox{$\Bold{Z}$}</span></html>
 ++        <html><span
 class="math">\newcommand{\Bold}[1]{\mathbf{#1}}\verb|$\Bold{Z}$|</span></html>
  +        sage: pretty_print("Integers = ", ZZ, ", $\\frac{d(x^3)}{dx} =$
 ", derivative(x^3, x)) # test m
 -+        <html><span
 class="math">\newcommand{\Bold}[1]{\mathbf{#1}}\hbox{Integers =
 $\Bold{Z}$, $\frac{
 ++        <html><span
 
class="math">\newcommand{\Bold}[1]{\mathbf{#1}}\verb|Integers|\phantom{x}\verb|=|\p
       """
  -    if object is None:
  -        return
 @@ -73,12 +73,3 @@ diff --git a/sage/misc/latex.py b/sage/misc/latex.py

   def pretty_print_default(enable=True):
       r"""
 -@@ -2130,7 +2145,7 @@
 -
 -         sage: pretty_print_default(True)
 -         sage: sys.displayhook
 --        <html><span class="math">...\hbox{ < function pretty_print at
 ... > }</span></html>
 -+        <html><span class="math">...\hbox{<function pretty_print at
 ...>}</span></html>
 -         sage: pretty_print_default(False)
 -         sage: sys.displayhook == sys.__displayhook__
 -         True
 }}}

 Doctesting again now.

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