A small browser tool for writing equations in CTF and cryptography writeups. It previews LaTeX with MathJax 3 and copies the rendered equation as a transparent, high-resolution PNG.
Live demo · Source repository · Built by Ariq Ardian
- Enter
$$e^{i\pi}+1=0$$for a display equation, or$e^{i\pi}+1=0$for an inline equation. Complete math environments such as\begin{aligned}...\end{aligned}also work directly without dollar delimiters. The examples dropdown inserts delimiters automatically, and the Display/Inline control changes them for you. - Click or drag over the rendered equation to highlight it, then press Ctrl+C (Cmd+C on macOS). Paste the PNG into an app that accepts clipboard images, such as Google Docs or Microsoft Word.
- Choose Light · dark equation when pasting onto a light background, or Dark · white equation when pasting onto a dark background. The preview shows the selected background, while the copied or downloaded PNG stays transparent. A PNG cannot detect the background of the app where it is pasted, so select the matching option before copying.
- Use Copy Image, Download PNG, or Copy LaTeX when you need those specific outputs. Image copying (including Ctrl+C on the preview) uses a compact 2× PNG for documents, with half the width and height of the previous 4× clipboard image. Download PNG keeps the full 4× resolution. Both images are transparent and cached separately; Copy LaTeX includes the dollar delimiters.
You can paste LaTeX source into the input with Ctrl+V (Cmd+V on macOS). The first paste replaces the starter example; later pastes follow the normal cursor or selection. An image on the clipboard cannot be converted back into LaTeX source by this tool.
The separate LaTeX from AI chats section accepts pasted responses from ChatGPT, DeepSeek, and Gemini. Paste a response, click Extract equations, choose one formula, then click Use equation in editor. This normalizes the selected formula into the existing editor for rendering, compact image copying, and PNG download.
Supported wrappers: display math with $$...$$ or \[...\], inline math with $...$ or \(...\), and fenced code blocks labeled latex, tex, or math. Explanation outside these wrappers is skipped; code blocks labeled with other languages are ignored. For an unwrapped formula, enable Bare LaTeX only. Editing the pasted response clears the extracted list to prevent importing an old result. Limits: 50,000 characters and 100 equations per response.
This imports LaTeX text already generated in an AI chat. No AI account connection or API key is needed. Copy LaTeX source rather than a screenshot or rendered equation.
Rich-text paste (Ctrl+V from the original chat) can recover equation source from MathML annotations when the clipboard includes it. Each math element is read once, so accessible and visual copies are not imported twice. Pasted markup stays in an inert template and is never inserted into the page. If only flattened Unicode text remains, fractions, powers, and duplicated display text cannot be reconstructed reliably. The importer explains this and offers Copy LaTeX prompt to request separate LaTeX code blocks from the AI. Bare LaTeX only is for actual LaTeX source; it does not repair flattened math.
Bare math environments such as aligned, gathered, align, equation, matrix, bmatrix, and cases are also detected automatically, including nested environments. For example, DeepSeek's four-line Maxwell equations in \begin{aligned}...\end{aligned} can be pasted directly without enabling Bare LaTeX only. An incomplete or mismatched environment shows a correction message.
From the project directory:
python -m http.server 8000Open http://localhost:8000. There is no build step or backend. MathJax 3 loads from jsDelivr, so rendering needs an internet connection unless you host that script yourself.
The PNG clipboard action uses ClipboardItem with image/png and needs a secure context. localhost and GitHub Pages provide one. Chrome, Edge, and other Chromium browsers are recommended for image clipboard support. If image writing is unavailable or denied, Download PNG remains available. The Ctrl+C image shortcut is handled only while the equation preview has focus; Ctrl+C in the editor retains normal text-copy behavior.
The Pages workflow publishes the static site when main changes. It serves index.html, style.css, script.js, and the local profile avatar from GitHub Pages. The project can also be hosted by any static web server.
index.html Interface and MathJax configuration
style.css Responsive styling
script.js Rendering, clipboard, and PNG export
assets/profile.png Creator avatar
assets/fx-logo.svg Mathematical Fx logo and favicon
assets/preview.png README screenshot
.github/workflows/pages.yml GitHub Pages deployment
README.md Project documentation
