vscode icon indicating copy to clipboard operation
vscode copied to clipboard

When copy from rendered Copilot chatbox, copy the underlying original LaTeX text instead of rendering DOM tree

Open Pengkun-ZHU opened this issue 2 weeks ago • 0 comments

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:

image

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.

Pengkun-ZHU avatar Nov 17 '26 12:11 Pengkun-ZHU