Chrome browser: Latex source shown along with the mathematics

1,110 views
Skip to first unread message

Larry Phillips

unread,
Feb 17, 2011, 11:00:13 PM2/17/11
to mathja...@googlegroups.com
The attached screen image shows a problem I have not seen before: the math is rendered correctly, but the math is preceded on the web page by the Latex source itself (in a grayed-out font). 
This is the Chrome browser, and Firefox and IE show the page correctly. I have cleared the cache and restarted the browser.
Chrome browser.psd

Sean Hogan

unread,
Feb 17, 2011, 11:12:32 PM2/17/11
to mathja...@googlegroups.com, Larry Phillips
Thanks for the report - is this on a public web page? Can you report the
url, and also the version of Chrome you are using, as well as the
operating system (Windows XP, Vista, 7).

Sean

Sean Hogan

unread,
Feb 18, 2011, 2:03:20 AM2/18/11
to mathja...@googlegroups.com, Larry Phillips
Hi Larry,

I can't reproduce the problem using Chrome 9 on Windows Vista - I don't have Windows 7 to try out.
However the Chrome console is reporting several errors in that page. Could you address these and see if it resolves the problem.

1. There is a <link> tag at the very start of the document, even before the <!doctype>, <html> and <head> tags.

2. The link references a stylesheet "style.css" which cannot be accessed by the browser.

3. There is an unquoted "\n" inside a script at line 213 of the document.

4. Unrelated to Chrome, the <meta> tag that requests IE7 compatibility mode is at the bottom of the <head> element, where it should be at the top. See http://www.mathjax.org/resources/faqs/#ie8-slow

regards,
Sean


On 18/02/11 5:10 PM, Larry Phillips wrote:
One web page showing this trouble is http://brightstartutors.com/blog/2011/02/05/dimensional-analysis/

This is Chrome 9.0.597.98 running on Windows 7

Thanks

Larry

Davide P. Cervone

unread,
Feb 18, 2011, 7:20:42 AM2/18/11
to mathja...@googlegroups.com
Do you by any chance change the setting of preRemoveClass in the
configuration file?

Davide

> <Chrome browser.psd>

Sean Hogan

unread,
Feb 20, 2011, 10:51:57 PM2/20/11
to mathja...@googlegroups.com, Larry Phillips
Can you report the specs of the machine where MathJax fails:
CPU, clock freq, RAM.

Ta,
Sean



On 19/02/11 7:36 PM, Larry Phillips wrote:
Hello Sean,

Please disregard the message below. Although sometimes I get a page to display correctly, it is not correlated with whether or not there is a call to MathJax.Hub.Config.

On the other hand, I tried  another Windows 7 computer with the same version of Chrome, and the problem never shows up there. The other computer is much faster - perhaps there is a timing issue.

Larry Phillips

On Sat, Feb 19, 2011 at 2:34 AM, Larry Phillips <lar...@gmail.com> wrote:
I will fix the issues that Sean identified, but in the meantime I notice that the problem goes away if I remove the call to MathJax.Hub.Config

That is, with

<script type="text/javascript" src="/blog/mathjax/MathJax.js">
MathJax.Hub.Config({
        extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js"],
        jax: ["input/TeX", "output/HTML-CSS"],
        tex2jax: {
            inlineMath: [ ['$','$'], ["\\(","\\)"] ],
            displayMath: [ ['$$','$$'], ["\\[","\\]"] ]
        }
    });
</script>
the problem shows up.

With
<script type="text/javascript" src="/blog/mathjax/MathJax.js"></script>
the page displays OK.



On Fri, Feb 18, 2011 at 2:02 AM, Sean Hogan <shog...@westnet.com.au> wrote:
Hi Larry,

I can't reproduce the problem using Chrome 9 on Windows Vista - I don't have Windows 7 to try out.
However the Chrome console is reporting several errors in that page. Could you address these and see if it resolves the problem.

1. There is a <link> tag at the very start of the document, even before the <!doctype>, <html> and <head> tags.

2. The link references a stylesheet "style.css" which cannot be accessed by the browser.

3. There is an unquoted "\n" inside a script at line 213 of the document.

4. Unrelated to Chrome, the <meta> tag that requests IE7 compatibility mode is at the bottom of the <head> element, where it should be at the top. See http://www.mathjax.org/resources/faqs/#ie8-slow

regards,
Sean


On 18/02/11 5:10 PM, Larry Phillips wrote:
One web page showing this trouble is http://brightstartutors.com/blog/2011/02/05/dimensional-analysis/

This is Chrome 9.0.597.98 running on Windows 7

Thanks

Larry

On Thu, Feb 17, 2011 at 11:12 PM, Sean Hogan <shog...@westnet.com.au> wrote:

Sean Hogan

unread,
Feb 25, 2011, 1:49:53 AM2/25/11
to mathja...@googlegroups.com, Larry Phillips
That Windows 7 box should be fast enough.

Before checking other computers would you address the issues on the web-page as noted in my previous email.

Please also reply to the mathjax users group rather than just me, unless there is information that must be kept confidential. I will receive the email via the group, and this ensures that:
a) the issue and support thread is public for future reference and searching, and
b) more people have the opportunity to assist

thanks,
Sean


On 25/02/11 4:54 PM, Larry Phillips wrote:
Sorry I have been slow to respond to your request.

The computer on which this symptom shows up is:
- Windows 7 Dell laptop
- Core 2 T7600 2.33Ghz
- 2 GB RAM
On the widely used (and free) NovaBench benchmark program, it scores a mediocre 298 (CPU subtest 177)

One computer that does not exhibit the symptoms:
- Windows XP Pro desktop
NovaBench score 319, CPU score 210

I will try some more computers over the coming few days.

Thanks,

Larry Phillips

Davide P. Cervone

unread,
Feb 25, 2011, 10:18:43 AM2/25/11
to mathja...@googlegroups.com, Larry Phillips
The page you cite below works fine for me in Chrome 9.0.597.98 on Windows 7.  

Do you ALWAYS get the grey TeX code on that page, or is it intermittent?  (That is, is it reproducible every time?)

If so, can you use the Developer Tools to look at the DOM and see what is near the math elements in the DOM?  For each equation, you should see three items:  I span with class MathJax_Preview that has display:none set in its CSS.  That should be followed by a span or div of class MathJax or MathJax_Display which contains the markup for the mathematics (complicated, no need to look into it).  That should be followed by a script tag of type math/tex.

Check to see that there is nothing in between them, particularly between the preview and the MathJax span or div.  

The grey math is the preview and it seems that it is not getting removed properly for you.  That suggests that MathJax isn't finding it, so I'm wondering if there is something that is separating it from the math script tag.

Davide

Larry Phillips

unread,
Feb 27, 2011, 2:10:08 AM2/27/11
to mathja...@googlegroups.com
This problem is intermittent: if a given web page displays correctly, clicking refresh on the browser will likely redisplay the refreshed page incorrectly. I have done a diff on the page source for the correct display versus the incorrect display, and there is no difference. 

Additional clues:
1) I have checked 12 web sites that use mathjax. Three of them were Wordpress blogs, and they all exhibited the problem. The other nine were not Wordpress, and all of them worked correctly.
2) When a web page has problems, the first equation never has the greyed out display text; the second and subsequent ones do.

Davide P. Cervone

unread,
Feb 27, 2011, 7:02:32 AM2/27/11
to mathja...@googlegroups.com
Do you have any extensions installed for Chrome?  (e.g., any user scripts?)

Davide

Larry Phillips

unread,
Mar 1, 2011, 11:54:16 AM3/1/11
to mathja...@googlegroups.com
This issue is with grey-out source text is resolved. 

Following up on Davide's suggestion, I have found that a Chrome extension called "Minimum Font" can cause Mathjax mathematics to be displayed incorrectly. What Minimum Font does is this: once a page displays, it may render the page again if the original font size is smaller than some threshold value. When it redisplays the page, the math, which was momentarily OK, gets garbled.

I have reported this issue to the developer of the extension.

Larry Phillips
Reply all
Reply to author
Forward
0 new messages