Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MathJax rendering of stars and asterisks #373

Open
endolith opened this issue Apr 9, 2014 · 9 comments
Open

MathJax rendering of stars and asterisks #373

endolith opened this issue Apr 9, 2014 · 9 comments
Labels

Comments

@endolith
Copy link

endolith commented Apr 9, 2014

Example from https://en.wikipedia.org/wiki/Cross-correlation#Properties TeX is

(f * h) \star g = h(-)*(f \star g)

Should render something like this:

Wikipedia's PNG

TeXRendr.com uses MathJax, and it looks similar:

2014-04-09 15_18_46-texrendr com _ browser-based real-time tex_latex visualization write see sh

but in stackedit, with MathJax, it looks like this:

2014-04-09 15_26_44-stackedit

The 5-pointed stars are small, and the asterisks are 5-pointed, too, making them hard to tell apart. Is this because it's using a different font than TeXRendr or something?

@benweet
Copy link
Owner

benweet commented Apr 9, 2014

What browser/OS? I have it rendered correctly on chrome/OSX.

@endolith
Copy link
Author

endolith commented Apr 9, 2014

Firefox 28.0 in Windows 7. Tried it in Chrome and it looks good there.

@benweet
Copy link
Owner

benweet commented Apr 9, 2014

I can't reproduce that on Firefox/OSX. I will try on Windows when I get a chance.

@endolith
Copy link
Author

endolith commented Apr 9, 2014

Also looks good in Internet Explorer on Windows 7.

Also not a problem in a clean Firefox profile, so it must be my fault, some add-on or setting is affecting it. I don't know why it would work in TeXRendr but not here though. I tried disabling Greasemonkey, Stylish, Adblock, HTTPS Everywhere, flashblock, and it still doesn't show up right in my normal profile. I don't know what's causing it.

@benweet benweet added the bug label Apr 21, 2014
@pkra
Copy link

pkra commented Apr 22, 2014

@endolith have you set the MathJax rendering option to native MathML output? (Right click an equation => math settings => math renderer).

That would explain it (and I can reproduce it that way). That would make it a Firefox "issue" (because MathJax hands over rendering to Firefox instead of polyfilling MathML). But I think it's just a font issue -- installing the MathJax fonts or STIX-general fonts should fix it (e.g. the Firefox extension for math fonts).

@endolith
Copy link
Author

No, the math renderer is HTML-CSS. Using "Show fonts in selection" firefox extension:

On texrendr.com and math.stackexchange.com, the 6- and 5-pointed stars are displayed in MathJax_Main-Regular font, the "−" is shown using MathJax_Main-Regular.

On stackedit.io, the stars are displayed using Segoe UI Symbol, and the "−" is displayed using Times New Roman.

The "f g h" are MathJax_Math-Italic on all 3 sites.

So the fonts are accessible by the browser, they just aren't being used on this particular site.

My editor font setting is non-default DejaVu Sans Mono, Menlo, Consolas, "Courier New", Courier, monospace if that has anything to do with it

@pkra
Copy link

pkra commented Apr 22, 2014

@endolith that's very strange. MathJax only works with a handful of fonts and stackedit is configured to use the default (MathJax_Math-*). Have you tried resetting stackedit and clearing MathJax from the browser cache?

@endolith
Copy link
Author

Yes, I cleared browser cache and reset the application, but no change.

The HTML is identical except for the id= numbers, and Firebug says the computed style is font-family MathJax_Main, but Font Information says the same element is rendered using Segoe UI Symbol.

With all extensions disabled in Safe Mode, it still doesn't work right, but with a blank profile it does. I don't get it. :/

@pkra
Copy link

pkra commented Apr 22, 2014

I'm afraid I cannot reproduce this on Saucelabs (Win7, FF28, see https://saucelabs.com/tests/d0e61f6c881246d2be5381f8a63c683d).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants