0.1.2 • Published 2 years ago

markdown-math-gh-compiler v0.1.2

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

Markdown Math → Github Compiler

Github markdown does not support latex equations. That's if you ask me (jk, no hard feelings github).

Based off of the findings in this post, this is a somewhat hacky (and perhaps over-engineered) tool which compiles markdown with math into github-friendly markdown with rendered equations.

It's designed for use as part of a makefile, github action (example), or similar workflow.

Tables are not supported currently. Lists are mostly supported but there a couple kinks with nested lists.

The tool works by reconstructing the tokens returned by a markdown parser, altering only the math token. This is necessary for robustness, simply matching $...$ and $$...$$ might match half-way across the page or in code blocks/inline html and such.

Usage:

npm install -g markdown-math-gh-compiler
markdown-math-gh-compiler input.md -o output.md