fred-wang / webextension-native-mathml

18 stars 3 forks source link

Incorrect rendering on math stackexchange page #14

Open Mathnerd314 opened 4 years ago

Mathnerd314 commented 4 years ago

The formulas in the answer don't render with line breaks in Firefox: https://math.stackexchange.com/questions/661511/is-it-possible-to-express-sigma-type-in-martin-l%C3%B6f-type-theory-with-other-constr

In particular <mspace linebreak="newline"></mspace> isn't implemented (https://bugzilla.mozilla.org/show_bug.cgi?id=534962)

I'm not sure what to do about this besides disabling the extension.

fred-wang commented 4 years ago

@Mathnerd314 This is probably not going to be implemented anytime soon in browsers. We need first to implement MathML in the Chromium-based browsers. Spec discussion is in https://github.com/mathml-refresh/mathml/issues/112 ; I believe it should be possible to write a polyfill to linebreak a long MathML formula into several small formulas. But this is out of the scope of this extension.

Mathnerd314 commented 4 years ago

Yeah. I was thinking MathJax could do something, but it seems they rewrote the code from scratch and v3 doesn't implement any linebreaking (https://github.com/mathjax/MathJax/issues/2312). Perhaps v2 could be fixed, but it's legacy and StackExchange doesn't keep MathJax up-to-date anyway.

I think what I'd like is a "panic button" that reloads the page without the magic cookie, so that the HTML backend is used. The exclusion list (#2) is another idea, but since it's only some pages that use unimplemented features, disabling it on all of SE seems overzealous. For now, enabling the MathJax context menu to allow changing the renderer works, but the extension could provide its own (browser) context menu item to change the renderer.

jibnew commented 3 years ago

It also breaks the \\ on mathoverflow. But what might be useful information for you,