MathJax v2.5 now available

135 views
Skip to first unread message

Peter Krautzberger

unread,
Jan 30, 2015, 9:26:15 AM1/30/15
to mathja...@googlegroups.com, mathj...@googlegroups.com
Hi,

We're happy to announce the release of MathJax v2.5.

You can get started right away using 

or 
http://cdn.mathjax.org/mathjax/latest/MathJax.js

For the `latest` address, users might still have a copy of v2.4 cached, so cleaning the browser cache and for some browsers restarting the browser is advised.

For the complete announcement, please visit http://www.mathjax.org/mathjax-v2-5-now-available/

Note: If you are using a pre-defined configuration, please note the new fast-preview mode is activated in these. If you want to de-activate it on your page, add the following to your page before MathJax.js is loaded.

  <script type="text/javascript">
    window.MathJax = {
      menuSettings: {CHTMLpreview: false}
    };
  </script>

As a user, you can deactivate the Fast Preview via the MathJax menu. Righ/Cmd-click any equation and go to Math Settings -> Math Renderer -> Fast Preview.


Thanks for your continued interest in MathJax!
The MathJax Team.

Kenneth Tilton

unread,
Jan 30, 2015, 2:49:26 PM1/30/15
to mathja...@googlegroups.com
Hi, I am seeing performance drastically slower on http://tiltonsalgebra.com/#mathpaper. This is my HTML:


Same as well in my development environment. Production (the URL above) has not been touched in a couple of weeks.

I have tested on Chrome, FireFox, (on Windows) and Safari on a MacBook Pro. cache has been cleared.

btw, MathJax is so great I never look at it any more. How do I get back to version 2.4? (I'll go digging in the doc, too.)

cheers, Ken


--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Kenneth Tilton
54 Isle of Venice Dr
Fort Lauderdale, FL 33301


"In a class by itself." -Macworld


MarkFL

unread,
Jan 31, 2015, 12:08:41 AM1/31/15
to mathja...@googlegroups.com, mathj...@googlegroups.com
Hello Peter,

Thank you for this announcement and for the continued upgrades and new features from MathJax. It is an essential and highly appreciated part of the math help forum I help to administrate. :D

The only issue I have been made aware of is that our Chrome users (Windows and Apple) have noticed that the new fast-preview mode does not render correctly for them. I have verified on my end that it looks good in Firefox, but in Chrome there are elements that sit on top of each other until the full rendering is completed. For the moment, we have instructed our users how to disable the fast-preview on their end, as we are going to wait to give you gives a reasonable amount of time to iron out any issues before making a decision about disabling it globally.

Best Regards,

Mark.

Peter Krautzberger

unread,
Jan 31, 2015, 2:33:53 AM1/31/15
to mathja...@googlegroups.com, mathj...@googlegroups.com
Hi Mark,

Do you have a live example that exhibits the problem?

The new output is not feature complete so there are bound to be minor issues. That is why we only recommend it for a preview that gets replaced with a proper rendering later.

Regards,
Peter.

--

MarkFL

unread,
Jan 31, 2015, 6:46:09 AM1/31/15
to mathja...@googlegroups.com, mathj...@googlegroups.com
Hello Peter,

Yes, when I view the following page, using Windows 7 and either Google Chrome 40.0.2214.93 m or IE 11.0.x, I get the described issue:

http://mathhelpboards.com/math-notes-49/pell-sequence-2905.html#post14276

Best Regards,

Mark.

Davide P. Cervone

unread,
Jan 31, 2015, 5:21:06 PM1/31/15
to mathja...@googlegroups.com, mathj...@googlegroups.com
Thanks for the example.  I see the issue from Safari, so will look into it.  It is similar to one that I thought I had solved, and may be related to the CSS on the page.  I will investigate further, and will open an issue tracker item for it.  See


Davide


Davide P. Cervone

unread,
Jan 31, 2015, 5:45:14 PM1/31/15
to mathja...@googlegroups.com
Can you try adding

.MJXc-box {margin-top: 0 ! important}

to your CSS and see if that resolves the issue?

Davide

MarkFL

unread,
Feb 1, 2015, 12:27:02 AM2/1/15
to mathja...@googlegroups.com, dp...@union.edu
Hello Davide,

The CSS class selector you provided works beautifully for me (Windows 7-Chrome and IE). However, Firefox's fast preview was adversely affected, so I included a selector based on a Mozilla specific CSS extension:

@-moz-document url-prefix() {
    .MJXc-box {
        margin-bottom: -0.65em !important;
    }
}

And now the new fast-preview feature looks good for me in Chrome, IE and Firefox. Once I hear from the OS X users, I will let you know whether this fixes the issue for them as well.

Best Regards,

Mark.

MarkFL

unread,
Feb 2, 2015, 12:07:55 AM2/2/15
to mathja...@googlegroups.com, mathj...@googlegroups.com
I decided rather than apply the fix for all browsers, and then try to tweak things for Firefox, which is working correctly to begin with, I would just apply the CSS selector to Chrome, IE and Safari, which as far as I have found are the only browsers that need the fix:

@media screen and (-webkit-min-device-pixel-ratio:0),@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .MJXc-box {
        margin-top: 0 !important;
    }
}

MarkFL

unread,
Feb 4, 2015, 3:06:22 PM2/4/15
to mathja...@googlegroups.com, mathj...@googlegroups.com
Hello MathJax developers,

I wanted to bring up another minor issue regarding the fast-preview mode. We have changed the alignment and indentation of displayMath in our configuration script as follows:

displayAlign: "left", displayIndent: "2em", displayErrorAlign: "left",

However, the fast preview uses the default center alignment. We have fixed the issue on our end by including the following class selector in our CSS:

.MJXc-display {
    text-align: left !important;
    margin-left: 2em !important;
}

I thought however, that you may not be aware of this since I suspect the vast majority of users employ the default settings for displayMath, and that you may want to consider programming the fast-preview to use the settings in the configuration script for a future release.

Best Regards,

Mark.

Davide P. Cervone

unread,
Feb 4, 2015, 6:29:51 PM2/4/15
to mathja...@googlegroups.com, mathj...@googlegroups.com
You could also use MathJax itself to make the adjustments.  Something like

<script type="text/x-mathjax-config">
(function () {
  var browser = MathJax.Hub.Browser;
  if (browser.isMSIE || browser.isChrome || browser.isSafari) {
    MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function () {
      MathJax.OutputJax.CommonHTML.Augment({
        styles: {
          ".MJXc-box": {"margin-top": "0!important"}
        }
      });
    });
  }
})()
</script>

This should apply the CSS only for the affected browsers.

Davide


Davide P. Cervone

unread,
Feb 4, 2015, 6:31:17 PM2/4/15
to mathja...@googlegroups.com, mathj...@googlegroups.com
> I wanted to bring up another minor issue regarding the fast-preview mode. We have changed the alignment and indentation of displayMath in our configuration script as follows:
>
> displayAlign: "left", displayIndent: "2em", displayErrorAlign: "left",
>
> However, the fast preview uses the default center alignment.

You are correct, the fast preview doesn't take the displayAlign or displayIndent into effect. That will be included as we add more functionality to the CommonHTML output.

Davide

MarkFL

unread,
Feb 4, 2015, 7:52:22 PM2/4/15
to mathja...@googlegroups.com, mathj...@googlegroups.com, dp...@union.edu
Hello Davide,

I tried adding this script to the page header, however it did not work for me (I only tested in Chrome). Perhaps my main configuration script is interfering in some way, so I will include it here so perhaps you can tell what this issue is:

<script type="text/x-mathjax-config">
    MathJax.Hub.Config(
    {
        TeX:
        {
            extensions: ["autoload-all.js"],
            noErrors:
            {
                style: {"display": "block !important",
                "margin": "1em 0em 1em 2em",
                "border": "none",
                "text-decoration": "underline"
            }
        },
        Macros:
        {
            pd: ["{\\frac{\\partial#1}{\\partial#2}}",2],
            d: ["{\\frac{d#1}{d#2}}",2],
            E: ["\\times 10^{#1}",1],
            csch: ["\\mathop{\\rm csch}\\nolimits"],
            arccsc: ["\\mathop{\\rm arccsc}\\nolimits"],
            arcsec: ["\\mathop{\\rm arcsec}\\nolimits"],
            arccot: ["\\mathop{\\rm arccot}\\nolimits"],
            sech: ["\\mathop{\\rm sech}\\nolimits"],
            arsinh: ["\\mathop{\\rm arsinh}\\nolimits"],
            arcosh: ["\\mathop{\\rm arcosh}\\nolimits"],
            artanh: ["\\mathop{\\rm artanh}\\nolimits"],
            arcsch: ["\\mathop{\\rm arcsch}\\nolimits"],
            arsech: ["\\mathop{\\rm arsech}\\nolimits"],
            arcoth: ["\\mathop{\\rm arcoth}\\nolimits"],
        }
    },
    extensions: ["tex2jax.js"],
    jax: ["input/TeX", "output/HTML-CSS"],

    "HTML-CSS": {linebreaks: {automatic: true, width: "90% container"}},
    "SVG": {linebreaks: {automatic: true, width: "90% container"}},

                                 
    displayAlign: "left", displayIndent: "2em", displayErrorAlign: "left",
    tex2jax:
    {
        inlineMath: [['$','$'], ['\\(','\\)']],
        displayMath: [['$$','$$'], ['\\\[','\\\]']],
        processEscapes: true
    }
    });

    MathJax.Hub.Register.StartupHook("TeX Jax Ready",function ()
    {
        MathJax.InputJax.TeX.prefilterHooks.Add(function (data)
        {
            if (data.display)
            {
                var next = data.script.nextSibling;
                while (next && next.nodeName.toLowerCase() === "#text")
                {
                    next = next.nextSibling
                }
                if (next && next.nodeName.toLowerCase() === "br")
                {
                    next.parentNode.removeChild(next)
                }
            }
        });
    });
</script>

I will likely stick with the plain CSS class selector, but I like to experiment with differing options. :D

Best Regards,

Mark.

Davide P. Cervone

unread,
Feb 5, 2015, 11:18:55 AM2/5/15
to MarkFL, mathja...@googlegroups.com, mathj...@googlegroups.com
Argh! My fault. I was running out of time and wrote my response without testing it (never a good idea). The styles property is part of the configuration, not the CommonHTML object itself, so it should be

(function () {
var browser = MathJax.Hub.Browser;
if (browser.isMSIE || browser.isChrome || browser.isSafari) {
MathJax.Hub.Config({
CommonHTML: {
styles: {
".MJXc-box": {"margin-top": "0!important"}
}
}
});
}
})();

and you can add that at the bottom of your text/x-mathjax-config script. This should work this time. Sorry about the mixup!

Davide

MarkFL

unread,
Feb 5, 2015, 11:22:56 PM2/5/15
to mathja...@googlegroups.com, mathj...@googlegroups.com
Thank you, Davide, that works perfectly! :D

I have also noticed that when the \overline{} command is used, the line is too far above the enclosed content, and applying a selector to the appropriate class, affected the large operators such as \sum and \prod (when they have limits defined), and so I have added the following two selectors to our CSS:

.MJXc-mo  {
    margin-bottom: -1em !important;
}

.MJXc-largeop {
    margin-bottom: 0.625em !important;
    margin-top: -0.125em !important;
}

Davide P. Cervone

unread,
Feb 7, 2015, 8:47:11 AM2/7/15
to mathja...@googlegroups.com, mathj...@googlegroups.com
OK, thanks for the extra info.  I suspect that these are differences between the XHTML and HTML output, so I'll see if I can find a way to get both of them to work the same, or otherwise provide different CSS for XHTML.

Davide


Reply all
Reply to author
Forward
0 new messages