Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/proffan/render2katex

a small node.js snippet to render something into LaTeX by KaTeX
https://github.com/proffan/render2katex

Last synced: about 1 month ago
JSON representation

a small node.js snippet to render something into LaTeX by KaTeX

Awesome Lists containing this project

README

        

# render2katex
a small node.js snippet to render LaTeX into KaTeX HTML by KaTeX

# Install

## Experimental NPM install

I've just published this on NPM, just type `npm install render2katex` and you should be all set.
Note this is not tested by anyone, so if you can use the next method to play safe.

## Source install

This method is field proven.

First install node.js.

Clone this repo.

run `npm install --production` at the local repo.

### Testing source install

`npm test` should give you a HTML string which should render `sin(x)`.

# Usage

`echo "f(x)=\sin(x)" | node index.js d`

The parameter can be `i`(inline) or `d`(display) corresponding to KaTeX modes.

Result:

```
f(x)=sin(x)f(x)=\sin(x)
f(x)=sin(x)

```