So I stuffed the one needed line into
sagenb/data/sage/html/notebook/base.html
where the worksheet name gets set, just above the
"server_ping_while_alive()" line. This works cleanly - it migrates to
the page, seemingly causes no odd behavior and it has the desired
effect.
Is there a way to have this same result on a per-worksheet basis as I
create a worksheet progrmatically, and if so, how?
Thanks,
Rob
Why not? The security restriction in jsmath prevents a user from
inserting arbitrary HTML into a page. However, Sage users can already
do that in several different ways. So I don't see a problem with
letting them create HTML via jsmath too.
--
Do you know off the top of your head in which file the
jsMath.safeHBoxes is set, or where I would place a change to override
the default settings?
The file is sagenb/data/sage/js/jsmath.js (line 97).
Pat's suggested file looks like where jsmath is located. I would
strongly suggest *not* patching jsmath. We have a couple of settings
related to jsmath that are done right around where we include
jsmath---do it there. That way we can transparently upgrade jsmath
(maybe to mathjax), and we clearly know where we deviate from the defaults.
I think I'm talking about data/sage/html/notebook/head.tmpl or something
like that.
Thanks,
Jason
I agree we shouldn't patch part of the jsMath distribution, and gave
this some thought. There is also
sagenb/data/jsmath/jsMath.js
in a directory full of lots of other jsMath files.
So is the file being patched under control of notebook development (as
it is in a subdirectory named "sage") or is it an integral part of
default jsMath? I don't know enough about how jsMath gets unpacked
into the notebook file structure to say for sure. The patch has a
positive review, so adjust that if required.
Thanks,
Rob
But it's not. The file
sagenb/data/sage/js/jsmath.js
is a template version of jsMath's easy/load.js. The server (see
twist.py) populates it with, e.g., our jsMath macros. (Someday, we
could set these and other preferences from server, user, and/or
worksheet settings.)
The jsMath files are in
sagenb/data/jsmath
The ticket is
Perfect. Thanks for clarifying.
Thanks,
Jason