-
-
Notifications
You must be signed in to change notification settings - Fork 11
LaTeX not copied from conversation... #7
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
Comments
Thanks for the comprehensive report! The responses are converted to markdown using the turndown package and ChatGPT uses KaTeX markup. If the conversion step would be skipped for responses containing LaTeX
|
I'm struggling to understand what you imply by:
Do you mean that this issue is impossible to fix because the page does not contain the raw LaTeX pre-rendering? Otherwise, would it be possible to skip conversion for LaTeX components add the $$ and $ signs where appropriate so that the LaTeX boundaries are sent to the markdown and the markdown renderer can display them instead of having them converted before? As far as I'm concerned I'm getting partially converted output, with e.g. |
I don't mean it is impossible to fix, but how would you retrieve the text of the response other than using the value of ELEMENT.textContent? |
If your question is "how would we get the original LaTeX for a particular Also it looks like it is possible to differentiate between inline LaTeX ( |
Given that source code is not converted correctly any more as well (see #8), maybe the current implementation should be replaced with triggering clicks on the copy button of each response and then accessing the content of the clipboard. |
Ah I didn't realize we could do this! Well that will definitely fix it for my particular case where I only had one document to convert, thanks 😅 |
Sadly, I cannot access the content of the clipboard in the bookmarklet though, only in a browser extension that has the necessary permission. |
Maybe it reads what it should write from somewhere on the page? Otherwise yes it looks like a tampermonkey script might be the easiest way to go... (IIRC these do have access to the clipboard but it's still a straight JS file to paste) |
I went through the click event in the dev console but couldn't figure out a way to get the text before it is copied to the clipboard. |
Problem Description
I had a conversation that looked like so:
When I ran the bookmarklet and displayed the Markdown in VS Code, I was expecting to see the LaTeX formatted text, but I saw this:
The Markdown code was this:
Expected Behavior
It should have been this:
Which would look like so:
The text was updated successfully, but these errors were encountered: