Mathetix is an intelligent bridge between visual mathematics and digital typesetting. It transforms handwritten or printed equations into precision LaTeX code, enhanced by AI-powered context and explanations. Built with a premium glassmorphism UI, it leverages Deep Learning (pix2tex) for OCR and Local AI (qwen2.5-coder) for semantic understanding.
- Image to LaTeX Conversion: Drag and drop images to instantly generate LaTeX code.
- AI Explanations: Uses a local LLM to provide brief, contextual explanations of the formulas.
- Mixed Content Parsing: Properly renders mathematical notation within the AI descriptions.
- History System: Automatically saves all conversions to a local SQLite database for easy retrieval.
- Premium UI: Dark mode, smooth animations, and responsive design.
- Python: 3.9+
- Node.js: 18+
- Ollama: Installed and running locally.
- Model:
pix2tex(automatically installed via pip) andqwen2.5-coder:7b(via Ollama).
- Navigate to the backend directory:
cd backend - Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate - Install dependencies:
pip install -r requirements.txt
- Start the server:
The backend will run on
python app.py
http://127.0.0.1:5000.
- Navigate to the frontend directory:
cd frontend - Install dependencies:
npm install
- Start the development server:
The application will be available at
npm run dev
http://localhost:5173.
Ensure Ollama is running and the model is pulled:
ollama serve
ollama pull qwen2.5-coder:7bThe application provides:
- Rendered LaTeX: Visual representation of the formula.
- Raw Code: Copy-pasteable LaTeX string.
- Explanation: Natural language description of what the formula represents.
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
