Skip to content

React component to display math formulas (updated with React 15.6.1)

License

Notifications You must be signed in to change notification settings

Snikanes/react-mathjax

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-mathjax

(updated with React 15.6.1)

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.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>
    );
}

About

React component to display math formulas (updated with React 15.6.1)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 95.8%
  • HTML 3.2%
  • CSS 1.0%