math-renderer
v1.0.11
Published
React component to render latex strings, based on Katex
Downloads
6
Readme
math-renderer
React component to render latex strings, based on Katex
Install
npm install --save math-renderer
Usage
import React, { Component } from 'react'
import MathRenderer from 'math-renderer'
import 'katex/dist/katex.min.css'
class Example extends Component {
render () {
return (
<MathRenderer value={"Inline expression $\\int_0^\\infty x^2 dx$"} />
)
}
}
Or
class Example2 extends Component {
render () {
return (
<MathRenderer value={"Block expression $$\\int_0^\\infty x^2 dx$$"} />
)
}
}
License
MIT © bamtak