How to copy text containing mathematical formulas (especially for translation) #2031
Unanswered
holomorphism
asked this question in
Pluto development
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Normally, when you select text containing a MathJax formula in Pluto and copy it, the formula portion is simply erased.
However, depending on how MathJax is configured, it appears to be possible to copy Unicode strings that substitute for mathematical expressions.
For example, if you select and copy the formula like on the following page, you will get the (incomplete) text
∑ni=0i2=(n2+n)(2n+1)6
.(https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference/27910)
This difference in MathJax behavior may depend on the Math Renderer (HTML-CSS or SVG), but it seems that even with the current Pluto configuration, the alternate strings are generated and included in the mjx-assistive-mml element in the HTML.
So I added the following CSS and found that I can copy the alternate string for MathJax formulas even with the current Pluto configuration.
I think this alternative text in MathJax is very useful (even if incomplete) to allow readers to use the translation engine.
Compare the following screenshots. (Translation from Japanese to English)
Before:
After:
However, I think it is a bit tricky to achieve this with CSS as described above.
Could the same effect be enabled in SetupMathJax.js?
Also, when Pluto moves to KaTeX, this feature will probably no longer be available (#1998).
Does anyone else think this feature is important?
Or does anyone know of a similar feature available in KaTeX?
Edit :
I missed the following statement in #1998:
KaTeX/KaTeX#3586
If KaTeX can use this feature, it may be enough.But this seemed a little different from the feature I wanted.
Beta Was this translation helpful? Give feedback.
All reactions