mdekstrand / cs533-web

CS 533 web content
Other
7 stars 13 forks source link

Issue on page /resources/probability.html #3

Closed henrymjohnson closed 2 years ago

henrymjohnson commented 2 years ago

The symbol used for the function that maps the expected value to the probability doesn't display properly. I've attached a screenshot and the following text is copied from the course site (the A does properly show up as a subscript). This happens in both Safari and Chrome. I didn't check Firefox.

𝕀𝐴:𝐸→{0,1}

image
mdekstrand commented 2 years ago

I'm not seeing the problem yet - it shows that the indicator I_A is a function from E to the set {0,1}. Could you describe what you're expecting to see?

henrymjohnson commented 2 years ago

I'm expecting to see a symbol (for the Indicator Function) that's not an empty box followed by the subscript A. I was thinking that my version of Safari just didn't include the character for whatever symbol is used for the function here. So I opened Chrome to see if it displayed how I'd expect there

image
henrymjohnson commented 2 years ago

Oh, maybe it's a bubble-type letter for the letter 'I' πŸ˜…

henrymjohnson commented 2 years ago

I'll close the issue. Thanks for the clarification

mdekstrand commented 2 years ago

Ok, I see. That is supposed to be a double-struck I (\mathbb{I}). On my computer, it renders with the serif, making it clearer.

It does, however, look like that is an empty box, not a double-struck I - perhaps the MathJax fonts are not fully working in your browser. I'll check on my Mac later today.

henrymjohnson commented 2 years ago

That was exactly my thought, too. So I checked Chrome (and used Chrome for the screenshots). It rendered the same. I thought that fonts were browser-specific and didn't really think about browsers being OS-specific haha. After you said that it's the double-struck I, I noticed it was more rectangular than the normal missing symbol box. So it may just be that the double-struck I symbol used by the browsers (Safari and Chrome) on OS X is ... a poor choice πŸ€·β€β™‚οΈ

mdekstrand commented 2 years ago

I have pushed a fix that I believe works, should be live shortly.

Turns out that MathJax (2.7, at least) tries to first use local fonts if they are available, and falls back to webfonts if they are not. macOS includes the STIX fonts, so MathJax tries to use them; however, they do not seem to contain the proper double-struck I symbol, because that's definitely a blank box.

The fix I pushed disables use of the STIX fonts, so macOS browsers will always use the web-based MathJax TeX fonts. This corrected display in my local testing.