qpixel icon indicating copy to clipboard operation
qpixel copied to clipboard

Can't copy and paste MathJax rendered content

Open Trilarion opened this issue 4 years ago • 4 comments

Describe the bug

MathJax rendered output cannot be selected and copied to clipboard.

To Reproduce

Select text for example from https://math.codidact.com/posts/278629 and copy and paste somewhere else. For example the title becomes: "Why does the decimal expansion of have this neat pattern?" with 1/(10n-1) missing.

Expected behavior

The mathematical content should also have been included. Math.SE can do it.

For example https://math.stackexchange.com/questions/4361758/x-1-cdots-x-n-such-that-px-i-1-px-i-1-frac12-denote-s-sum-i-1 and the copying the title gives: "X1,⋯,Xn such that P(Xi=1)=P(Xi=−1)=12 . Denote S=∑ni=1Xi . Prove P(X>n10)<2−cn" QPixel should be able to do that too.

Trilarion avatar Jan 20 '22 20:01 Trilarion

If it would work, it might be a possible solution for #262

Trilarion avatar Jan 20 '22 20:01 Trilarion

Do we have any idea how Math.SE makes it work? Any clues in the inspector?

cellio avatar Jan 21 '22 01:01 cellio

This is a MathJax 3.0 issue currently being tracked at https://github.com/mathjax/MathJax/issues/2240

MoshiKoi avatar Jan 23 '22 05:01 MoshiKoi

The issue on MathJax is labeled feature request and exists since 2019. A bit of code that might fix the problem is given in a comment there but the safer option might be to go back to MathJax 2.X until the feature is reintroduced officially in 3.X.

I'm personally more inclined to say it's a bug, because copy and paste of rendered mathematical expressions is a frequent operation and should be possible even if the output is not faithfully the same as the original Tex text.

May be the reason SE is still using 2.X.

Trilarion avatar Jan 23 '22 16:01 Trilarion