Skip to content

bamtak/react-math-renderer

Repository files navigation

math-renderer

React component to render latex strings, based on Katex

NPM JavaScript Style Guide

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published