webextension-native-mathml icon indicating copy to clipboard operation
webextension-native-mathml copied to clipboard

Incorrect rendering on math stackexchange page

Open Mathnerd314 opened this issue 5 years ago • 3 comments

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.

Mathnerd314 avatar Mar 07 '20 03:03 Mathnerd314

@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.

fred-wang avatar Mar 07 '20 08:03 fred-wang

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.

Mathnerd314 avatar Mar 07 '20 17:03 Mathnerd314

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

  • this happens for $$(something-with-\\-inside)$$ while \begin{multline*}(something-with-\\-inside)\end{multline*} renders correctly;
  • I also cannot access the MathJax menu on rightclick, so there must be some additional problem

jibnew avatar Jun 03 '21 16:06 jibnew