Skip to content

mbianchidev/latex-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

55 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

LaTeX Editor

License: MIT PRs Welcome Code of Conduct

A free, open source LaTeX editor with real-time preview capabilities. Think Overleaf, but without compilation limits, completely free, and self-hostable.

✨ Features

  • Real-time Preview: See your LaTeX document rendered as you type (optional auto-compile)
  • No Compilation Limits: Compile as many documents as you want, whenever you want
  • Multi-file Projects: Upload ZIP files with multiple .tex files, images, and fonts
  • Syntax Highlighting: Full LaTeX syntax highlighting for easier editing
  • File Management: Add, rename, and delete files directly in the browser
  • Free & Open Source: No paywalls, no subscriptions, no restrictions
  • Self-Hostable: Run it locally with Docker or deploy to your own server
  • Client-side Processing: All processing happens in your browser

πŸš€ Quick Start

Using Docker (Recommended)

# Clone the repository
git clone https://github.com/mbianchidev/latex-editor.git
cd latex-editor

# Start with Docker Compose
docker compose up -d

# Open http://localhost in your browser

Manual Setup

# Serve the frontend folder with any static server
cd frontend
python3 -m http.server 8080
# Open http://localhost:8080

πŸ“– User Guide

Interface Overview

Panel Description
Header Bar New document, upload ZIP, download .tex/.zip/PDF buttons
File Tree (left) Shown when a ZIP project is loaded - manage files here
Editor (center-left) Write your LaTeX code with syntax highlighting
Preview (right) Live rendered preview of your document
Status Bar Compilation status and cursor position

Keyboard Shortcuts

Shortcut Action
Ctrl+Enter Compile document
Tab Insert 2 spaces

Working with Projects

  1. Upload a ZIP file containing your LaTeX project
  2. Files starting with ._ or in __MACOSX folders are automatically filtered
  3. Use the file tree to navigate between files
  4. Right-click files for rename/delete options
  5. The main .tex file is auto-detected (or set manually)

Auto-Compile Toggle

The "Auto" checkbox controls automatic compilation:

  • Off (default): Manual compile only - click β–Ά or press Ctrl+Enter
  • On: Auto-compile 3 seconds after you stop typing

πŸ“ LaTeX Examples

Basic Document

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\title{My Document}
\author{Your Name}
\date{\today}

\begin{document}
\maketitle

\section{Introduction}
Your content here.

\end{document}

Mathematical Equations

\begin{equation}
    E = mc^2
\end{equation}

\begin{equation}
    \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
\end{equation}

Lists

\begin{itemize}
    \item First item
    \item Second item
    \begin{itemize}
        \item Nested item
    \end{itemize}
\end{itemize}

πŸ› οΈ Technology Stack

  • Frontend: HTML5, CSS3, Vanilla JavaScript (ES6+)
  • Libraries: MathJax 3, jsPDF, html2canvas, JSZip
  • Backend: Python/Flask (for health checks only)
  • Container: Docker with nginx

πŸ“ Project Structure

latex-editor/
β”œβ”€β”€ frontend/           # Main application
β”‚   β”œβ”€β”€ index.html      # HTML structure
β”‚   β”œβ”€β”€ styles.css      # Design system
β”‚   β”œβ”€β”€ app.js          # Application logic
β”‚   └── nginx.conf      # Web server config
β”œβ”€β”€ backend/            # Health check API
β”œβ”€β”€ docker-compose.yml  # Container orchestration
β”œβ”€β”€ CONTRIBUTING.md     # Contribution guidelines
└── README.md           # This file

🀝 Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

Quick start for contributors:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

πŸ“„ License

MIT License - see LICENSE for details.

πŸ”’ Security

Found a vulnerability? See SECURITY.md for reporting guidelines.

πŸ’¬ Support

Need help? Check SUPPORT.md for resources.

About

A LaTex editor with a preview (OverLeaf but open source and no compilation limits)

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors