Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeremy-rifkin/markdown-math-gh-compiler
Compile markdown with latex equations to github friendly markdown with rendered equations.
https://github.com/jeremy-rifkin/markdown-math-gh-compiler
Last synced: 27 days ago
JSON representation
Compile markdown with latex equations to github friendly markdown with rendered equations.
- Host: GitHub
- URL: https://github.com/jeremy-rifkin/markdown-math-gh-compiler
- Owner: jeremy-rifkin
- Created: 2021-06-22T22:20:22.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-24T21:42:31.000Z (about 3 years ago)
- Last Synced: 2024-11-28T22:08:43.382Z (about 1 month ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## 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](https://gist.github.com/a-rodin/fef3f543412d6e1ec5b6cf55bf197d7b), 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](.github/workflows/compile_readme.yml)), 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
```