Repository navigation
[Feature] Support Markdown/LaTeX conversion when copying text selections containing formulas on ChatGPT #1026
Replies: 2 comments
|
Thanks for the detailed write-up. You're right: today Formula Copy only handles clicking a single formula, and a normal Ctrl/Cmd+C on a selection is left to the browser, so formulas don't come back as LaTeX. This looks worth doing, and your outline matches how we'd approach it: an opt-in option under Formula Copy that converts formulas in the copied selection to LaTeX, reusing the same source extraction. We'll keep this open to track it. In the meantime, if you need a whole answer rather than part of it, the conversation export's Markdown format on ChatGPT already writes formulas as |
|
Thanks for the detailed request! Selecting part of a reply and pressing Ctrl/Cmd+C now copies its formulas as LaTeX ( |
Uh oh!
There was an error while loading. Please reload this page.
需求描述 | Feature Description
Voyager currently supports copying an individual rendered formula on ChatGPT and converting it to LaTeX / Markdown-compatible formats.
However, when selecting a larger range of an assistant response containing both normal text and mathematical formulas, and then copying it with
Ctrl+C/Cmd+C, the formulas are not correctly converted to Markdown/LaTeX.For example, suppose a ChatGPT response contains:
If I select the entire section and copy it, I would like to get Markdown similar to:
Currently, Voyager's Formula Copy works well when copying an individual formula, but that conversion logic is not applied when copying a larger text selection containing formulas.
This makes it difficult to copy a complete ChatGPT answer into Markdown editors such as Obsidian, Typora, VS Code, etc., because every formula has to be copied separately.
解决方案 | Proposed Solution
Extend the existing Formula Copy functionality so that Voyager can optionally process normal clipboard copy events when the current selection contains rendered formulas.
Possible behavior:
User selects an arbitrary range of text inside a ChatGPT response.
User presses
Ctrl+C/Cmd+C.Voyager checks whether the selection contains or intersects any supported formula nodes.
If formulas are present, Voyager serializes the selected content to Markdown.
Rendered formulas are replaced with their original LaTeX source:
\( ... \)or$...$\[ ... \]or$$...$$Normal text, line breaks, lists, code blocks, etc. should remain as close as possible to the original Markdown structure.
The resulting Markdown is written to
text/plainin the clipboard.Ideally, the implementation could reuse the same formula-source extraction logic already used by the existing single-formula Formula Copy feature, instead of trying to reconstruct LaTeX from rendered text.
For ChatGPT, formula source may already be available through the KaTeX / MathML DOM, for example
annotation[encoding="application/x-tex"], so the selection serializer could replace formula DOM nodes with the corresponding LaTeX before writing to the clipboard.It may also be useful to make this behavior optional, for example:
so users who prefer the browser's native copy behavior can leave it disabled.
验收标准 | Acceptance Criteria
On
chatgpt.com:Example:
Rendered ChatGPT content:
Expected clipboard content:
🔄 替代方案 | Alternatives Considered
Copy every formula individually
Voyager's current Formula Copy feature works well for an individual formula, but for long technical answers containing many formulas this requires repeatedly copying each formula and manually reconstructing the surrounding Markdown.
Use ChatGPT's native copy behavior
Native range selection / clipboard copying preserves the visible text reasonably well, but rendered mathematical formulas are not reliably converted back into reusable Markdown LaTeX.
Use ChatGPT's "Copy response" button
This can work for copying an entire response in some cases, but it does not solve arbitrary partial selections. Often I only want to copy several paragraphs from a long answer.
📝 补充信息 | Additional Information
This request is specifically about range/selection copy, not the existing single-formula click-to-copy feature.
Related but different issues include:
The desired workflow is essentially:
select a large section of a ChatGPT answer → Ctrl/Cmd+C → paste valid Markdown with LaTeX formulas intact
rather than:
click each formula → copy formula → copy surrounding text separately → manually combine them.
💻 贡献意愿 | Contribution
community-only,其他贡献者可评论/claim认领 / Other contributors may use/claimunless the issue is labeledcommunity-onlyAll reactions