TeX Environment / TeX Distribution
Overview
TeX64 calls command-line tools like latexmk, lualatex, and latexindent to compile your documents. A TeX distribution must be pre-installed on your system.
Why TeX Distribution is Needed
TeX64 does not bundle its own LaTeX engine. It invokes system commands on your Mac. Without a TeX distribution, compilation is impossible.
- TeX64 depends on external TeX tools (latexmk, lualatex, synctex)
- Installing a TeX distribution is a prerequisite
- Without a distribution, TeX64 will show compilation errors
Options
MacTeX (Recommended)
- Size: ~4GB
- URL: https://www.tug.org/mactex/
- Installation: Download .pkg and run installer
- Includes: Everything (latexmk, lualatex, latexindent, synctex, all packages)
- For Japanese Users: Includes CJK packages by default
- Best for: Beginners, users who want zero configuration
BasicTeX (Minimal Install)
- Size: ~100MB
- URL: https://www.tug.org/mactex/morepackages.html
- After Install: Add missing packages manually with tlmgr
- Best for: Experienced users who want minimal disk usage
TeX Live (Manual)
- Manage TeX Live directly outside MacTeX
- For Homebrew users: brew install texlive
Installation Verification
Open Terminal and run these commands to verify all tools are found:
which lualatex which latexmk which latexindent which synctex
All should return paths. If any return nothing, the tool is not installed or not in PATH.
In TeX64: Settings > Runtime tab shows green/red status for each tool.
Package Management (tlmgr)
- Update package manager:
sudo tlmgr update --self - Update all packages:
sudo tlmgr update --all - Install package:
sudo tlmgr install <package> - Search packages:
sudo tlmgr search --global --file <filename>
PATH Configuration
- MacTeX automatically adds /Library/TeX/texbin
- Homebrew uses /opt/homebrew/bin
- If PATH not set: add export PATH="/Library/TeX/texbin:$PATH" to ~/.zshrc
- Restart Terminal and TeX64 after PATH changes
Japanese LaTeX Setup
- MacTeX: Includes CJK packages by default
- BasicTeX: Install Japanese packages separately:
sudo tlmgr install collection-langjapanese - Use lualatexja package with lualatex
- Add \usepackage{luatexja} to your .tex file
Common Issues
latexmk not found
Install MacTeX or run sudo tlmgr install latexmk
Missing .sty
Run sudo tlmgr install <package>
PATH issues
Add to shell profile
Permission denied
Use sudo
If you have questions or need support, visit the support page.