1.2.1 • Published 2 years ago

remarkable-katex v1.2.1

Weekly downloads
597
License
MIT
Repository
github
Last release
2 years ago

CI License: MIT

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.

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:

CommonJS

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

ES6

import { Remarkable } from 'remarkable';
import rkatex from 'remarkable-katex';

var md = new Remarkable();
md.use(rkatex);

Configuration

Accepts a delimiter option that defines the 1-character delimiter to use when recognizing KaTeX spans. Default is the $ character.

{delimiter: '$'}

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.

1.2.0

2 years ago

1.2.1

2 years ago

1.1.8

3 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

7 years ago

1.0.0

7 years ago