spec icon indicating copy to clipboard operation
spec copied to clipboard

[spec] MathJax and search / c&p on page

Open ianh opened this issue 2 years ago • 6 comments

For example, try searching for the text 0x00 on the page https://webassembly.github.io/spec/core/binary/instructions.html. In Safari, that string is "Not found" -- in Chrome, there are seven results, but the correct result is never indicated using the normal selection highlight, and the browser doesn't even scroll to the right point for all the results. Attempting to select the text 0x00 doesn't work at all in Chrome. In Safari, attempting to select text does something difficult for me to describe other than that it's "slightly cursed".

Anyone working directly with WebAssembly will be paging through these documents constantly, so it would be helpful for them to support basic browser text operations. Or, at least, I've personally been annoyed by these issues enough to file this issue, and I'm sure I'm not the only one!

ianh avatar Aug 04 '22 01:08 ianh

Yes, I understand, and I share the sentiment. Unfortunately, this is a result of the poor state of rendering math on the Web and the glorious hack that is MathJax to work around it. And unfortunately, MathJax 3 dropped support for switching to MathML output, even on browsers that support it.

You could try the single page W3C version (e.g., https://webassembly.github.io/spec/core/bikeshed/#instructions⑦), which is rendered with Katex instead. That has its own problems, but at least allows more functional text search and C&P.

Alternatively, the PDF version should not have these issues, and looks nicer, too. :)

rossberg avatar Aug 04 '22 07:08 rossberg

Why can't the docs use ASCII syntax? We're programmers, not physicists.

(Apple) Safari can't even align latin-lowers correctly:

Screen Shot 2022-08-17 at 21 34 15

7ombie avatar Aug 17 '22 20:08 7ombie