tex-render-guide
Render LaTeX math expressions to images in PNG, JPEG, and SVG
npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill tex-render-guide --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# TeX Render Guide ## Overview Researchers frequently need to render LaTeX mathematical expressions as standalone images—for inclusion in presentations, posters, web pages, documentation, social media posts, or any context where native LaTeX rendering is unavailable. Converting a LaTeX equation into a crisp PNG, JPEG, or SVG image requires selecting the right toolchain and configuring it for the appropriate output quality and format. This skill covers multiple approaches to LaTeX-to-image rendering, from command-line tools to web APIs and JavaScript libraries. It provides guidance on choosing the right approach for your use case, achieving publication-quality output, and handling common challenges like transparent backgrounds, high DPI scaling, and color customization. Whether you need a one-off equation image for a slide deck or a batch pipeline that renders hundreds of equations for a web application, this guide provides the tools and techniques to get it done. ## Method 1: Command-Line Rendering with LaTeX + dvipng/dvisvgm This is the highest-quality approach, producing output identical to what you would see in a compiled LaTeX document. ### Single Equation to PNG Create a minim
- Overview
- Method 1: Command-Line Rendering with LaTeX + dvipng/dvisvgm
- Single Equation to PNG
- Key Options for dvipng
- Equation to SVG
- Batch Rendering Script
- Method 2: KaTeX (Fast, Lightweight)
- Command-Line Usage with Node.js
- Advantages of KaTeX
- Limitations
- Method 3: MathJax (Comprehensive)
- Server-Side Rendering with MathJax
- Converting MathJax SVG to PNG
- Method 4: Web API Services
Create a temporary LaTeX file cat > equation.tex << 'EOF' Render to PDF, then convert to PNG pdflatex equation.tex Convert PDF to high-resolution PNG (300 DPI) convert -density 300 equation.pdf -quality 100 equation.png latex equation.tex dvipng -D 300 -T tight -bg Transparent equation.dvi -o equation.png Using dvisvgm (included with TeX Live) dvisvgm --no-fonts equation.dvi -o equation.svg
What does the tex-render-guide skill do?
Render LaTeX math expressions to images in PNG, JPEG, and SVG
How do I install it?
Run `npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill tex-render-guide --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From brycewang-stanford/Auto-Empirical-Research-Skills, a repository with 3,244 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.