Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-latex-patched

zzish430MIT1.1.1

React component to render latex strings

react, latex, zzish, component, react-component, react-ui

readme

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.8.3/katex.min.css" rel="stylesheet">
    </head>
</html>

License

MIT © Zzish

changelog

CHANGELOG

1.1.0

  • Updated dependencies to React 16
  • KaTeX updated to 0.8.2

1.0.0

  • KaTeX updated to 0.7.1
  • Minimum version of React bumped to 15.3.0
  • Fixed displayMode not being sent properly to Katex

0.1.1

  • Fix gulp nsp

0.1.0

  • Added support for Katex displayMode (Thanks to @mathisonian)