Comment #1 on issue 2646 by asmeurer: Space between multiple pretty-printed multiple integral signs
http://code.google.com/p/sympy/issues/detail?id=2646

Something like this will fix the unicode. ASCII is a little more tricky. I'm not sure if this looks the best for integrals with limits. Look at what it does for [2] for example:

diff --git a/sympy/printing/pretty/pretty.py b/sympy/printing/pretty/pretty.py
index 0b26497..9409373 100644
--- a/sympy/printing/pretty/pretty.py
+++ b/sympy/printing/pretty/pretty.py
@@ -318,13 +318,16 @@ def _print_Integral(self, integral):
                 #    # but I left it as is
                 #    pform = prettyForm(*pform.right(' '))

-            if not ascii_mode:  # XXX hack
-                pform = prettyForm(*pform.right(' '))

             if firstterm:
+                if not ascii_mode:  # XXX hack
+                    pform = prettyForm(*pform.right(' '))
+
                 s = pform   # first term
                 firstterm = False
             else:
+                if not ascii_mode and len(lim) > 1:
+                    pform = prettyForm(*pform.right(' '))
                 s = prettyForm(*s.left(pform))

         pform = prettyForm(*arg.left(s))


In [1]: Integral(sin(x*y*z), (x, 0, 1), y, z)
Out[1]:
  1
⌠⌠⌠
⎮⎮⎮ sin(x⋅y⋅z) dx dy dz
⌡⌡⌡
  0

In [2]: Integral(sin(x*y*z), (x, 0, 1), (y, 0, 1), z)
Out[2]:
 1 1
⌠⌠ ⌠
⎮⎮ ⎮ sin(x⋅y⋅z) dx dy dz
⌡⌡ ⌡
 0 0

In [3]: Integral(sin(x*y*z), (x, 0, 1), (y, 0, 1), (z, 0, 1))
Out[3]:
1 1 1
⌠ ⌠ ⌠
⎮ ⎮ ⎮ sin(x⋅y⋅z) dx dy dz
⌡ ⌡ ⌡
0 0 0

In [4]: Integral(sin(x*y*z), (x, 0, 1), (y, 0, 1), (z, 0, 1/(t + 1)))
Out[4]:
  1
─────
t + 1 1 1
  ⌠   ⌠ ⌠
  ⎮   ⎮ ⎮ sin(x⋅y⋅z) dx dy dz
  ⌡   ⌡ ⌡
  0   0 0


--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" 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/sympy-issues?hl=en.

Reply via email to