glmocr-formula

Extract mathematical formulas from images and PDFs into LaTeX.

Updated Apr 2, 2026
One-click install
npx skills add https://github.com/ViewWay/openclaw-skills --skill glmocr-formula-viewway
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: glmocr-formula
Source: https://github.com/ViewWay/openclaw-skills/tree/main/glmocr-formula
Command: npx skills add https://github.com/ViewWay/openclaw-skills --skill glmocr-formula-viewway

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, and includes scripts (resource) components.

What problem does it solve?

Recognize mathematical formulas from images and PDFs and convert them to LaTeX format using the ZhiPu GLM-OCR layout parsing API.

Core Features & Use Cases

  • Complex formula support: integrals, matrices, fractions, radicals
  • LaTeX output: formulas are ready for direct use in documents
  • Inline & block formulas: detects both inline and display-style formulas
  • Mixed content: handles documents with text and formulas
  • Local file & URL: supports processing from local files or remote URLs

Quick Start

Run the GLM-OCR CLI to extract formulas from a local image or URL and convert them to LaTeX.

Frequently Asked Questions about glmocr-formula

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract math formulas from images and convert them to LaTeX?

You can extract math formulas from images and convert them to LaTeX by processing local files or remote URLs through the GLM-OCR layout parsing API. It handles complex equations, matrices, and integrals directly.

Can I extract both inline and display formulas from a PDF?

Yes, PDF formula extraction detects both inline and display-style formulas within mixed content documents. It identifies mathematical expressions alongside standard text and outputs them in LaTeX format.

Do I need a specific API key to convert images to LaTeX?

Yes, image-to-LaTeX conversion requires setting the ZHIPU_API_KEY environment variable to authenticate requests. The Skill uses a fixed endpoint for the GLM-OCR API to process your inputs.

What types of complex equations are supported for LaTeX extraction?

LaTeX extraction supports complex formula structures including integrals, matrices, fractions, and radicals. It parses mathematical layouts from both images and PDFs to generate ready-to-use LaTeX output.

Does the formula OCR tool handle local files and remote URLs?

Yes, formula OCR handles both local image files and remote URLs for converting mathematical content to LaTeX. It includes robust error handling during the layout parsing process to manage processing failures.

Are there limitations when parsing mixed content documents for math extraction?

Math extraction from mixed content documents is limited to parsing text and formulas for LaTeX conversion. While it applies robust error handling, users can optionally retrieve raw results to verify complex layout parsing accuracy.