orsharir / github-mathjax

Chrome extension for rendering LaTeX equations in GitHub with MathJax
Other
153 stars 49 forks source link

Subscription with parentheses does not render #30

Closed speedcell4 closed 5 years ago

speedcell4 commented 5 years ago

\mathcal{L}_D\left(\theta_D \mid W\right) does work well but \mathcal{L}{D}\left(\theta{D} \mid W\right), the only different part is _D or _{D}

image

the console reported this error:

Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAGVUABEAAAAAxuQAAQABAAAAAAAAAAAAAAAAAAAAAAAAAABHREVGAAABgAAAAC4AAAA0ArgC7UdQT1MAAAGwAAAQ6AAALgxKsqRTR1NVQgAAEpgAAAH3AAAELqI5y+RPUy8yAAAUkAAAAE8AAABgaGyBu2NtYXAAABTgAAABlAAAAkQkRATXY3Z0IAAAFnQAAABeAAAAugDsQf1mcGdtAAAW1AAABZcAAAvNb3/BHGdhc3AAABxsAAAACAAAAAgAAAAQZ2x5ZgAAHHQAAEApAAB3CtbiupxoZWFkAABcoAAAADYAAAA2BkubWWhoZWEAAFzYAAAAIAAAACQHFARfaG10eAAAXPgAAAI6AAAEEk4TN4Nsb2NhAABfNAAAAhIAAAISiLhpam1heHAAAGFIAAAAIAAAACACigzgbmFtZQAAYWgAAACUAAABHhQGLdJwb3N0AABh/AAAAq4AAASRk5y6n3ByZ...QxUajCCFt4p9HP4fzdSWs2XhWl5HvJazrIrFUyB0l5dpqcW10lV2wukjMLuAvyMHNiYpgPsrCVXZDKrkpll6UWkh7kABVAFVCDe7UFmxagDegA+hLHRPbqtMo7ZHCpKdT6tPGXybzo0+RXBLoPZt1tELcXxCmAAyZwYTJvdDFZKnDER44X2451rDqCyunIsRWvLSx6wnWqwPj/uX5/KuEy6DL0z6A/Fn79VihxMFJsrlAFy4DpZOcvNlMeNp+BRDLj0r+XFdRxdSNSNxiI/AL3ojKdAAB4AWPw3sFwIihiIyNjX+QGxp0cDBwMyQUbGdictkUwWDAwsDJogTgOPN4c9iz6bMos4iysHFChUDZXJnMWTSZZJrAQt9M+YQYBBh4GTgY2kEZOoJiA0z4GBxiEiDEzuGxUYewIjNjg0BGxkTnFZaMaiLeLo4GBkcWhIzkkAqQkEggceHw5HFkM2VRZJFlYebR2MP5v3cDSu5GJwWUDW9xG1hQXAFAmKZU=' because it violates the following Content Security Policy directive: "font-src github.githubassets.com".


Chrome: 75.0.3770.80 github-mathjax: 0.2.4

muzimuzhi commented 5 years ago

Both occasions previews alright hence cannot reproduce your problem.

PS: There seems some typo in your issue: image

speedcell4 commented 5 years ago

No, that is not a typo. mathjax did not render the second equation, so GitHub handled it as Markdown format, then _ was rendered as italic

speedcell4 commented 5 years ago

I found putting a \ before the first _ can make mathjax work well \mathcal{L}\_{D}\left(\theta_{D} \mid W\right)

muzimuzhi commented 5 years ago

I still cannot reproduce your problem: \mathcal{L}_{D}\left(\theta_D \mid W\right) $\mathcal{L}_{D}\left(\theta_D \mid W\right)$

image

But since you have found a workaround, it is ok.