OK, addition here and PR #1790 are live. Let's get this scoped out *today* if
we can - next few days will be harder for quick reactions to any problems.
Tested on sample article and sample book (with lots o' Runestone Components).
I see message in the console early, from the page, and then "pretext.js" reports
a MathJax version next.
Math seems unharmed.
I could not provoke bad math with new RS Services and before adding startup
hook. We'll have to have Sean F reload 100 times.
Rebuilding website samples now, will take up to 20 minutes.
Rob
On 7/16/22 11:39, Bradley Miller wrote:
> Rob,
>
> If you can add this to the appropriate place then we can test with my new
> Javascript.
>
> Brad
>
> *Bradley Miller, PhD*
> Professor Emeritus Computer Science
> Luther College
> Founder, Runestone Academy <
https://runestone.academy>
> Blog: A Reputable Journal <
http://reputablejournal.com>
> On Jul 8, 2022, 4:59 PM -0500, Bradley Miller <br...@runestone.academy>, wrote:
>> There are a few places where we have discovered a race condition between
>> Runestone and MathJax. Where Math ends up not rendered in a multiple choice
>> and other areas.
>>
>> I think the solution is to add this to the MathJax object created at the top
>> of an HTML page.
>>
>> startup: {
>> pageReady() {
>> return MathJax.startup.defaultPageReady().then(function () {
>> console.log("in ready function");
>> $(document).trigger("runestone:mathjax-ready");
>> }
>> )}
>> },
>>
>> This gives me an event to wait for to ensure that when I queue up a mathjax
>> render mathjax is fully loaded.
>>
>> This looks like it works, but I'm not MathJax wizard, so if someone has a more
>> foolproof way I'm happy to hear about it.
>>
>> Brad
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "PreTeXt development" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to
pretext-dev...@googlegroups.com
>> <mailto:
pretext-dev...@googlegroups.com>.
>> <
https://groups.google.com/d/msgid/pretext-dev/1cfe662b-2d96-48a3-8ed2-a1052b42de9an%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to
pretext-dev...@googlegroups.com
> <mailto:
pretext-dev...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/pretext-dev/45a8958f-cebf-4f5b-95b5-81a19b74693d%40Spark
> <
https://groups.google.com/d/msgid/pretext-dev/45a8958f-cebf-4f5b-95b5-81a19b74693d%40Spark?utm_medium=email&utm_source=footer>.