mathpix-ocr

Extract LaTeX from PDFs or images and map it into ACSet structures.

60|13|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/plurigrid/asi --skill mathpix-ocr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mathpix-ocr
Source: https://github.com/plurigrid/asi/tree/main/skills/mathpix-ocr
Command: npx skills add https://github.com/plurigrid/asi --skill mathpix-ocr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates extraction of mathematical content from scanned or digital PDFs into LaTeX, then maps the structure into an ACSet for further algebraic processing. It enables batch processing with resilient checkpoints.

Core Features & Use Cases

  • Math OCR via TeglonLabs/mathpix-gem integration
  • Balanced ternary checkpoint pipeline using seed 1069
  • ACSet transformation and LaTeX extraction
  • Batch processing with restart

Quick Start

Start a batch OCR on a PDF using a preconfigured seed: claude mcp mathpix smart_pdf_batch --path textbook.pdf --checkpoint-seed 1069

Frequently Asked Questions about mathpix-ocr

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

FAQPage Schema
How do I extract LaTeX from PDF documents automatically?

LaTeX extraction from PDFs uses optical character recognition to digitize mathematical content, converting scanned or image-based math into machine-readable LaTeX code. This Skill integrates Mathpix OCR to automate the process and map results into structured algebraic representations for batch processing.

Can I batch-process multiple math PDFs with checkpoint recovery?

Yes, batch processing with resilient checkpoints enables you to process multiple PDFs and restart from saved states without reprocessing completed work. This Skill uses balanced ternary checkpoints seeded with 1069 to manage chunked processing, confidence gating, and recovery across large document sets.

What happens after LaTeX is extracted from a PDF?

Extracted LaTeX is transformed into an ACSet representation for downstream algebraic processing. The workflow outputs LaTeX AST, type and term counts, and colored TAP-state ACSet structures that enable further mathematical analysis and computation.

Does this work with scanned textbooks and handwritten math documents?

This Skill targets mathematical documents in PDF or image format, handling both digitally-born and scanned content. OCR capability processes visible mathematical notation, though accuracy depends on document quality and mathematical notation legibility.

What's the difference between this and general PDF text extraction?

General PDF extraction recovers plain text; math-specific OCR preserves mathematical notation, symbols, and formatting as LaTeX code. This Skill adds ACSet transformation, enabling algebraic reasoning and structured processing impossible with plain-text extraction alone.