HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... jsMath (math equations)
jsMath (math equations)
  View type:
Trying to install jsMath (via JavaScript) in order to achieve math equations/formulas.

Seems to work OK in the first page (splash screen). However, once the modules begin, jsMath is no longer called. It seems that the modules are loaded from an XML file.

Is there a way to insure that the jsMath script is run when every new page is loaded?

See my page at:
http://robertfant.com/Algebra1/CourseLab/Chapter2/1/start.html

Math formulas are important to many authors.

Thanks for your help,
Robert
 
1. Does jsMath works in IE only? Tried in FireFox - no result.
2. It seems that jsMath converter function works only once when the page is loaded. CourseLab generates only one HTML page with dynamic content. Therefore, you need to run converter function every time when any significant changes occur on the page (for example, every time new slide appears). If you know which jsMath function should be called, you can call it with JAVASCRIPT action, attached to suitable event (for example, Frame's afterdisplay). This is the suggestion, of course, since I'm not familiar with jsMath.
 
 
No, jsMath works quite well in both.

Yes, it does seem that the function is only called once, when the splash screen is loaded. I've loaded it in the <HEAD> section of "start.html"

I am willing to try your suggestion but I'm not a programmer. Where would this "Frames afterdisplay" function be? I assumed it would be in one of the js files but could not find anything like that.

The script below is what needs to be run every time a page changes; It simply runs through the HTML and looks for the math symbols to be converted.

<SCRIPT SRC="../../../../jsMath/easy/load.js"></SCRIPT>

++++++++++++++

I hope we can get something like this worked out. Though I appreciate the example you've set up in the "how-to" section, this method is far too difficult for the average user (compared to jsMath), it is just not worth it. Not to mention, your example demonstrates that the symbols can be generated but it does not show the average teacher HOW to do it.

Just some thoughts,
Robert
 
 
 
OK, this editor wants to eliminate any JavaScript notation.

In the above reply I said that I have loaded a script in the "HEAD" section of the "start.html" page.

I also said "the script below" but the script was removed. Here it is again:

SCRIPT SRC="../../../../jsMath/easy/load.js" /SCRIPT"
 
 
 
 
Once the jsMath script file is loaded it launches some JavaScript function sequence. I think that there should be somewhat "start conversion" trigger function. Unfortunately it is not so easy to understand where it is in jsMath source files - they are quite big. It seems that for TeX notation it should be this function: jsMath.ConvertTeX(). But I cannot be sure. Perhaps the better way is to ask jsMath developers how to launch conversion in the same HTML document second (third...) time, when page content is dynamically changed. Then we can call this "trigger function" from CourseLab with JAVASCRIPT action.
Subject:
Message options
No additional options