mathsy-latex
v1.0.0
Published
LaTeX rendering component for Mathsy applications
Downloads
3
Readme
Mathsy LaTeX
A LaTeX rendering component for Mathsy applications using KaTeX.
Installation
npm install mathsy-latex
# or
yarn add mathsy-latexUsage
import Latex from 'mathsy-latex';
function MyComponent() {
return (
<div>
<h1>Math Example</h1>
<Latex>
The quadratic formula is: $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$
</Latex>
</div>
);
}Props
children: string- The LaTeX content to renderthrowOnError?: boolean- Whether to throw an error on invalid LaTeX (default: false)
Features
- Renders LaTeX expressions using KaTeX
- Responsive design with Material-UI
- Error handling with visual feedback
- Sanitized HTML output
- Support for both inline ($) and display ($$) math
Development
- Clone the repository
- Install dependencies:
yarn install - Build the package:
yarn build
License
MIT
