[Building Sakai] Wiki Message with JsMath
Mark Norton
markjnorton at earthlink.net
Fri Aug 28 06:23:02 PDT 2009
Perhaps someone involved with this thread could take the time to write
it up in Confluence under in the Provisional: RWiki space? It is bound
to come up again.
Jon Wheat wrote:
> Matthew,
> THANK YOU, that did it.
>
> Adam,
> this may solve your problem as well. Since the red box displays the
> Control Panel to download fonts, etc, this may be a solution for you
> as well.
>
> I followed Matthew's instructions to load 'easy/load.js'
>
>
> In the rwiki (./rwiki-tool/tool/src/webapp/WEB-INF/web.xml) they've
> got "<param-value>/library/jsMath/jsMath.js</param-value>" but I
> think you'd want to change this to
> <param-value>/library/jsMath/easy/load.js</param-value>
>
> this suppresses the red box as well as the js alert (this actually
> doesn't display at all now [good for me]) if there is no {math} on the
> page.
>
> as soon as you add a {math} block, BAM - you get the red box.
>
> If you need to you can change the redbox content I presume (??) you
> can alternately change that message by putting this
> <SCRIPT> jsMath = {Font: {message: '/your-message-here/'}} </SCRIPT>
> in rwiki/rwiki-tool/tool/src/webapp/WEB-INF/vm/macros.vm
>
> right after the
> <script type="text/javascript"
> src="${request.getAttribute("headerScriptSource")}"> <!-- don't reduce
> this! --></script>
> line, but I haven't tried this since the default redbox message works
> for us.
>
> Matthew - Thanks again for your help !
>
> -Jon
>
>
> >>> Matthew Jones <jonespm at umich.edu> 8/26/2009 5:37 PM >>>
> I haven't actually tried this in awhile but I was looking at
> suppressing it, however in jsmath they have a plugin
>
> plugins/autoload.js
>
> which already does this.
>
> According to the basics
> http://www.math.union.edu/~dpvc/jsMath/authors/basics.html
> <http://www.math.union.edu/%7Edpvc/jsMath/authors/basics.html> they
> recommend loading up jsmath with
> "<SCRIPT SRC="path-to-jsMath/easy/load.js"></SCRIPT>"
>
> In the rwiki (./rwiki-tool/tool/src/webapp/WEB-INF/web.xml) they've
> got "<param-value>/library/jsMath/jsMath.js</param-value>" but I
> think you'd want to change this to
> <param-value>/library/jsMath/easy/load.js</param-value>
>
> and it should not load jsmath if there is no jsmath.
>
>
> On Wed, Aug 26, 2009 at 4:56 PM, Jon Wheat <jwheat at messiah.edu> wrote:
> >
> > Got it -
> >
> > I added this :
> >
> > <STYLE> #jsMath_Warning {display: none} </STYLE>
> >
> > to this file
> >
> > sakai_2-5-x/rwiki/rwiki-tool/tool/src/webapp/WEB-INF/vm/macros.vm
> >
> > directly under this line (:
> >
> > <script type="text/javascript"
> src="${request.getAttribute("headerScriptSource")}"> <!-- don't reduce
> this! --></script>
> > and that keeps the error off the screen - or removes it after a
> quick 2 seconds.
> >
> > but now I get your message ( -7 thing)
> >
> > Ugh.
> >
> > -Jon
> >
> >
> > >>> "Jon Wheat" <jwheat at messiah.edu> 8/26/2009 4:38 PM >>>
> > the thing is - the message displays all the time, not just when you
> have a {math} macro in the wiki post.
> > It would be great if it could detect that and then check for the
> fonts, but that's probably for a different list.
> >
> > so after reading the instructions on the jsMath page about removing
> the message ... where the heck to you add that
> >
> > <STYLE> #jsMath_Warning {display: none} </STYLE>
> >
> > code ?
> >
> >
> >
> > >>> Adam Marshall <adam.marshall at oucs.ox.ac.uk> 8/26/2009 6:47 AM >>>
> > replying to my own post here.
> >
> > WRT: Error code -7 message
> >
> > I may have misunderstood when this message appears. On reflection,
> it may only appear when Latex is being used on a page and jsMaths
> fontys havent been installed.
> >
> > To me, it would seem a much better idea to dispense with the "big
> scarey red warning" that Jon mentions and modify the "-7" message to
> say something along the lines of "It looks like you're using
> Mathematical notation on this page. May we suggest that you download
> jsMaths fonts form http://xxxxx ........."
> >
> > If anybody does a patch for this then we'd be interested in applying it.
> >
> > adam
> >
> > | -----Original Message-----
> > | From: Adam Marshall
> > | Sent: 26 August 2009 11:06
> > | To: 'Matthew Jones'; Jon Wheat
> > | Cc: Sakai Developers
> > | Subject: RE: [Building Sakai] Wiki Message with JsMath
> > |
> > | we also got bad feedback about "install jsmaths fonts" warning message
> > | so removed it (in an analagous way to that suggested on the web page),
> > | but now we get an equally geeky message
> > |
> > | "Error jsmaths font cannot be found error code (-7). I'll keep
> > | going but things could get ugly"
> > |
> > | This doesn't appear very much but is annoying all the same. I mean,
> > | what a stupid message - what purpose does it serve?!!
> > |
> > | Any ideas how to get rid of this?
> > |
> > | adam
> > |
> > | | -----Original Message-----
> > | | From: sakai-dev-bounces at collab.sakaiproject.org [mailto:sakai-dev-
> > | | bounces at collab.sakaiproject.org] On Behalf Of Matthew Jones
> > | | Sent: 25 August 2009 20:40
> > | | To: Jon Wheat
> > | | Cc: Sakai Developers
> > | | Subject: Re: [Building Sakai] Wiki Message with JsMath
> > | |
> > | | Changing or Removing the Font Warnings:
> > | | http://www.math.union.edu/~dpvc/jsMath/authors/warnings.html
> <http://www.math.union.edu/%7Edpvc/jsMath/authors/warnings.html>
> > | |
> > | | On Tue, Aug 25, 2009 at 3:38 PM, Jon Wheat<jwheat at messiah.edu>
> wrote:
> > | | > So I somewhat successfully (I think??) installed jsMath, and
> it can
> > | | do TeX
> > | | > formatting now.
> > | | > However - this message (see image below) pops up ALL the time now
> > | | (unless
> > | | > you install the jsFonts on your machine). Its probably ok for the
> > | 2
> > | | math
> > | | > classes that needs to know this, but how can I get this to not
> > | happen
> > | | ?
> > | | >
> > | | > - Jon
> > | | >
> > | | >
> > | | >
> > | | >
> > | | > _______________________________________________
> > | | > sakai-dev mailing list
> > | | > sakai-dev at collab.sakaiproject.org
> > | | > http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> > | | >
> > | | > TO UNSUBSCRIBE: send email to sakai-dev-
> > | | unsubscribe at collab.sakaiproject.org
> > | | > with a subject of "unsubscribe"
> > | | >
> > | | _______________________________________________
> > | | sakai-dev mailing list
> > | | sakai-dev at collab.sakaiproject.org
> > | | http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> > | |
> > | | TO UNSUBSCRIBE: send email to sakai-dev-
> > | | unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
> ------------------------------------------------------------------------
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
More information about the sakai-dev
mailing list