Working locally with MacTeX and TeXstudio is faster, more reliable, and more private than cloud-based editors. Here is how to get set up from scratch on macOS.
Step 1 — Download and Install MacTeX 2026
- Go to https://www.tug.org/mactex/ and download the MacTeX.pkg installer (~5 GB — it includes the full TeX Live distribution plus GUI apps).
- Open the downloaded
.pkgfile and follow the installer prompts. MacTeX installs to/usr/local/texlive/2026/. - After installation, open Terminal and verify:You should see output like
pdflatex --versionpdfTeX 3.141592653-....
Tip: If you only need a minimal install, download BasicTeX instead (~100 MB) and add packages on demand via
tlmgr.
Step 2 — Install TeXstudio
- Download the latest release from https://www.texstudio.org/.
- Move the
.appto your/Applicationsfolder. - On first launch, TeXstudio auto-detects your MacTeX installation. You can verify under:
Preferences → Build → Default Compiler — set to
pdfLaTeX(orLuaLaTeXfor Unicode/font-heavy documents).
Step 3 — Configure the Build System
In TeXstudio → Preferences → Build:
| Setting | Recommended Value |
|---|---|
| Default Compiler | pdfLaTeX |
| Default Bibliography Tool | Bibtex or Biber |
| PDF Viewer | Internal (built-in viewer with forward/inverse search) |
| Build & View shortcut | F5 |
For IEEE/journal papers using biblatex, switch the bibliography tool to Biber.
Step 4 — Enable SyncTeX (Forward/Inverse Search)
SyncTeX lets you jump from your .tex source to the exact location in the PDF and vice versa.
- Forward search (source → PDF): Press
F5or click the green play button. - Inverse search (PDF → source): Hold
Cmdand click anywhere in the internal PDF viewer — it jumps to the corresponding source line.
This is already enabled by default when using the internal PDF viewer.
Step 5 — Connect Mendeley for BibTeX References
- In Mendeley Desktop/Reference Manager, go to Tools → Options → BibTeX (Desktop) or Export (web app).
- Enable Sync BibTeX library and point it to a
.bibfile in your project folder (e.g.,references.bib). - In your
.texfile, add:TeXstudio will auto-complete citation keys as you type\bibliography{references}\cite{}.
Alternative: Export a
.bibfile manually from Mendeley via File → Export and place it in your project directory.
Step 6 — Keeping MacTeX Up to Date
MacTeX bundles TeX Live’s package manager tlmgr. To update all installed packages:
sudo tlmgr update --self --all
To install a missing package (e.g., algorithm2e):
sudo tlmgr install algorithm2e
Useful TeXstudio Shortcuts
| Action | Shortcut |
|---|---|
| Build & View (compile + open PDF) | F5 |
| Compile only | F6 |
| Show/hide structure panel | F4 |
| Comment/uncomment selection | Cmd + T |
| Find & replace | Cmd + H |
| Auto-complete | Ctrl + Space |