A Firefox extension that lets you quickly copy LaTeX code (KaTeX or MathJax) from equations displayed on websites like ChatGPT, DeepSeek, or any blog using mathematical equations. It works simply by hovering over an equation and clicking to copy the LaTeX expression.
Version 1.1: Now it also works with with Wikipedia and Wikiwand images.
content.js
):
<span class="katex">
elements on the page.<annotation encoding="application/x-tex">
.navigator.clipboard.writeText()
.<svg>
to avoid external file dependencies.overlay.css
):
pointer
cursor.manifest.json
:
content.js
and overlay.css
.Generally any math, physics, or engineering-related blog or website. Some typical examples:
The javascript source code is extremely simple and available here. It loads after everything and is blazingly fast.
However you can always customize in which hosts (websites) the extension loads or not:
This is done in “Firefox Settings > Extensions & Themes” (or simply search about:addons
), clicking the extension and choosing the tab “Premissions and Data”.
In case you turn off the “all sites” toggle option, you can also add manual sites that are not in the default list.
And now the custom site should appear as a new toggle in the “Permissions and data” tab.
There is also a Chrome version of this extension: https://github.com/Mapaor/copy-latex-chrome-extension