Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zzish/react-latex

React component to render Latex strings
https://github.com/zzish/react-latex

Last synced: about 1 month ago
JSON representation

React component to render Latex strings

Awesome Lists containing this project

README

        

# react-latex [![NPM version][npm-image]][npm-url]

> React component to render latex strings, based on [Katex](https://github.com/Khan/KaTeX)

## Install

```sh
$ npm install --save react-latex
```

## Usage

In javascript

### Before using Latex

Include in your html Katex CSS

```html



```

### Inline Latex

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

...
render(){
return (


What is $(3\times 4) \div (5-3)$


);
}
...
```

### Block Latex

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

...
render(){
return (


$$(3\times 4) \div (5-3)$$


);
}
...
```

### Options for Katex

A number of options are now supported. For a comprehensive list please visit: [here](https://katex.org/docs/options.html)

## License

MIT © [Zzish](http://www.zzish.com)

[npm-image]: https://badge.fury.io/js/react-latex.svg
[npm-url]: https://npmjs.org/package/react-latex
[travis-image]: https://travis-ci.org/zzish/react-latex.svg?branch=master
[travis-url]: https://travis-ci.org/zzish/react-latex
[daviddm-image]: https://david-dm.org/zzish/react-latex.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/zzish/react-latex