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. Dollar delimiters are required. The examples dropdown inserts them 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.
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
