What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 150 Stack Exchange communities.

Recently, the TeX.SE question "\[\mu\] is printing the Greek letter mu on a separate single line" got onto the Hot Network Questions list.

Like many questions on TeX.SE, it contains some TeX markup in its title. Unfortunately, on sites that have MathJax enabled, this markup gets parsed and rendered as math:


I propose that either:

  • the entire Hot Network Questions sidebar should be excluded from MathJax parsing by styling it with the tex2jax_ignore class, or

  • at least, any hot questions from TeX.SE should be so excluded from MathJax parsing.

Or I suppose we could always implement this feature request, which asks for all questions with TeX in the title to be excluded from Hot Network Questions entirely. That might be throwing out the baby with the bathwater, though.

Ps. This issue is partially masked by another bug, which causes MathJax not to be rendered in many elements that are hidden by default and revealed using jQuery .show(), such as all but the first five questions in the Hot Network Questions sidebar. The SOUP user script contains a generic fix for that bug, so users who have it installed will see this issue more frequently, but it occurs even without SOUP whenever a question with TeX markup in the title happens to show up among the top five hot questions that are always visible by default.

share|improve this question
Another example of this bug – user11153 Nov 27 '14 at 11:03
And another example – alexwlchan Dec 3 '14 at 13:27
This was done a while ago, just marking as status-completed. – Oded Apr 15 at 11:31
@Oded: Could you please post a short answer describing how this was fixed? – Ilmari Karonen Apr 15 at 15:12
It appears I misunderstood the issue here. Need to dig deeper and see if this was indeed fixed. – Oded Apr 16 at 11:06
Is this still open? I don't use SOUP, and on space.SE HNQ got wrongly mathified display of a question from unix.SE that used $ for awk syntax. – dave_thompson_085 Oct 16 at 11:59

2 Answers 2

The problem of inadvertent MathJax rendering is not limited to titles from tex.stackexchange.com. While browsing earthscience.stackexchange.com, I ran across this mis-rendered Hot Network Question, whose title should have been

If ICANN only charges $0.18 per domain name, why am I paying $10?

Screenshot of inadvertent MathJax

Someone implemented a workaround by changing "$0.18" to "18¢". However, the following title is harder to change:

Whats does "${-#*i}" != "$-" mean in /etc/profile

enter image description here

I suspect that the solution is to make each Hot Network Question that comes from a site that does not have MathJax enabled have its <div> labelled with class="tex2jax_ignore". (There is still the awkward problem that different sites can have different MathJax delimiters.)

share|improve this answer

The just released SOUP v1.12 user script includes the following client-side work-around for this issue:

MathJax.Hub.Register.MessageHook( "Begin PreProcess", function (message) {
    $('#hot-network-questions a[href*="//tex.stackexchange.com/"]' +
} );

Basically, this code adds the tex2jax_ignore class to any links to TeX.SE within the hot network questions sidebar.

The tricky bit about this fix is that it needs to be executed after the document has loaded, but before the initial MathJax preprocessing pass. SOUP accomplishes this by injecting it as a MathJax configuration script, which registers a hook function that is called by MathJax just before each preprocessing pass.

Ps. As of SOUP v1.14, this fix is now applied to all hot network question titles, except for those from sites known to use MathJax (with standard delimiters). This change was made after the problem was observed to occur also with questions from sites other than TeX.SE.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .