TeXFix is a modern, high-end LaTeX code formatter and error fixer powered by Gemini AI. It provides a seamless environment for writing, previewing, and debugging LaTeX documents with the help of advanced AI analysis.
- AI-Powered Error Correction: Connected to the Gemini API, TeXFix examines your LaTeX code, identifies syntax errors or missing delimiters, and suggests precise fixes.
- Live Typesetting Preview: Utilizes KaTeX for instantaneous, high-performance rendering of your LaTeX source.
- Multiple View Modes:
- Split View: Edit and preview side-by-side.
- Editor View: Focus entirely on your source code.
- Preview View: See your typeset document in full glory.
- High-End "Natural Tones" UI: A sophisticated, dark-themed interface designed for focus and aesthetic pleasure, featuring custom scrollbars and a professional typography system.
- Code Repository: Load common LaTeX error examples to see the AI fixer in action.
- One-Click Application: Apply AI suggestions directly to your source code with a single click.
- Frontend: React 19, TypeScript
- Styling: Tailwind CSS 4
- Animations: Motion (formerly Framer Motion)
- Icons: Lucide React
- AI: Google Gemini API (@google/genai)
- Math Rendering: KaTeX
- Configure API Key: Ensure your
GEMINI_API_KEYis set in the Secrets panel or.envfile. - Install Dependencies:
npm install
- Run Development Server:
npm run dev
- Build for Production:
npm run build
- Paste your LaTeX code into the editor.
- Click "Analyze" to let Gemini AI scan for improvements or errors.
- Review the suggested fix in the AI Fixer overlay.
- Click "Apply Suggestion" to update your source code.
- Use the view toggles in the header to switch between different workspace layouts.
To ensure the AI features work after deploying to GitHub:
- Go to your GitHub Repository Settings.
- Navigate to Secrets and variables > Actions.
- Add a New repository secret with Name:
GEMINI_API_KEYand Value:your_api_key_here. - Go to Settings > Pages.
- Set Build and deployment > Source to
GitHub Actions. - The site will automatically deploy on your next push to
main.