tex-renderRenders LaTeX math to PNG, JPEG, WebP, or AVIF images using MathJax (TeXโSVG) and @svg-fns/svg2img. Invoke whenever the agent needs to output LaTeX as a view...
Install via ClawdBot CLI:
clawdbot install TheBigoranger/tex-renderRenders LaTeX math to PNG, JPEG, WebP, or AVIF (and SVG). Use when you need a viewable image from LaTeX instead of raw code.
User notice: When this skill is active, the agent will automatically render any LaTeX in its replies as images and send them in orderโwithout asking for permission. If you prefer to be prompted or to receive raw LaTeX instead, do not enable this skill (or remove it from your workspace).
The render script lives in the same skill folder as this SKILL.md:
<skill_folder>/
โโโ SKILL.md
โโโ package.json
โโโ scripts/
โโโโ render.js
โโโโ validate.js
Use the directory containing this SKILL.md as the skill path. The script is at scripts/render.js relative to that folder. Invoke: node . The agent loading this skill has the skill pathโuse it to run the script.
One-time setup. After clawhub install tex-render, run npm install in the skill folder:
cd <skill_folder>
npm install
sharp package may compile during install; ensure Node.js 14+ and a working build toolchain if needed (see sharp install for platform notes).Output your reply interleaved: whenever you would output LaTeX, do this instead:
message with the text written so far (no LaTeX).--output dataurl). Parse the JSON for the PNG path.message with action: "send", path set to the rendered PNG, and message as short caption.Do not output raw LaTeX. Do not ask the user for permission to render โ render and send images immediately when LaTeX would appear in your reply (users are informed of this automatic behavior in the user notice above). Do not accumulate everything and send at the end โ send text and images in order as you go.
Critical: Output in order: plain text โ send โ LaTeX โ render โ send image โ plain text โ send โ LaTeX โ render โ send image โ โฆ The user must receive text and images in the natural reading order.
Example: Explaining Lagrangian:
โ Send "The Lagrangian is defined as " โ Render L = T - V โ Send image with caption "L = T - V" โ Send ". The Euler-Lagrange equation is " โ Render d/dt(โL/โqฬ) - โL/โq = 0 โ Send image โ Send " โ this yields the equations of motion."
Run: node (or node scripts/render.js when already in the skill folder).
Escaping: When invoking via shell:
node scripts/render.js '\frac{d}{dt}'y' for derivative): printf '%s' "y' = f(t, y), \quad y(t_0)=y_0" | node scripts/render.js โ use double quotes so ' is literal; backslashes like \quad stay intact.node <skill_folder>/scripts/render.js --help
Default output is PNG to ~/.openclaw/media/tex-render/. The script prints one JSON line with file paths: {"svg":"...","png":"..."} or {"svg":"...","jpeg":"..."}, etc. Use --output dataurl only when the conversation system explicitly supports Data URL images (otherwise it may show raw base64 text).
Use = the directory containing this SKILL.md.
Basic (PNG default):
node <skill_folder>/scripts/render.js 'E = mc^2'
node <skill_folder>/scripts/render.js '$\frac{F}{m}=a$'
LaTeX with apostrophe (e.g. y'): use stdin to avoid shell quoting issues:
printf '%s' "y' = f(t, y), \quad y(t_0)=y_0" | node <skill_folder>/scripts/render.js
JPEG / WebP / AVIF:
node <skill_folder>/scripts/render.js --format jpeg --quality 80 '\frac{F}{m}=a' ./out/formula
node <skill_folder>/scripts/render.js --format webp 'x^2 + y^2 = z^2'
node <skill_folder>/scripts/render.js --format avif 'E = mc^2'
Data URL (no file):
node <skill_folder>/scripts/render.js --output dataurl 'E = mc^2'
Scale by width:
node <skill_folder>/scripts/render.js --width 800 '\int_0^\infty e^{-x^2} dx'
Inline math (smaller rendering):
node <skill_folder>/scripts/render.js --inline 'a^2 + b^2 = c^2'
Height and zoom: Use --height N or --zoom N as documented in --help.
To make the agent use tex-render without the user explicitly asking, add to your workspace TOOLS.md:
## LaTeX in Responses (tex-render)
**Whenever your reply would contain LaTeX** (equations, formulas, scientific notation), **use the tex-render skill** automatically. Examples: physics, math, chemistry questions with formulas.
**Workflow:** send plain text โ render LaTeX โ send image via message tool โ continue text. Use single quotes when invoking (e.g. `'\frac{a}{b}'`).
### LaTeX / Equations (tex-render)
- When answering scientific or math questions, if your reply would contain LaTeX, use tex-render and send images โ do this automatically.
Test: Ask "Explain the Lagrangian formula" without mentioning tex-render. The agent should render and send images.
This package is maintained at https://github.com/TheBigoranger/tex-render. You can open issues there for bug reports and feature requests.
Generated Mar 1, 2026
Tutors can automatically render complex equations as images during live chat sessions or in pre-recorded lessons, ensuring students see clear, viewable formulas without LaTeX code clutter. This enhances comprehension and engagement in virtual classrooms.
Researchers can integrate this skill into AI assistants to generate image-based formulas for papers, reports, or presentations, avoiding formatting issues across different document editors. It streamlines the creation of professional-looking scientific content.
Support agents can use it to render mathematical notations and equations as images in customer responses, making explanations more accessible for users troubleshooting CAD or simulation tools. This reduces confusion from raw LaTeX in support tickets.
Content creators can automate the generation of formula images for online courses, quizzes, and textbooks, saving time on manual rendering and ensuring consistency across digital learning materials. It supports scalable production of STEM resources.
Data analysts can embed rendered statistical formulas and mathematical models into automated reports or dashboards, improving readability for stakeholders who may not be familiar with LaTeX syntax. This aids in clear communication of analytical insights.
Offer this skill as part of a subscription-based platform for schools and tutors, charging monthly fees per user for access to automated LaTeX rendering. Revenue comes from tiered plans based on usage volume and advanced features like custom image formats.
License the rendering functionality as an API that developers can integrate into their own applications, such as content management systems or collaboration tools. Revenue is generated through pay-per-use API calls or enterprise licensing agreements.
Provide basic rendering for free to attract individual users and small teams, then monetize through premium upgrades like high-resolution outputs, batch processing, or priority support. Revenue streams include one-time purchases for advanced features.
๐ฌ Integration Tip
Ensure Node.js 14+ is installed and run npm install in the skill folder before use; for automatic triggering, add the specified TOOLS.md workflow to your workspace.
Edit PDFs with natural-language instructions using the nano-pdf CLI.
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
Convert documents and files to Markdown using markitdown. Use when converting PDF, Word (.docx), PowerPoint (.pptx), Excel (.xlsx, .xls), HTML, CSV, JSON, XML, images (with EXIF/OCR), audio (with transcription), ZIP archives, YouTube URLs, or EPubs to Markdown format for LLM processing or text analysis.
็จ MinerU API ่งฃๆ PDF/Word/PPT/ๅพ็ไธบ Markdown๏ผๆฏๆๅ ฌๅผใ่กจๆ ผใOCRใ้็จไบ่ฎบๆ่งฃๆใๆๆกฃๆๅใ
Generate hand-drawn style diagrams, flowcharts, and architecture diagrams as PNG images from Excalidraw JSON
The awesome PPT format generation tool provided by baidu.