0.0.9 • Published 6 years ago

react-katex-component v0.0.9

Weekly downloads
21
License
MIT
Repository
-
Last release
6 years ago

React-Katex-Component

This is a react component which can be used to render maths equations on the screen. It uses Khan Academy's Katex to generate the html.

Installing

You can install it with npm:

npm install react-katex-component

When using within a react project you need to add the Katex CSS file within your index.html file. The required cdn tag is as follows:

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0/katex.min.css" integrity="sha384-TEMocfGvRuD1rIAacqrknm5BQZ7W7uWitoih+jMNFXQIbNl16bO8OZmylH/Vi/Ei" crossorigin="anonymous">

Usage

Once the package has been installed it can be used as follows:

import React, {Component} from 'react';
import KatexComponent from 'react-katex-component';

export default class Test extends Component {

    render() {
        return <KatexComponent data={"YOUR KATEX STRING"} />;
    }
}
0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago