node package manager
Loosely couple your services. Use Orgs to version and reuse your code. Create a free org »

react-latex

react-latex NPM versionDependency StatusBuild Status

React component to render latex strings, based on Katex

Install

$ npm install --save react-latex

Usage

In javascript

var Latex = require('react-latex');
 
...
    render(){
        return (
            <h3>
                <Latex>What is $(3\times 4) \div (5-3)$</Latex>
            </h3>
        );
    }
...

Include in your html Katex CSS

 
<html>
    <head>
        <link href="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.css" rel="stylesheet">
    </head>
</html>
 

License

MIT © Zzish