Rewack how MathJax is typically configured to support HTML produced by Jupyter Notebooks

Issue #72 resolved
Daniel Davis created an issue

This is described here - https://stackoverflow.com/questions/9289661/configuring-mathjax-to-stick-to-certain-divs.

I think it would allow you to use more typical prefix/suffix strings thus enabling solutions to problems like those in https://github.com/Valassis-Digital-Media/nbconflux/issues/33.

You could have the ignoreClass set to “wiki-content”, so that by default nothing is processed, and then use the process class in elements emitted by your macros.

This would be an improvement.

Comments (3)

  1. Daniel Davis reporter

    I’ve changed the title to suggest more what I’m trying to accomplish. Right now, MathJax’s tex2jax scanner is configured to use different prefix/postfix than I’ve usually seen. I am assuming this is to avoid conflict with the Confluence macro language, but it may be for a different purpose.

    The typical MathJax configuration within a Jupyter Notebook starts something like this:

    MathJax.Hub.Config({
        tex2jax: {
            inlineMath: [["$", "$"], ["\\(", "\\)"]],
            displayMath: [["$$", "$$"], ["\\[", "\\]"]],
            processEscapes: true,
        },
    

    What I’m suggesting is that this be preserved, and that the processClass and ignoreClass be used to make this safe with Confluence macro language. Will this work?

  2. Log in to comment