[sage-support] Re: Warnings from JsMath

2008-01-27 Thread bill purvis

On Saturday 26 January 2008, dpvc wrote:
> > I find the warning messages that appear at the top of the notebook saying
> > that JsMath isn't available annoying.
>
> If you look carefully, it says the jsMath TeX fonts aren't found, not
> that jsMath isn't found (in fact, it is jsMath that issuing the
> message, so clearly that was found).
>
> > I find it especially annoying when I try to print something - I get a big
> > red box at the top of my output saying:
> >
> > To print higher resolution math symbols, click the
> > Hi_Res Fonts for Printing button on thejsMathcontrol panel.
>
> If you would install the jsMath TeX fonts, that would go away.
>
> > What control panel?
>
> The small jsMath button at the bottom right of the screen links to the
> control panel.  Also, the initial jsMath font warning page that you
> get when you first view the notebook has two buttons on it:  one to
> hide the message and one to open the jsMath control panel.  If you
> don't like to see the message, you can push the hide button and it
> will go away (no more work than if you were receive an alert
> message).  If you don't know how to get the jsMath control panel, you
> can get it from that message.  You can also get it by ALT-clicking on
> any typeset mathematics.
>
> > If you have to issue a warning, it should be on the 'print' window,
> > before you commit to paper. Having seen the message, if you go ahead, it
> > should not appear on the paper!
>
> If sage constructs a special version of the page for printing purposes
> (I don't use sage myself, so I'm unfamiliar with its workings), then
> it would be possible for that page to load the higher-resolution fonts
> automatically (via the insertion of a line similar to the one William
> listed for turning off the main font warning).  Otherwise, if you are
> just printing the page out of the browser, there is no way to jsMath
> to know if you are planning to print such a page, and so it  puts it
> in the only place that makes sense, the printed version, which will be
> showing the poor quality output and where it is likely to do you some
> good.  Putting it on every page you view would be considered by some
> users as "annoying".
>
> The jsMath panel allows you to control the printing of these messages,
> so the user has the option of turning them off himself.  You can also
> configure jsMath not to display the print warnings in a similar
> fashion to William's message about the main font warnings.  You can
> also change the CSS styles for the message to make them less
> obtrusive, or replace the content of the message by your own wording.
> Finally, you can override jsMath's function for issuing the message
> and so make it appear anywhere or in any form you want.  These
> possibilities are documented at
>
> http://www.math.union.edu/locate/jsMath/authors/warnings.html
>
> so the sage project could set up the messages in a different way if it
> wants to.
>
> Davide
Davide, see my earlier message to William.
Apologies for my confusion. There's a lot of stuff for my poor aged
brain to absorb and I hadn't read your web pages properly...  :-)

Bill
-- 
+---+
| Bill Purvis, Amateur Mathematician|
|  email: [EMAIL PROTECTED]  |
|  http://bil.members.beeb.net  |
+---+

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Warnings from JsMath

2008-01-27 Thread William Stein

On Jan 27, 2008 12:19 PM, bill purvis <[EMAIL PROTECTED]> wrote:
>
>
> On Friday 25 January 2008, William Stein wrote:
> > On Jan 25, 2008 4:49 AM, bill purvis <[EMAIL PROTECTED]> wrote:
> > > On Friday 25 January 2008, Timothy Clemans wrote:
> > > > See http://www.math.union.edu/~dpvc/jsmath/download/jsMath-fonts.html.
> > > > There are install instructions for PC, Mac OS X, and Unix users.
> > > >
> > > > On Jan 24, 11:45 pm, bill purvis <[EMAIL PROTECTED]> wrote:
> > >
> > > Yes, but what about Sage users?
> > >
> > > They say unpack them in the server tree. I know where my Apache server
> > > keeps things, and I've installed them in there.
> >
> > ??!  There is nothing about "server trees" here:
> > http://www.math.union.edu/~dpvc/jsmath/download/jsMath-fonts.html
> >
> > You just download a 120KB zipped font file, extract it and install it
> > as explained there.
> > It has nothing whatever to do with servers.
> OK, I apologise!
> I downloaded them and followed the instructions. They say I have to reload
> X11 server which I've not done, though I had to restart Firefox then the
> popups went away.
> Checked out the printouts too, though my comment that the warning about
> printing should be on the screen rather than the paper still holds.

I agree with that.  When one clicks the print button in the notebook it should
render the html with jsmath but with no warning at all.  I've made this
trac #1950:

   http://trac.sagemath.org/sage_trac/ticket/1950

William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Warnings from JsMath

2008-01-27 Thread bill purvis

On Friday 25 January 2008, William Stein wrote:
> On Jan 25, 2008 4:49 AM, bill purvis <[EMAIL PROTECTED]> wrote:
> > On Friday 25 January 2008, Timothy Clemans wrote:
> > > See http://www.math.union.edu/~dpvc/jsmath/download/jsMath-fonts.html.
> > > There are install instructions for PC, Mac OS X, and Unix users.
> > >
> > > On Jan 24, 11:45 pm, bill purvis <[EMAIL PROTECTED]> wrote:
> >
> > Yes, but what about Sage users?
> >
> > They say unpack them in the server tree. I know where my Apache server
> > keeps things, and I've installed them in there.
>
> ??!  There is nothing about "server trees" here:
> http://www.math.union.edu/~dpvc/jsmath/download/jsMath-fonts.html
>
> You just download a 120KB zipped font file, extract it and install it
> as explained there.
> It has nothing whatever to do with servers.
OK, I apologise!
I downloaded them and followed the instructions. They say I have to reload
X11 server which I've not done, though I had to restart Firefox then the
popups went away.
Checked out the printouts too, though my comment that the warning about 
printing should be on the screen rather than the paper still holds.
On the other hand, that's probably not in your court :-)

Bill
-- 
+---+
| Bill Purvis, Amateur Mathematician|
|  email: [EMAIL PROTECTED]  |
|  http://bil.members.beeb.net  |
+---+

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Warnings from JsMath

2008-01-27 Thread William Stein

On Jan 27, 2008 12:03 PM, bill purvis <[EMAIL PROTECTED]> wrote:
>
>
> On Friday 25 January 2008, William Stein wrote:
> > On Jan 25, 2008 4:49 AM, bill purvis <[EMAIL PROTECTED]> wrote:
> > > On Friday 25 January 2008, Timothy Clemans wrote:
> > > > See http://www.math.union.edu/~dpvc/jsmath/download/jsMath-fonts.html.
> > > > There are install instructions for PC, Mac OS X, and Unix users.
> > > >
> > > > On Jan 24, 11:45 pm, bill purvis <[EMAIL PROTECTED]> wrote:
> > >
> > > Yes, but what about Sage users?
> > >
> > > They say unpack them in the server tree. I know where my Apache server
> > > keeps things, and I've installed them in there.
> >
> > ??!  There is nothing about "server trees" here:
> > http://www.math.union.edu/~dpvc/jsmath/download/jsMath-fonts.html
> >
> > You just download a 120KB zipped font file, extract it and install it
> > as explained there.
> > It has nothing whatever to do with servers.
> >
> > > Where is the server tree for the notebook server?
> >
> That is just talking about installing TeX fonts which are installed on
> my system anyway. I've been using TeX/LaTeX for years...

This is not about installing TeX fonts which are on your system anyways.
Jsmath is a javascript implementation of TeX that runs in a web browser.
It requires its own version of the tex fonts, which are that 120KB zipped
file mentioned above.  It certainly does not make use of fonts that come
with, e.g., the teTex tex install.

> I guess we have been somehow talking at cross purposes here.
>
> I'll check further to see if there's something gone adrift.
>
>
> Bill
> --
> +---+
> | Bill Purvis, Amateur Mathematician|
> |  email: [EMAIL PROTECTED]  |
> |  http://bil.members.beeb.net  |
> +---+
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Warnings from JsMath

2008-01-27 Thread bill purvis

On Friday 25 January 2008, William Stein wrote:
> On Jan 25, 2008 4:49 AM, bill purvis <[EMAIL PROTECTED]> wrote:
> > On Friday 25 January 2008, Timothy Clemans wrote:
> > > See http://www.math.union.edu/~dpvc/jsmath/download/jsMath-fonts.html.
> > > There are install instructions for PC, Mac OS X, and Unix users.
> > >
> > > On Jan 24, 11:45 pm, bill purvis <[EMAIL PROTECTED]> wrote:
> >
> > Yes, but what about Sage users?
> >
> > They say unpack them in the server tree. I know where my Apache server
> > keeps things, and I've installed them in there.
>
> ??!  There is nothing about "server trees" here:
> http://www.math.union.edu/~dpvc/jsmath/download/jsMath-fonts.html
>
> You just download a 120KB zipped font file, extract it and install it
> as explained there.
> It has nothing whatever to do with servers.
>
> > Where is the server tree for the notebook server?
>
That is just talking about installing TeX fonts which are installed on 
my system anyway. I've been using TeX/LaTeX for years...

I guess we have been somehow talking at cross purposes here.

I'll check further to see if there's something gone adrift.

Bill
-- 
+---+
| Bill Purvis, Amateur Mathematician|
|  email: [EMAIL PROTECTED]  |
|  http://bil.members.beeb.net  |
+---+

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Graph isomorphism problem.

2008-01-27 Thread Carlo Hamalainen

Hi,

I have two graphs, g1 and g2 (defined below), for which
g1.is_isomorphic(g2) fails, but I know that they are isomorphic, and I
can apply a relabelling of the vertices of g1 so that
g1.is_isomorphic(g2) evaluates to True (see the code at the end of
this email).

Have I set up something incorrectly? At first I wondered if vertices
have to be in the range 0..n (mine are on 1..n) but adding an isolated
vertex '0' doesn't change the behaviour of my code.

Any ideas?

-- 
Carlo Hamalainen
http://carlo-hamalainen.net


# This file is at http://carlo-hamalainen.net/sagetmp/graphiso.sage

g1 = graphs.EmptyGraph()
g2 = graphs.EmptyGraph()

g1.add_edges([(1, 17, None), (1, 21, None), (1, 25, None), (2, 17,
None), (2, 22, None), (2, 26, None), (3, 17, None), (3, 23, None), (3,
27, None), (4, 17, None), (4, 24, None), (4, 28, None), (5, 18, None),
(5, 21, None), (5, 26, None), (6, 18, None), (6, 22, None), (6, 27,
None), (7, 18, None), (7, 23, None), (7, 28, None), (8, 18, None), (8,
24, None), (8, 25, None), (9, 19, None), (9, 21, None), (9, 27, None),
(10, 19, None), (10, 22, None), (10, 28, None), (11, 19, None), (11,
23, None), (11, 25, None), (12, 19, None), (12, 24, None), (12, 26,
None), (13, 20, None), (13, 21, None), (13, 28, None), (14, 20, None),
(14, 22, None), (14, 25, None), (15, 20, None), (15, 23, None), (15,
26, None), (16, 20, None), (16, 24, None), (16, 27, None), (17, 29,
None), (18, 29, None), (19, 29, None), (20, 29, None), (21, 30, None),
(22, 30, None), (23, 30, None), (24, 30, None), (25, 31, None), (26,
31, None), (27, 31, None), (28, 31, None)])

g2.add_edges([(1, 17, None), (1, 21, None), (1, 28, None), (2, 17,
None), (2, 22, None), (2, 25, None), (3, 17, None), (3, 23, None), (3,
26, None), (4, 17, None), (4, 24, None), (4, 27, None), (5, 18, None),
(5, 21, None), (5, 26, None), (6, 18, None), (6, 22, None), (6, 27,
None), (7, 18, None), (7, 23, None), (7, 28, None), (8, 18, None), (8,
24, None), (8, 25, None), (9, 19, None), (9, 21, None), (9, 27, None),
(10, 19, None), (10, 22, None), (10, 28, None), (11, 19, None), (11,
23, None), (11, 25, None), (12, 19, None), (12, 24, None), (12, 26,
None), (13, 20, None), (13, 21, None), (13, 25, None), (14, 20, None),
(14, 22, None), (14, 26, None), (15, 20, None), (15, 23, None), (15,
27, None), (16, 20, None), (16, 24, None), (16, 28, None), (17, 29,
None), (18, 29, None), (19, 29, None), (20, 29, None), (21, 30, None),
(22, 30, None), (23, 30, None), (24, 30, None), (25, 31, None), (26,
31, None), (27, 31, None), (28, 31, None)])

perm = {0:0, 1: 13, 2: 14, 3: 15, 4: 16, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9,
10: 10, 11: 11, 12: 12, 13: 1, 14: 2, 15: 3, 16: 4, 17: 20, 18: 18,
19: 19, 20: 17, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27:
27, 28: 28, 29: 29, 30: 30, 31: 31}

# This says no:
print g1.is_isomorphic(g2)

# But I can find a vertex relabelling...
g1.relabel(perm)
# ... and this says yes:
print g1.is_isomorphic(g2)

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Warnings from JsMath

2008-01-27 Thread William Stein

On Jan 26, 2008 3:49 AM, dpvc <[EMAIL PROTECTED]> wrote:
>
> > The fonts I downloaded are 80Mb!
>
> You downloaded the wrong thing.  There are two kinds of fonts used by
> jsMath:  one is standard TTF fonts that the browser can use like any
> other font.  These are called the "jsMath TeX fonts", and are what the
> warning message is complaining about.  The link on the jsMath control
> panel to "Missing Fonts" takes you to a page that explains this and
> links to the download page for the missing fonts.  That is the page
> William and others have pointed you to in other messages.  These fonts
> are small and are installed on the machine that is running the browser
> that is viewing pages that contain jsMath.
>
> The other type of font is called the "jsMath Image Fonts" and is the
> 80 MB download you talk about.  These are not really fonts, they are
> collections of images of the characters in the fonts (an image for
> each character in each font in each size that jsMath uses, and so
> there are tens of thousands of them).  These go on the SERVER, as part
> of the jsMath folder.  Individual users don't usually install these on
> their machines, but since sage is running locally on your machine, it
> has a full installation of the jsMath server files, and so these image
> fonts must be there as well.
^^^

Sage (the SERVER) actually does *not* include the 80MB jsMath Image Fonts.
I made the decision not to include them a long time ago, mostly because of disk
space and configuration issues, and it hasn't been revisited yet.

>  These are what get used if the browser
> doesn't have access to the jsMath TeX fonts described above; that is,
> when you see the font warning message, it is these image fonts that
> jsMath falls back on.

Actually since Sage does not include those fonts, the fallback math
typesetting is currently using unicode.

> A normal user doesn't have to worry about the jsMath image fonts, only
> the jsMath TeX fonts, but since you are really running a jsMath server
> locally, sage users do have to have (and understand) both.

I don't think we have to have both, since in fact we don't have both.

> > And where should they be installed? I can't work out where the
> > notebook server expects to find them.
>
> The jsMath TeX fonts are installed in the place that all other fonts
> go on your system (e.g., in the Fonts control panel under Windows, or
> ~/Library/Fonts on Mac OS X, or ~/.fonts on linux).
>
> The jsMath image fonts are unpacked into the jsMath source directory
> (somewhere inside the sage directories, I assume), and that is

Presumably here:

SAGE_ROOT/data/extcode/javascript/jsmath/

> documented on the author's download page of the jsMath website.  But
> you should not be having to deal with that, as I suspect the sage
> distribution already includes these image font files in the correct
> place.

We don't due to size issues, as mentioned above.

William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---