Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-latex

Package Overview
Dependencies
Maintainers
8
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-latex

React component to render latex strings

  • 1.5.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.1K
decreased by-12.44%
Maintainers
8
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 22 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc