• Resolved Steeven

    (@steeven)


    I use the Simple Mathjax plugin for seamlessly adding mathjax via Dollar signs to my online-course pages. It works like a charm.

    On the pages I also use the Easy Footnotes plugin to add hover-footnotes in the text. This has worked with mathjax with no problem until the latest Simple Mathjax update. Now mathjax is not rendered within footnotes anymore, but only on the page itself.

    Have a look in this link from one of the lessons: https://www.allthatmatters.academy/courses/existence/lessons/symbols-equations/. In footnotes a, c and d (below the first image), math is not rendered but the syntax is just written out along with the $…$ Dollar signs. But on the page itself, clearly all instances of mathjax are rendered just fine.

    I initially contacted the Easy Footnote support, who found out that the issue came with your Simple Mathjax update from v1.1 to v2.0. With v1.1, mathjax works just fine within their footnotes, but not with your v2.0. See their answer to my post here: https://www.ads-software.com/support/topic/mathjax-doesnt-work-inside-footnotes-after-latest-update/#post-13396730

    What has changed in the Simple Mathjax plugin that could have caused this issue? Is there a possible fix?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author pkra

    (@pkra)

    > What has changed in the Simple Mathjax plugin that could have caused this issue?

    v2 of this plugin defaults to MathJax v3 (instead of MathJax v2).

    > Is there a possible fix?

    On the one hand, you can downgrade to MathJax v2 by setting a custom URL in the plugin configuration.

    On the other hand, you can update your code to typset the footnotes. I couldn’t spot where that happens but the page seems to have a renderMath() function which uses the MathJax v2 API

    MathJax.Hub.Queue([“Typeset”,MathJax.Hub]);

    The MathJax v3 for typesetting new content is

    MathJax.typesetPromise()

    See https://docs.mathjax.org/en/latest/advanced/typeset.html

    As always, we can’t provide support related to MathJax itself — you can post to, e.g., the MathJax User Group for more help on the changes in MathJax v3.

    Thread Starter Steeven

    (@steeven)

    Hi @pkra and thank you so much for your reply.

    I had indeed made a custom function called renderMath() which starts the rendering of mathjax for a live preview window. I have now switched so this function doesn’t run MathJax.Hub.Queue(["Typeset",MathJax.Hub]); but instead MathJax.typesetPromise(), and this did indeed solve a similar issue with the preview window. Thank you very much for that.

    It still didn’t solve the issue with the footnote hover-boxes, though. Math still isn’t rendered here (and I have tried removing all custom javascript to see if I had caused the issue myself, but with no change). It seems that the content of these footnote boxes is added to the page after the initial page-load rendering of mathjax has happened. Can you confirm this? Is this an issue I have to go back to the footnote-plugin support for?

    Best regards
    Steeven

    Plugin Author pkra

    (@pkra)

    From another quick look, it seems to be a timing issue. The footnote content is injected into the DOM after MathJax first runs. I’m guessing downgrading to MathJax v2 will not make a difference.

    You’ll either need a callback from the footnote plugin or just another listener for DOM mutations like you have for the quiz, e.g.,

    jQuery(‘body’).on(‘DOMNodeInserted’, ‘.qtip’, function(){ MathJax.typesetPromise(); });

    or some such.

    Again, we don’t have the resources to provide free support for problems unrelated to this plugin.

    Thread Starter Steeven

    (@steeven)

    I of course understand, and I thank you very much for you kind support, @pkra. With a delayed repeated call, I have now gotten the issue solved. Thanks again.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘MathJax doesn’t work in footnotes with Easy Footnotes plugin’ is closed to new replies.