Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/proffan/render2katex
- Owner: ProfFan
- License: mit
- Created: 2016-02-19T12:10:27.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-11-18T03:57:03.000Z (about 5 years ago)
- Last Synced: 2024-11-04T00:27:39.093Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
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)
```