← Browse

@juntao/math-equation-images

B

Generate PNG images from math equations in a LaTeX/TeX or Markdown document. Triggered when user says they need images for math equations, formulae, or matrices. The document can be provided inline in the message body or as a Telegram file attachment. Generated images are sent back as Telegram messages. Supports dark (default) and light themes — user can request "light" or "dark" style.

skillclaude

Install

agr install @juntao/math-equation-images --target claude

Writes 5 files into .claude/skills/, pinned to git-23ea5a03.

  • .claude/skills/math-equation-images/.gitignore
  • .claude/skills/math-equation-images/README.md
  • .claude/skills/math-equation-images/SKILL.md
  • .claude/skills/math-equation-images/bootstrap.sh
  • .claude/skills/math-equation-images/install.md

Document


name: math-equation-images description: Generate PNG images from math equations in a LaTeX/TeX or Markdown document. Triggered when user says they need images for math equations, formulae, or matrices. The document can be provided inline in the message body or as a Telegram file attachment. Generated images are sent back as Telegram messages. Supports dark (default) and light themes — user can request "light" or "dark" style.

Math Equation Images

Extract math equations from LaTeX/TeX or Markdown documents and render each as a PNG image.

Binary

  • {baseDir}/scripts/math2img — Renders math equations to PNG images.

Workflow

1. Extract Document

  • Inline: Extract LaTeX/Markdown text from the message body (everything after the request)
  • File attachment: Read the file from the Telegram media path

2. Save Document

Write the content to a temp file with the appropriate extension:

  • .tex for LaTeX/TeX content
  • .md for Markdown content
cat > /tmp/math_input.tex << 'DOCEOF'
<document content here>
DOCEOF

3. Render Math Images

Run math2img on the document:

mkdir -p /tmp/math_output
{baseDir}/scripts/math2img -i /tmp/math_input.tex -o /tmp/math_output

Options:

  • --theme <dark|light> — Color theme. Default: dark
  • --font-size <px> — Font size. Default: 24
  • --scale <factor> — Scale factor. Default: 3.0

Style selection: If the user requests "light" style/theme, use --theme light. Default is dark. The user may also say "light mode", "white background", "light theme", etc.

4. Send Images via Telegram

Copy rendered PNGs to the allowed media directory, then send via the message tool:

cp /tmp/math_output/equation_0001.png ~/.openclaw/media/inbound/equation_0001.png

Send with:

  • action: send
  • filePath: ~/.openclaw/media/inbound/equation_0001.png
  • caption: "Equation 1"

Send all images in order. If no equations found, tell the user.

Trustgrade B

  • passBody integrity

    Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.

  • passType matchnot applicable to this artifact type

    Whether the artifact is really the kind of thing its metadata claims it is.

  • passFreshness

    How long since the source repository was last pushed to.

  • passPrompt injection

    Scans the artifact's own text for instructions aimed at your agent rather than at you.

  • warnLicenseno SPDX license detected

    Whether the source repository declares an SPDX license permissive enough to redistribute.

How the grade is calculated

Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:

  • Aevery check passed
  • Bone warning
  • Ctwo warnings
  • Dprompt injection or body integrity failed, or three warnings
  • Fone of those failed, and something else is wrong

These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.

Versions

  • git-23ea5a03a9872026-07-31