boost-mathquill
React component wrapper for Mathquill
Mathquill Library에 없는 Latex 문법을 추가하여 재배포한 라이브러리
- Matrix :
\begin{pmatrix}&\\&\end{pmatrix}
- Multi Lines :
\newline
- combi :
\combi{ }
- Double Integral :
\iint
- Arrow :
\xrightarrow_{}^{}
- Additionally, many other formula symbols have been added.
Use the package manager npm to install.
npm install boost-mathquill
import React, { useState } from 'react'
import { addStyles, EditableMathField } from 'react-mathquill'
// inserts the required css to the <head> block.
// you can skip this, if you want to do that by yourself.
addStyles()
const EditableMathExample = () => {
const [latex, setLatex] = useState('\\frac{1}{\\sqrt{2}}\\cdot 2')
return (
<div>
<EditableMathField
latex={latex}
onChange={(mathField) => {
setLatex(mathField.latex())
}}
/>
<p>{latex}</p>
</div>
)
}
import React from 'react'
import { addStyles, StaticMathField } from 'react-mathquill'
// inserts the required css to the <head> block.
// you can skip this, if you want to do that by yourself.
addStyles()
const StaticMathExample = () => (
<StaticMathField>{'\\frac{1}{\\sqrt{2}}\\cdot 2'}</StaticMathField>
)