woollybah / remarkable-katex

A Remarkable plugin for converting $...$ and $$...$$ in Markdown text into math HTML using KaTeX.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Overview

This is a Remarkable plugin that converts LaTeX math expressions between $...$ (inline) or $$...$$ (block) delimiters into math HTML. It should not interfere with any other Markdown processing.

I use this to perform server-side math expression rendering for my blog, Keystroke Countdown.

NOTE: currently the delimiters are hard–coded. Customizing this is work for a future release.

To Use

Install this package using npm:

% npm install [-s] remarkable-katex

Assuming you already have Remarkable installed, one way to use would be like so:

var Remarkable = require('remarkable');
var plugin = require('remarkable-katex');
var md = new Remarkable();
md.use(plugin);

Configuration

None right now.

Dependencies

  • KaTeX -- performs the rendering of the LaTeX commands.

Tests

There are a set of Vows in index.test.js. To run:

% npm test

NOTE: if this fails, there may be a path issue with vows executable. See package.json.

About

A Remarkable plugin for converting $...$ and $$...$$ in Markdown text into math HTML using KaTeX.

License:MIT License


Languages

Language:JavaScript 100.0%