react-ipynb-renderer-katex
TypeScript icon, indicating that this package has built-in type declarations

2.2.1 • Public • Published

NPM NPM e2e workflow

image

solarizedl and duotone forest themes monokai and xonokai themes
solarizedl with duotone_earth monokai with xonokai

This component draws an ipynb file in Jupyter Notebook. You can use MathJax or Katex to render math expressions; install react-ipynb-renderer if you use MathJax, or react-ipynb-renderer-katex if you use Katex.

If you are not particular, we recommend react-ipynb-renderer.

Demo

Install

$ npm install --save react-ipynb-renderer

or

$ npm install --save react-ipynb-renderer-katex

Usage

Just pass an ipynb json object to IpynbRenderer component.

Code example

Using react-ipynb-renderer

import { IpynbRenderer } from "react-ipynb-renderer";

// Jupyter theme
import "react-ipynb-renderer/dist/styles/monokai.css";
// import ipynb file as json
import ipynb from "./test.ipynb";

export const Component = () => {
  return (
    <IpynbRenderer
      ipynb={ipynb}
    />
  );
};

Using react-ipynb-renderer-katex

import { IpynbRenderer } from "react-ipynb-renderer-katex";

// Formula renderer for katex
import 'katex/dist/katex.min.css';

// Jupyter theme
import "react-ipynb-renderer-katex/dist/styles/monokai.css";
// import ipynb file as json
import ipynb from "./test.ipynb";

export const Component = () => {
  return (
    <IpynbRenderer
      ipynb={ipynb}
    />
  );
};

Links

Package Sidebar

Install

npm i react-ipynb-renderer-katex

Weekly Downloads

83

Version

2.2.1

License

Apache-2.0

Unpacked Size

2.51 MB

Total Files

18

Last publish

Collaborators

  • righ