#4714: use easy/load.js when loading jsmath in the notebook
------------------------+---------------------------------------------------
Reporter: jason | Owner: boothby
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.2
Component: notebook | Keywords:
Work_issues: | Author: Mitesh Patel
Reviewer: | Merged:
------------------------+---------------------------------------------------
Old description:
> From http://groups.google.com/group/sage-support/t/178d0bd277044918
>
> {{{
> Yes, that looks correct. I'm not sure why people are getting the
> error -7 under these conditions. It means that something has gone
> wrong when trying to load the fallback method, and that usually means
> it can't read the image font definition files. There are a couple of
> other possibilities as well: perhaps the noImageFonts plugin was not
> able to be read (permission issue?) or the unicode fallback file could
> not be read. Given your use of noImageFonts, I suspect it may be the
> latter. If the users who are getting error -7 are using Firefox3,
> that may well be it. There were changes to the same-origin security
> policy in Firefox3 that prevent jsMath from loading local files from
> directories other than the one in which the HTML file is found. I
> worked around this in jsMath v3.6 (released Sept. 2008), so those
> users should update to the latest version of jsMath to avoid that
> problem.
> > I'm pretty sure we don't use the easy/load.js (and I'm not sure why).
>
> Probably because it didn't exist when jsMath support was added to
> sage. The easy/load.js file was a relatively late addition to jsMath,
> but certainly makes things easier for people. You might consider
> whether you want to use that instead.
>
> Davide
New description:
The patch
* [attachment:trac_4714-sagenb_jsmath_init.patch]
consolidates jsMath setup in `/javascript/jsmath.js`. It depends on #6673.
It hard-codes the jsMath macros in `sagenb.misc.misc`, for now.
A quicker fix for shipping Sage 4.2 is this patch:
* [attachment:trac_4714-sagenb_hard_code_macros.patch]
It does only the hard-coding, so it does not depend on #6673.
--
Comment(by mpatel):
Note: With Jinja2 (cf. #7269, #7249), we can instead use, e.g.,
{{{
#!js
macros: {
{{ jsmath_macros|join(',\n') }}
},
}}}
in `jsmath.js` (cf. #6673).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4714#comment:14>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---