Do we have that on the wiki yet, Angel? If not, we need to add it. Since
MathJax actually rewrites the entire page after loading, you have to make
sure your Jmol applet is added within a script that runs only after MathJax
is complete. Not sure if MathJax has a callback on that, but there is a div
on the page that is hidden and is reporting MathJax progress.
Here is a rendition of that prior message on this list, updated a bit for
newer JSmol.min.js versions.
It's a pretty simple solution. Really what the problem is is that both Jmol
and MathJax are competing for the AJAX processing. For compatibility with
MathJax, make sure:
1) you are using dynamic loading of the applet
-- no <script> tags that use Jmol.getApplet() within the body
-- use $(document).ready() to create all applets
2) then set the jQuery document ready event to monitor MathJax loading and
only start in on the AJAX until that is done. For example:
$(document).ready(function(){
loadJmol();
});
loadJmol = function() {
if (!$("#MathJax_Message")[0] ||
$('#MathJax_Message:contains("Loading")')[0]) {
setTimeout(loadJmol, 10);
return;
}
Info.deferApplet = false;
Info.deferUncover = true;
$("#appletplace1").html(Jmol.getAppletHtml("jmol1", Info));
Info.deferApplet = true;
Info.deferUncover = true;
$("#appletplace2").html(Jmol.getAppletHtml("jmol2", Info));
}
On Thu, Nov 14, 2013 at 3:17 AM, Carl McBride <carl.mcbr...@ccia.uned.es>wrote:
>
>
> This is not really a bug, I am just looking for an idiots guide to running
> both JSmol (jmol-13.2.8) in conjunction with MathJax (release branch v2.2)
> on a MediaWiki (1.21.2) site without getting a red [Math Processing Error].
>
> --
Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users