react-mathjax
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/react-mathjax package

1.0.1 • Public • Published

react-mathjax

NPM version

React component to display math formulas.

Installation

$ npm i react-mathjax --save

Usage

const MathJax = require('react-mathjax')
const tex = `f(x) = \\int_{-\\infty}^\\infty
    \\hat f(\\xi)\\,e^{2 \\pi i \\xi x}
    \\,d\\xi`
 
module.exports = () => {
    return (
        <MathJax.Provider>
            <div>
                This is an inline math formula: <MathJax.Node inline formula={'a = b'} />
                And a block one:
 
                <MathJax.Node formula={tex} />
            </div>
        </MathJax.Provider>
    );
}

Dependents (10)

Package Sidebar

Install

npm i react-mathjax

Weekly Downloads

6,409

Version

1.0.1

License

Apache-2.0

Unpacked Size

1.05 MB

Total Files

21

Last publish

Collaborators

  • samypesse