tex-render for Openclaw

A utility for AI agents to render LaTeX mathematical notation into high-quality, viewable images.

thebigoranger
v1.1.4
Feb 17, 2026
1
2.2k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install tex-render

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install tex-render using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is tex-render?

tex-render is a specialized utility designed to bridge the gap between raw LaTeX code and visual representation within AI agent workflows. By leveraging MathJax for TeX-to-SVG conversion and @svg-fns/svg2img for image processing, this tool allows agents to provide users with clear, professional-grade mathematical notation.

As one of the many versatile Openclaw Skills, it ensures that complex equations in physics, chemistry, or mathematics are presented as viewable images (PNG, JPEG, WebP, or AVIF) rather than unformatted text strings. The skill is designed to work automatically, allowing an agent to interleave text and images to provide a natural reading experience for the user.

tex-render Use Cases

  • Explaining complex physics equations like the Lagrangian or Euler-Lagrange where visual notation is essential.
  • Presenting mathematical proofs where formatted imagery is superior to raw code blocks.
  • Automatically converting scientific notation into images during a conversational reply to improve readability.
  • Generating high-resolution formulas for educational or technical documentation via AI agents.

How tex-render Works

  1. The AI agent identifies a LaTeX expression within its planned response.
  2. The agent invokes the render.js script, passing the LaTeX string as a command-line argument or via stdin for complex expressions.
  3. The tool converts the TeX input into an SVG and then processes it into the requested image format using the sharp library.
  4. The script outputs a JSON object containing the local file paths of the generated images.
  5. The agent sends the preceding text, followed by the rendered image path using an image-sending tool, ensuring the user sees the formula in context.

tex-render Setup

First, install the skill into your workspace. Then, navigate to the skill directory to install the required Node.js dependencies:

# Navigate to the skill folder
cd <skill_folder>

# Install dependencies
npm install

Ensure you have Node.js 14+ and a working build toolchain for the sharp image processing library. This setup allows your agent to utilize Openclaw Skills for visual math rendering immediately.

tex-render Data Schema & Taxonomy

The skill manages its output by saving images to a specific directory and returning metadata via JSON.

Property Description
Output Directory ~/.openclaw/media/tex-render/
Supported Formats PNG, JPEG, WebP, AVIF, SVG
Metadata Format Single-line JSON (e.g., {"svg":"...","png":"..."})
Input Handling CLI Arguments or Stdin (for escaping complex LaTeX)

tex-render Advanced Features

  • Support for modern web formats including WebP and AVIF for optimized file sizes.
  • Customizable rendering options including width, height, quality, and zoom levels.
  • Inline rendering mode for integrating smaller mathematical symbols directly into sentence-like contexts.
  • Data URL support for environments where embedded base64 images are preferred over file paths.
  • Seamless integration with workspace TOOLS.md for automatic, prompt-free triggering of Openclaw Skills whenever LaTeX is detected.

SKILL.md


Loading

Related Openclaw Skills

Featured*