Thanks,
Jason
We put in some backwards-compatible shims so that existing code works,
but we highly encourage several changes for people that are embedding
aleph into their webpages:
1. The script tags to add are now:
<script type="text/javascript"
src="http://aleph.sagemath.org/static/jquery.min.js"></script>
<script type="text/javascript"
src="http://aleph.sagemath.org/embedded_sagecell.js"></script>
(notice that jquery doesn't have a version number anymore, and
'singlecell' was replaced with 'sagecell')
2. The singlecell.makeSinglecell function becomes sagecell.makeSagecell
3. The singlecell.init function becomes sagecell.init
We'll probably remove the compatibility shims when we release 1.0. I'm
not sure when that will be (we've been real close for a long time, but
we've also been really busy with the semester and the new sage
notebook). But it won't hurt to update your code soon.
Thanks,
Jason
Not necessarily, the inputLocation/outputLocation fields for embedding
should be able to be set to anything as long as it is a valid jQuery
selector that corresponds to a single, unique element on the page.
Lots of the credit goes to Alex Kramer.
You don't have to use CSS anymore to hide things. We explicitly support
hiding the Session numbers, etc. See
https://github.com/jasongrout/sagecell/blob/massive-upgrade/doc/embedding.rst
Jason
I'm still trying to track down the first problem, but the second error
appears to be an issue with a class that attempts to ensure interact
syntax compatibility with the regular sagenb (we re-wrote interacts
for the sage cell). I've opened an issue for that here:
https://github.com/sagemath/sagecell/issues/245
Thanks for reporting the issues!
The issue with the first example results from type coercion with
interact controls not working properly. I've opened an issue here
about it: https://github.com/sagemath/sagecell/issues/246
Until that's fixed (which hopefully should be soon), if you manually
do the type coercion, the first interact appears to work perfectly.
I'm not quite sure about a quick fix for the second interact yet.
Thanks again for the bug reports!
Very cool interact (that second one). I fixed the problem. However,
you need to add:
u,v=var('u,v')
at the top before the definition of the interact to get it to work
right. This is a separate problem from the one in the issue above.
Here is a permalink of what I mean: http://tinyurl.com/76tsadv
Alex: it looks like there is another issue with the slider not appearing
in this interact. I think you knew about this one (when we have a
layout with more than one control horizontally). See the above code
example for details.
So I guess this means two more tickets:
1. Why do we have to add u,v=var('u,v') in the sage cell, but not in the
notebook
2. Sliders disappearing when they are first in a row of controls using
the layout option.
Thanks,
Jason
I feel the same way. I think having free registration on sagenb.org
opens up our "market" quite a bit. Having widgets you can embed on a
webpage opens us up to at least an order of magnitude more people.
>
> A couple of other issues that I have noticed:
>
> 1. Following the permalink http://tinyurl.com/76tsadv I see "=" under
> "y(u, v)", not next to it (Firefox 10 on Win7Pro64, if it is relevant
> - notebook version is fine).
This is probably just an issue with the sizing of tables. Thanks for
pointing this out; we'll see about fixing it.
>
> 2. A different font is used for mathematics - is it how it is supposed
> to be? In notebook things look like I would expect in LaTeX. In
> singlecell it is something else - looks fine, but not what I expect.
The sage cell server uses mathjax, while the notebook uses jsmath (the
predecessor to mathjax) currently. We will be switching the notebook to
mathjax really soon, as it really is much better than jsmath in many ways.
>
> 3. This is a problem with notebook as well: I like making labels like
> "$y(u, v) = $" for input boxes. But in this case the space on the
> right of "=" is bigger than on the left and it does not look pretty,
> so I insert "\hskip{-1ex}" to fix it, but it is annoying. While minor,
> it looks even worse when a bunch of boxes are used as coefficients in
> an equation (e.g. https://sage.math.ualberta.ca:8015/home/pub/2/ ).
> Also, when there are several boxes in a row, the label of the right
> box is closer to the left input box than the label of this left input
> box! So it is necessary to add commas/space in the beginning of the
> right label to avoid confusion.
Yes, the layout issues are some of issues we haven't settled completely.
We'd like to add an HTML layout option that lets you just use
arbitrary HTML code to style your controls. Then you can do whatever
you want with them.
Jason
Good point. The part that bothers me is that someone said these
interacts worked in the notebook (I haven't checked though; do they?),
so there is something of a backwards compatibility thing going on.
Jason
Interacts were completely rewritten from scratch for the sage cell
server, so likely there is such a difference.
Jason