mathsy-latex-input
v1.0.1
Published
A React component for LaTeX input with MathQuill integration
Maintainers
Readme
Mathsy LaTeX Input
A LaTeX input component with on-screen keyboard for Mathsy applications.
Installation
npm install mathsy-latex-input
# or
yarn add mathsy-latex-inputUsage
import LatexInput from 'mathsy-latex-input';
function MyComponent() {
const [value, setValue] = useState('');
return (
<div>
<h1>Math Input Example</h1>
<LatexInput
onChange={(latex) => setValue(latex)}
onEnter={(latex) => console.log('Enter pressed:', latex)}
initialValue="x^2 + 2x + 1"
/>
</div>
);
}Props
onChange?: (latex: string) => void- Callback when LaTeX value changesonEnter?: (latex: string) => void- Callback when Enter key is pressedinitialValue?: string- Initial LaTeX valuetemplate?: string- Template string with placeholders for multiple inputs
Features
- On-screen keyboard with mathematical symbols
- Support for templates with multiple input fields
- Keyboard navigation
- Responsive design
- Integration with MathQuill for LaTeX editing
Development
- Clone the repository
- Install dependencies:
yarn install - Build the package:
yarn build
License
MIT
