Short answer: yes
You can use LaTeX on a Mac in three ways: install a full TeX distribution called MacTeX, install the smaller BasicTeX and add packages as you need them, or skip the install and use Overleaf in a browser. Whichever you choose, you can also pick an editor such as TeXShop, which is included with MacTeX.
Option 1: MacTeX (full distribution)
MacTeX is the standard TeX distribution for macOS. It is based on TeX Live and includes a large set of packages, the TeXShop editor, and other tools. The download is large, but you get most of what you need in one install. It is a good choice if you want everything ready and don’t mind the disk space.
Download it from tug.org/mactex and run the installer.
Option 2: BasicTeX (smaller base)
BasicTeX is a much smaller distribution that gives you the core engines and a package manager. You add the packages you need with tlmgr. It suits people who want a light install and are comfortable adding packages as they go. Some features and packages that MacTeX includes will not be there until you install them.
Option 3: Overleaf in a browser
Overleaf runs LaTeX on its servers, so you can work from any Mac with a browser. It has templates, a live preview, and sharing. It is the easiest way to start and a good backup when you are away from your own computer. It has a free plan with limits, and paid plans add features.
Install with Homebrew (optional)
If you use Homebrew, you can install either distribution from the Terminal:
brew install --cask mactex
or, for the smaller option:
brew install --cask basictex
Cask names can change, so check the Homebrew listing if one of these commands fails.
Apple Silicon and Intel Macs
Current MacTeX releases run natively on Apple Silicon Macs (M-series chips), as well as on Intel Macs. You don’t need an extra setup step to use either type of Mac. If you are unsure which type you have, check the Apple menu, then About This Mac.
Check your install
Open a new Terminal window, which picks up the updated settings, and run:
pdflatex --version
You should see a line that mentions pdfTeX. Then create a file named hello.tex:
\documentclass{article}
\begin{document}
Hello, \LaTeX!
\end{document}
Compile it from the same folder:
pdflatex hello.tex
Open hello.pdf to confirm it worked.
Editors on macOS
- TeXShop comes with MacTeX and is designed for macOS. It includes a built-in PDF viewer.
- TeXstudio and Texmaker are cross-platform editors that also run on macOS.
- VS Code with the LaTeX Workshop extension works well if you already use VS Code.
For a comparison, see which software is best for LaTeX.
Updating and adding packages
Keep the distribution current with:
sudo tlmgr update --self --all
Changes to a system-wide install usually need administrator rights, so you may be asked for your Mac password. To add a package, run sudo tlmgr install packagename. For more on packages, see how to install LaTeX packages.
Troubleshooting
pdflatex: command not foundright after installing. Open a new Terminal window. If it still fails, check that the TeX programs are in your PATH.- A document needs a package that isn’t installed. Install it with
tlmgr, as above. On a BasicTeX setup, you may need to install several packages. - Compile fails on a document that worked elsewhere. Compare the engine you use with the one the document expects, and read the first error in the log. The getting started guide covers common messages.
Next steps
- Write your first document: getting started with LaTeX
- Learn how hard the syntax is: is LaTeX difficult to learn