qtconsole not rendering Matrix correctly?

41 views
Skip to first unread message

Reckoner

unread,
Aug 16, 2011, 4:35:42 PM8/16/11
to sympy
Hi,

I'm using Ipython 0.11 with the sympy profile with version 0.7.1 and
the Matrix object is not rendered correctly. There are lots of little
"?" signs on the borders where the edges of the matrix should be.

any ideas?

this is on windows xp with python 2.6

Thanks!

Aaron Meurer

unread,
Aug 16, 2011, 4:53:56 PM8/16/11
to sy...@googlegroups.com
It works fine for me.

Likely the problem is the unicode font we use to print the Matrix
brackets. Does [1/x] print correctly? What if you enter

print u"""
⎡1⎤
⎢─⎥
⎣x⎦
"""

? If not, then I guess you need to get better fonts. I can't tell
you too much, as I didn't develop IPython. You might bring it up on
their users list.

Aaron Meurer

> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To post to this group, send email to sy...@googlegroups.com.
> To unsubscribe from this group, send email to sympy+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
>
>

Reckoner

unread,
Aug 16, 2011, 5:13:46 PM8/16/11
to sympy
Yes,1/x prints fine. Every sqrt() prints fine. I'm just having trouble
with Matrix.

Aaron Meurer

unread,
Aug 16, 2011, 5:39:27 PM8/16/11
to sy...@googlegroups.com
No, I mean [1/x]. That is, a list with a single element, which is
1/x. The brackets that we use to print lists are exactly the same as
the ones we use to print matrices.

To be more clear, perhaps I should have asked you to try [1, 1/x].

Aaron Meurer

Reckoner

unread,
Aug 17, 2011, 11:07:55 AM8/17/11
to sympy
Thanks for the clarification. No, [1/x] does not print out correctly.
It is surrounded by a bunch of "?" symbols. Additionally, [1, 1/x]
does not print out correctly either.

Thanks again.

Aaron Meurer

unread,
Aug 17, 2011, 3:01:23 PM8/17/11
to sy...@googlegroups.com
So the problem is that you don't have those symbols in whatever font
the qtconsole uses. I don't know how to change the font that it uses
(you'd have to ask on the IPython list), but you might try just
installing a monospace font that has them. I know that DejaVu Sans
Mono, the font I use, has them (this is also an excellent monospaced
font anyway, and I've found that pretty printed expressions look
really nice in it). I don't know how Windows works, but in Mac OS X
and Linux, font substitution happens automatically, so perhaps if you
install this font it will just start working.

Aaron Meurer

Reply all
Reply to author
Forward
0 new messages