Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/zzish/react-latex
- Owner: zzish
- License: mit
- Created: 2015-07-31T16:20:05.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T18:21:43.000Z (almost 2 years ago)
- Last Synced: 2024-10-30T10:09:49.214Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 534 KB
- Stars: 177
- Watchers: 11
- Forks: 21
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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