All Projects → harunurhan → react-latex-next

harunurhan / react-latex-next

Licence: other
Render LaTeX in React apps

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to react-latex-next

Qilin App
Fully hackable text editor developed for exact sciences with built-in KaTeX and AsciiMath support. Extensible via plugins and themes. Exportable as HTML, PDF and GFM.
Stars: ✭ 336 (+1766.67%)
Mutual labels:  latex, katex
Franklin.jl
(yet another) static site generator. Simple, customisable, fast, maths with KaTeX, code evaluation, optional pre-rendering, in Julia.
Stars: ✭ 413 (+2194.44%)
Mutual labels:  latex, katex
pseudocode.js
Beautiful pseudocode for the Web
Stars: ✭ 132 (+633.33%)
Mutual labels:  latex, katex
purple-pi
💜 LaTeX math wherever you want
Stars: ✭ 31 (+72.22%)
Mutual labels:  latex, katex
Remark Math
remark and rehype plugins to support math
Stars: ✭ 129 (+616.67%)
Mutual labels:  latex, katex
Mdmath
LaTeX Math for Markdown inside of Visual Studio Code.
Stars: ✭ 675 (+3650%)
Mutual labels:  latex, katex
React Katex
Display math in TeX with KaTeX and ReactJS
Stars: ✭ 345 (+1816.67%)
Mutual labels:  latex, katex
Jekyll Spaceship
🚀 A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
Stars: ✭ 196 (+988.89%)
Mutual labels:  latex, katex
Spmathkit
Render math exercises for your view. Contains the rendering of mathematical formulas and mathematical graphics, as well as the general text
Stars: ✭ 81 (+350%)
Mutual labels:  latex, katex
Jekyll Katex
Jekyll plugin for easy server-side math rendering via KaTeX
Stars: ✭ 73 (+305.56%)
Mutual labels:  latex, katex
Flutter tex
A Flutter Package to render Mathematics, Physics and Chemistry Equations based on LaTeX
Stars: ✭ 161 (+794.44%)
Mutual labels:  latex, katex
Katex
Fast math typesetting for the web.
Stars: ✭ 14,623 (+81138.89%)
Mutual labels:  latex, katex
react-native-katex
React Native KaTeX
Stars: ✭ 28 (+55.56%)
Mutual labels:  katex
LaTeX-OCR
pix2tex: Using a ViT to convert images of equations into LaTeX code.
Stars: ✭ 1,566 (+8600%)
Mutual labels:  latex
asciidoctor-katex
Asciidoctor extension for converting latexmath using KaTeX at build time
Stars: ✭ 16 (-11.11%)
Mutual labels:  katex
showdown-katex
Math typesetting for showdown
Stars: ✭ 32 (+77.78%)
Mutual labels:  katex
phplatex
Inline TeX in PHP pages
Stars: ✭ 34 (+88.89%)
Mutual labels:  latex
latex-cefetmg
Modelo de trabalho acadêmico utilizando LaTeX baseado nas normas da ABNT para o CEFET-MG.
Stars: ✭ 24 (+33.33%)
Mutual labels:  latex
augmath
Interactive Computer Algebra System. Augmenting how we *do* mathematics using computers
Stars: ✭ 41 (+127.78%)
Mutual labels:  katex
vscode-markdown-editor
A vscode extension to make your vscode become a full-featured WYSIWYG markdown editor
Stars: ✭ 249 (+1283.33%)
Mutual labels:  katex

react-latex-next

Render LaTeX beautifully in React apps!

NPM JavaScript Style Guide

It renders all fragments of LaTeX (between delimiters) in a given text, similar to KaTeX's auto-render.

See the demo.

Install

yarn add react-latex-next

npm install --save react-latex-next

Usage

import 'katex/dist/katex.min.css'
import Latex from 'react-latex-next'

function Example() {
  return (
    <Latex>We give illustrations for the three processes $e^+e^-$, gluon-gluon and $\\gamma\\gamma \\to W t\\bar b$.</Latex>
  )
}

delimiters

List of delimiters to look for math you can configure it via delimiters prop: <Latex delimiters={[...]}>

A delimiter

{
  left: "A string which starts the math expression (i.e. the left delimiter)"
  right: "A string which ends the math expression (i.e. the right delimiter)"
  display: "A boolean of whether the math in the expression should be rendered in display mode or not"
}

Default delimiters

[
  { left: '$$', right: '$$', display: true },
  { left: '\\(', right: '\\)', display: false },
  { left: '$', right: '$', display: false },
  { left: '\\[', right: '\\]', display: true },
]

strict

It renders by default non-strict which means it falls back to raw text (without delimiters) in case of error. You can enable strict mode like below, which will throw the error instead.

<Latex strict>{textWithSomeBrokenLatex}</Latex>

License

MIT © harunurhan

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].