remark-math

A unified remark plugin that adds LaTeX math syntax to markdown, ready to render with KaTeX or MathJax.

Library
npm
v6.0.0
516stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
44/100Fair
Development Activity0
Maintenance32
Community64
Maturity60
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
86/100Excellent
Architecture85
Code Quality88
Innovation88
Learning Curve82

remark-math is a plugin for the unified/remark ecosystem that teaches markdown to understand math. It parses inline math wrapped in single dollar signs and block equations wrapped in double dollars, adding the syntax extension and the mdast nodes needed to carry LaTeX through the processing pipeline.

Because it only annotates the syntax tree, remark-math pairs cleanly with a rendering plugin such as rehype-katex or rehype-mathjax, which turn the parsed math into HTML at compile time. This keeps client bundles free of runtime math libraries and makes it a natural fit for static sites, documentation, and scientific writing.

What You Get

  • A remark plugin that parses inline ($...$) and block ($$...$$) math in markdown
  • mdast inlineMath and math nodes that flow through the unified pipeline
  • Seamless pairing with rehype-katex and rehype-mathjax for compile-time HTML rendering
  • Configurable options (such as singleDollarTextMath) passed through to the underlying math extension
  • Full TypeScript type definitions shipped via JSDoc and generated .d.ts files

Common Use Cases

  • Rendering LaTeX equations in documentation sites built on Astro, Next.js, or Gatsby
  • Adding math support to markdown-driven blogs and scientific writing
  • Producing static HTML math with no client-side JavaScript by rendering at build time
  • Feeding parsed math nodes into custom remark/rehype transforms

Under The Hood

Architecture - remark-math is a thin, delegation-first plugin. The published entry index.js simply re-exports lib/index.js, whose default remarkMath(options) function attaches three extension arrays to the unified processor’s shared data(): micromarkExtensions, fromMarkdownExtensions, and toMarkdownExtensions. It pushes math() from micromark-extension-math for tokenizing, and mathFromMarkdown()/mathToMarkdown() from mdast-util-math for building and serializing the math and inlineMath mdast nodes. All real parsing lives in those sibling packages, so remark-math itself is essentially wiring.

Tech Stack - The package is pure ES-module JavaScript (type: module, single exports entry) targeting unified 11. Its runtime dependencies are mdast-util-math, micromark-extension-math, unified, and @types/mdast. Types are authored as JSDoc annotations and emitted to .d.ts; tooling is xo plus prettier, and it declares sideEffects: false for tree-shaking.

Code Quality - Quality is high for its size. The core lib/index.js is a few dozen well-commented lines with careful null-handling of the options object and defensive initialization of the extension arrays. The package ships a substantial test.js (~24KB) exercising parsing and stringifying across inline and block cases, and every export is fully typed. Naming follows unified conventions consistently.

API Design - The developer experience is idiomatic unified: a single default-exported plugin registered with .use(remarkMath, options) and one optional configuration object. There is no boilerplate beyond composing it into a processor alongside a rehype renderer, and the readme documents installation, usage, options, syntax, security, and related plugins thoroughly, making it approachable for anyone already using remark.

Used by 34 apps in this directory

TypeScript
88%
Other

AFFiNE

Productivity · Project Management · Note Taking

71,668

Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.

View details
91
Repo Health
87
Technical
68
Dependency
Built with
TypeScript88%
Updated today
TypeScript
95%
Apache 2.0

AionUi

AI Agents · Productivity

32,102

Free, open-source Cowork desktop app that unifies Claude Code, Codex, Gemini CLI, and 20+ AI agents into a single platform with multi-agent teams, 24/7 cron automation, and zero-config built-in agent.

View details
88
Repo Health
76
Technical
66
Dependency
Built with
TypeScript95%
Updated today
Python
90%
Apache 2.0

Apache Airflow

Data Engineering

46,530

Define, schedule, and monitor complex data workflows as Python code — with a powerful UI, 80+ provider integrations, and battle-tested scalability across thousands of production deployments.

View details
96
Repo Health
89
Technical
66
Dependency
Built with
Python90%
Updated today
Python
68%
Other

AutoGPT

Automation · Productivity · AI Assistants

186,687

Build, deploy, and run autonomous AI agents that automate complex multi-step workflows using a visual block-based graph editor.

View details
93
Repo Health
78
Technical
67
Dependency
Built with
Python68%
TypeScript31%
Updated today
TypeScript
48%
AGPL 3.0

Banana Slides

AI Design Tools · Productivity

15,476

AI-native PPT generator with Vibe editing, multi-LLM support, and fully editable PPTX export

View details
83
Repo Health
82
Technical
71
Dependency
Built with
TypeScript48%
Python47%
Updated 3 days ago
TypeScript
92%
GPL 3.0

Blinko

Knowledge Management · Note Taking

10,880

A self-hosted, AI-powered card note-taking tool that lets you capture fleeting thoughts instantly and retrieve them with natural language search.

View details
83
Repo Health
69
Technical
65
Dependency
Built with
TypeScript92%
Updated 2 weeks ago
Java
73%
Other

ByteChef

Automation · AI Agents

990

Unified open-source platform for AI agent orchestration and workflow automation with 180+ connectors, MCP support, and durable execution.

View details
81
Repo Health
82
Technical
73
Dependency
Built with
Java73%
TypeScript26%
Updated 2 days ago
TypeScript
84%
Apache 2.0

Continue

Developer Tools · AI Development · AI Code Assistants

35,532

Open-source coding agent for VS Code, JetBrains, and CLI with support for 30+ LLM providers.

View details
87
Repo Health
88
Technical
65
Dependency
Built with
TypeScript84%
Updated today
TypeScript
88%
MIT

DevTools-X

Developer Tools

1,532

41 offline-first developer utilities in a single 10MB cross-platform desktop app — no Electron, no cloud, no compromise.

View details
51
Repo Health
68
Technical
68
Dependency
Built with
TypeScript88%
Updated 2 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search