April 14, 2026

To write LaTeX documents locally, you need a TeX distribution (the compiler and packages) and an editor. This guide covers installation on Windows, macOS, and Linux, plus the online alternative if you want to skip installation entirely.
If you don't want to install anything, use Overleaf. It's a free online LaTeX editor that runs entirely in your browser. No installation, no configuration, no package management — just sign up and start writing.
Overleaf is the most popular choice for students and researchers because it handles compilation, package installation, and collaboration automatically. The free tier is sufficient for most individual projects.
Underleaf adds AI-powered tools on top of your LaTeX workflow — convert images to LaTeX, generate equations, find citations, and get an AI copilot directly in Overleaf via our Chrome extension.
Try Underleaf FreeA local installation gives you offline access, faster compilation for large projects, and full control over packages and configuration. You need two things:
TeX Live is the standard, comprehensive TeX distribution. It includes everything you need:
install-tl-windows.exeMiKTeX is a Windows-focused distribution that installs packages on demand — it starts smaller and downloads packages as you need them:
MacTeX is the standard distribution for macOS. It's a pre-packaged version of TeX Live with Mac-specific extras:
Alternatively, install via Homebrew: brew install --cask mactex
TeX Live is available through your distribution's package manager:
# Ubuntu / Debian
sudo apt install texlive-full
# Fedora
sudo dnf install texlive-scheme-full
# Arch Linux
sudo pacman -S texliveThe texlive-full package installs everything (about 5 GB). For a smaller installation, use texlive-base and install additional packages as needed with tlmgr install.
Any text editor works for LaTeX, but editors with LaTeX support offer syntax highlighting, one-click compilation, and PDF preview:
| Editor | Platform | Notes |
|---|---|---|
| VS Code + LaTeX Workshop | All | Most popular. Excellent extension with auto-compile, PDF preview, and IntelliSense |
| TeXstudio | All | Purpose-built for LaTeX. Built-in PDF viewer, autocomplete, and structure view |
| TeXShop | macOS | Included with MacTeX. Lightweight and reliable |
| TeXworks | All | Included with TeX Live. Minimal and straightforward |
| Vim/Neovim + VimTeX | All | For Vim users. Fast editing with LaTeX-specific motions |
After installing, verify everything works by creating a test file:
% test.tex
\documentclass{article}
\begin{document}
Hello, LaTeX! The quadratic formula is $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$.
\end{document}Compile it from the command line:
pdflatex test.texIf you get a test.pdf with formatted text and a rendered equation, your installation is working correctly.
LaTeX packages add functionality beyond the base distribution. If you get a "File not found" error for a package:
tlmgr install package-name in your terminalNow that LaTeX is installed, learn the basics with our LaTeX for Beginners guide, or check out the LaTeX Cheat Sheet for a quick command reference.
Read LaTeX for BeginnersEmpowering students and researchers with AI-powered tools for academic writing.
Go to appContact us© 2026 Underleaf. All rights reserved.