Cannot pretty print in sage

573 views
Skip to first unread message

schmmd

unread,
Feb 17, 2009, 2:53:33 PM2/17/09
to sage-support
I don't seem to be able to pretty print in sage. I remember doing
this in class, but the pretty_print function gives the error "It looks
like jsMath failed to set up properly (error code -7). I will try to
keep going, but it could get ugly." when I use it in the notebook
through vmware or the notebook on one of the public web servers. Am I
doing anything wrong? How can I, for example, print a matrix with
latex formatting?

Jason Grout

unread,
Feb 17, 2009, 4:09:40 PM2/17/09
to sage-s...@googlegroups.com


You are doing things correctly. You just need to install some fonts.
See
http://wiki.sagemath.org/faq#IgetanerrorfromjsMathorthemathsymbolsdon.27tlookrightwhendisplayinginthenotebook

Typically, you could do show(M) if M is a matrix and it will show the
thing in a nice format.

Jason

Carl Witty

unread,
Feb 17, 2009, 4:39:04 PM2/17/09
to sage-support
On Feb 17, 1:09 pm, Jason Grout <jason-s...@creativetrax.com> wrote:
> schmmd wrote:
> > I don't seem to be able to pretty print in sage.  I remember doing
> > this in class, but the pretty_print function gives the error "It looks
> > like jsMath failed to set up properly (error code -7).  I will try to
> > keep going, but it could get ugly." when I use it in the notebook
> > through vmware or the notebook on one of the public web servers.  Am I
> > doing anything wrong?  How can I, for example, print a matrix with
> > latex formatting?
>
> You are doing things correctly.  You just need to install some fonts.
> See http://wiki.sagemath.org/faq#IgetanerrorfromjsMathorthemathsymbolsdon...

Where does this error message come from? How hard would it be to
change it to refer to
http://wiki.sagemath.org/faq#IgetanerrorfromjsMathorthemathsymbolsdon.27tlookrightwhendisplayinginthenotebook
?

(I think this might be worth doing even if it requires patching
jsMath.)

Carl

Ondrej Certik

unread,
Feb 17, 2009, 4:43:31 PM2/17/09
to sage-s...@googlegroups.com

I am getting the same error, so I followed up the wiki and I installed
both jsmath-fonts and smath-fonts-sprite packages in Ubuntu, but the
error still stays...

Ondrej

Jason Grout

unread,
Feb 17, 2009, 6:11:58 PM2/17/09
to sage-s...@googlegroups.com

It wouldn't be hard to change. Davide gave us instructions a long time
ago on the mailing list to do something like this, IIRC.

Jason

Ondrej Certik

unread,
Feb 24, 2009, 5:07:05 PM2/24/09
to sage-s...@googlegroups.com

I think this error is very annoying, as I am getting it on basically
all computers where I tried it.

When I get some time, I'll try to figure out how to patch jsmath not
to show this message at all.

Ondrej

Jason Grout

unread,
Feb 24, 2009, 5:12:12 PM2/24/09
to sage-s...@googlegroups.com
Ondrej Certik wrote:
> On Tue, Feb 17, 2009 at 1:43 PM, Ondrej Certik <ond...@certik.cz> wrote:
>> On Tue, Feb 17, 2009 at 1:39 PM, Carl Witty <carl....@gmail.com> wrote:
>>> On Feb 17, 1:09 pm, Jason Grout <jason-s...@creativetrax.com> wrote:
>>>> schmmd wrote:
>>>>> I don't seem to be able to pretty print in sage. I remember doing
>>>>> this in class, but the pretty_print function gives the error "It looks
>>>>> like jsMath failed to set up properly (error code -7). I will try to
>>>>> keep going, but it could get ugly." when I use it in the notebook
>>>>> through vmware or the notebook on one of the public web servers. Am I
>>>>> doing anything wrong? How can I, for example, print a matrix with
>>>>> latex formatting?
>>>> You are doing things correctly. You just need to install some fonts.
>>>> See http://wiki.sagemath.org/faq#IgetanerrorfromjsMathorthemathsymbolsdon...
>>> Where does this error message come from? How hard would it be to
>>> change it to refer to
>>> http://wiki.sagemath.org/faq#IgetanerrorfromjsMathorthemathsymbolsdon.27tlookrightwhendisplayinginthenotebook
>>> ?
>>>
>>> (I think this might be worth doing even if it requires patching
>>> jsMath.)
>> I am getting the same error, so I followed up the wiki and I installed
>> both jsmath-fonts and smath-fonts-sprite packages in Ubuntu, but the
>> error still stays...


Install the jsmath-image-fonts spkg (i.e., *sage* package, not ubuntu
package), and the error should go away...I think...

That said, I agree that the error message is annoying, though it's
probably annoying for a reason...

Jason

Ondrej Certik

unread,
Feb 24, 2009, 5:45:45 PM2/24/09
to sage-s...@googlegroups.com

Ah -- I was stupid, yes, this fixes the problem! Thanks a lot!

>
> That said, I agree that the error message is annoying, though it's
> probably annoying for a reason...

So maybe jsmath-image-fonts could be in Sage by default?

Ondrej

leonardo parada

unread,
Feb 24, 2009, 5:48:04 PM2/24/09
to sage-s...@googlegroups.com
..can I do PDF for print in SAGE??

2009/2/24 Ondrej Certik <ond...@certik.cz>



--
Leonardo Parada
Licenciado en Ingenieria Acustica
Ingeniero en Acustica (c)
http://leonardoparada.cl

Jason Grout

unread,
Feb 24, 2009, 5:51:39 PM2/24/09
to sage-s...@googlegroups.com

It's too big---something like 80MB unzipped (lots and lots and lots of
little tiny image files; one for each character).

The error message should be changed, and we ought to distribute the
fonts from the jsmath homepage with Sage, so that instead of an error
message, there is a nice helpful link that says something like "to get
much better fonts, click here and follow these instructions, or install
the jsmath-image-fonts spkg"

Jason

William Stein

unread,
Feb 24, 2009, 5:55:51 PM2/24/09
to sage-s...@googlegroups.com
On Tue, Feb 24, 2009 at 2:51 PM, Jason Grout

+1!! We've been meaning to do that forever...

William

Reply all
Reply to author
Forward
0 new messages