-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getting access to the unrendered TeX #22
Comments
If you right click on the rendered equation there should be an option to let you copy to clip board? I agree that perhaps a "select -> ctrl+c" solution would be even better. |
@jeisner I'm closing this for now since it seems like "right click -> copy" would work. |
Hmm, when I right-click on a rendered post, I get a menu that has a single
item, "Copy Ctrl+C", but ti s grayed out. So this solution isn't working
for me.
[Update: It was grayed out because no text was selected.]
…On Sun, Jun 6, 2021 at 8:25 PM Cambridge Yang ***@***.***> wrote:
@jeisner <https://github.com/jeisner> I'm closing this for now since it
seems like "right click -> copy" would work.
Please feel free to reopen if you have any suggestions!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AASIYLIZT44FGB22YYUPWADTRQGXJANCNFSM42X6YWHQ>
.
|
@jeisner that is very curious. |
Oh, I see -- you have to right-click on the formula itself (as you'd said in an earlier post) and then you get a MathJax menu. I was clicking elsewhere on the post. (I'm on Linux, btw.) That does work for me for getting the text for a single long formula. On the other hand, it doesn't help for copying a paragraph that is mostly text but keeps mentioning Perhaps you'd be willing to leave this open, tagged as a feature request for the "select -> Ctrl+C" solution, if you think that request might be technically feasible? |
@jeisner I understand your request now. TBH, this seems more like something Slack should fix. Currently right click a message on slack does give one a "copy" option, but that option does nothing! This is bad UX IMO. If Slack will ever fix this problem, the raw formulas would have been copied automatically with the message too! |
On the other hand, it appears that selecting spans of text that contains an MathJax equation is currently not possible: mathjax/MathJax#2240 |
@jeisner I pushed a small update according to suggestions by the MathJax developers: https://groups.google.com/g/mathjax-users/c/1BzTQFINbqY/m/xGYAlhDNAwAJ. If you try this new update copying text should "sort of work". It's far from perfect but I'd still like to share my progress now since I'm not sure when this issue will be entirely resolved. With this update, if you select a paragraph that contains MathJax formulas, and do a copy, it will copy the original un-rendered text to your clipboard.
|
Oh that's brilliant. Great find, and thanks so much for implementing it! |
Hmm, since you (or MathJax) is doctoring the HTML anyway, could this perhaps be handled by inserting some unobtrusive character before/after a formula image that is initial/final in a message? Perhaps just U+200B |
I just tried this but unfortunately it appears that zero width space is not selectable. My guess is that probably because it has zero width, it's impossible to click on the character to select it in the first place. However, the thin space character https://www.compart.com/en/unicode/U+2009 does work, though once copied out the spaces are preserved. Unfortunately, I'm not a JS guru (perhaps not even close to a hobbyist), so I'm out of idea for this. I do realize though, that on Mac I can triple click a message to select all of that message! So even for single formulas without context, this copies the TeX just fine. |
I was thinking that click-drag might be able to get past it.
Perhaps someone else will be able to figure this out then.
Perhaps deletable via JS.
Good point! I tried this on Ubuntu and found that triple click selects a paragraph. To pick up adjacent paragraphs as well, I can triple click and drag, so I can indeed get the whole message. Not very discoverable but does work! |
Thanks for this awesome solution!
One issue that sometimes comes up: sometimes another user posts a formula and I want to reply with a slightly modified version, or even just quote what they said, including the formula.
Unfortunately, I can't get access to the tex that is underneath their image (unless I turn off math-with-slack!).
If I was the one who posted the previous formula, then I can get at the tex by asking to edit my previous post and then canceling the edit -- but Slack won't let me ask to edit another user's post.
Any ideas about how to expose the underlying tex?
the $f(\epsilon)^2$ subexpression
.The text was updated successfully, but these errors were encountered: