vscode
vscode copied to clipboard
When copy from rendered Copilot chatbox, copy the underlying original LaTeX text instead of rendering DOM tree
Feature request
When selecting and copying rendered equations from a Chat response, copy their original LaTeX source, including delimiters, instead of text extracted from the rendered math DOM.
Current behavior
Chat already supports rendering LaTeX using KaTeX. However, selecting a rendered equation and copying it puts the content of rendering DOM tree into clipboard, which doesn't make any sense whatsoever.
For example, for this LaTeX text:
$$
\int_{-\infty}^{\infty} e^{-x^2}
$$
It is rendered as:
However, copying it out you literally gets the DOM tree components of the rendering:
∫
−∞
∞
e
−x
2
This makes equations difficult to reuse in Markdown documents, another Chat message, or other LaTeX-aware tools.