React component to render latex strings, based on Katex
$ npm install --save react-latex
In javascript
Include in your html Katex CSS
<html>
<head>
<link
href="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0/katex.min.css"
rel="stylesheet"
/>
</head>
</html>
var Latex = require('react-latex');
...
render(){
return (
<h3>
<Latex>What is $(3\times 4) \div (5-3)$</Latex>
</h3>
);
}
...
var Latex = require('react-latex');
...
render(){
return (
<h3>
<Latex displayMode={true}>$$(3\times 4) \div (5-3)$$</Latex>
</h3>
);
}
...
A number of options are now supported. For a comprehensive list please visit: here
MIT © Zzish