JuliaMolSim / DFTK.jl

Density-functional toolkit
https://docs.dftk.org
MIT License
434 stars 89 forks source link

Some characters in `https://docs.dftk.org/dev/developer/symmetries/#Crystal-symmetries` are not rendered #871

Open singularitti opened 1 year ago

singularitti commented 1 year ago

Some mathematical characters in this page are not rendered. Probably because Julia does not support \calK but only scfK.

image image

I'd like to make a PR if you want.

antoine-levitt commented 1 year ago

It works for me, I guess it depends on the browser? PR welcome if it increases compatibility!

singularitti commented 1 year ago

I was using Microsoft Edge on macOS, however on Safari it works. I'll look into it.

epolack commented 10 months ago

Can't reproduce with Edge on Linux or macOS (intel). Maybe solved with new Documenter or new Edge version.

singularitti commented 10 months ago

Can't reproduce with Edge on Linux or macOS (intel). Maybe solved with new Documenter or new Edge version.

I'm still suffering the same problem on M1 Pro Mac. My edge is version 120.0.2210.61.

epolack commented 10 months ago

Thanks. Exact same build on macOS, 121.stuff on Linux. From your screenshots, it feels like it is trying to render MathML, which should not happen (only IE) and not sure why I cannot reproduce. If you can, maybe add the last meta tag of https://docs.mathjax.org/en/latest/output/browser.html Last idea would be browser addons interfering.

singularitti commented 10 months ago

If you can, maybe add the last meta tag of https://docs.mathjax.org/en/latest/output/browser.html

I switched several different user agents in Edge. For agents like "Firefox", "IE", it works. For user agents like "Chrome", "Edge", "Safari", it does not (no matter what device I use). However, I could see the correct rendering on my iPhone; it just happened on my Mac. In these agents, I could see the correct rendering for less than a second; then it stopped working immediately.

Last idea would be browser addons interfering.

I tried in the private browsing mode (no extensions allowed), but it still does not work.

epolack commented 10 months ago

This feels like an issue with MathJax. Not sure we can do something about it. Does the DevTools console of Edge is of any use?

singularitti commented 10 months ago

Does the DevTools console of Edge is of any use?

I'm sorry. I don't understand this sentence. It should be similar to Chrome's.

epolack commented 10 months ago

It should, be maybe there are some errors in the console. For example, for me I have warning

“mathvariant='script'” on MathML elements is deprecated and will be removed at a future date.

I did some modification in Test2 of this website https://epolack.github.io/test/ Does it work?

Last idea, could you provide me with the exact user agent that you use (https://duckduckgo.com/?t=h_&q=show+user+agent&ia=answer, the full response just below the search box)?

singularitti commented 10 months ago

Interesting, I tested on the Intel Mac (iMac Pro 2017, macOS 14.2), and it shows exactly the same as my M1 Pro MacBook: after 1 second, the correct rendering is replaced by those tofu characters.

My console does not log anything when opening your test:

image

Your user agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0
Other HTTP headers
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Host: duckduckgo.com
Referer: https://github.com/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0
DNT: 1
SEC-CH-UA: "Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"
SEC-CH-UA-MOBILE: ?0
SEC-CH-UA-PLATFORM: "macOS"
SEC-FETCH-DEST: document
SEC-FETCH-MODE: navigate
SEC-FETCH-SITE: cross-site
SEC-FETCH-USER: ?1
UPGRADE-INSECURE-REQUESTS: 1

I tried to change all fonts to JuliaMono in Edge, but it looks like this:

image
epolack commented 10 months ago

Thanks. The font for the caligraphic should be MathJax_Calligraphic. See screenshot mathjax

No clue what's happening…