2.0.0 • Published 4 years ago

react-latex v2.0.0

Weekly downloads
2,223
License
MIT
Repository
github
Last release
4 years ago

react-latex NPM version

React component to render latex strings, based on Katex

Install

$ npm install --save react-latex

Usage

In javascript

Before using Latex

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>

Inline Latex

var Latex = require('react-latex');

...
    render(){
        return (
            <h3>
                <Latex>What is $(3\times 4) \div (5-3)$</Latex>
            </h3>
        );
    }
...

Block Latex

var Latex = require('react-latex');

...
    render(){
        return (
            <h3>
                <Latex displayMode={true}>$$(3\times 4) \div (5-3)$$</Latex>
            </h3>
        );
    }
...

Options for Katex

A number of options are now supported. For a comprehensive list please visit: here

License

MIT © Zzish

2.0.0

4 years ago

1.6.0

4 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.1.1

7 years ago

0.0.8

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago

0.0.0

9 years ago