vpg-react-mathjax

0.1.4 • Public • Published

react-mathjax

NPM version

React component to display math formulas.

Installation

$ npm i react-mathjax --save
# yarn
$ yarn add react-mathjax

Usage

import * as MathJax from 'react-mathjax'

const tex = `f(x) = \\int_{-\\infty}^\\infty
    \\hat f(\\xi)\\,e^{2 \\pi i \\xi x}
    \\,d\\xi`

export default = () => (
    <MathJax.Context>
        <div>
            This is an inline math formula: <MathJax.Node inline>{'a = b'}</MathJax.Node>
            And a block one:

            <MathJax.Node>{tex}</MathJax.Node>
        </div>
    </MathJax.Context>
)

Readme

Keywords

Package Sidebar

Install

npm i vpg-react-mathjax

Weekly Downloads

1

Version

0.1.4

License

Apache-2.0

Last publish

Collaborators

  • ikkibower