TeX Environment / TeX Distribution

Overview

TeX64 calls command-line tools like latexmk, lualatex, and latexindent to compile your documents. Use an existing TeX distribution or approve TeX64 to download and install managed TeX Live.

Why TeX Distribution is Needed

TeX64 does not bundle a LaTeX engine inside the app package. It invokes TeX commands from an existing or app-managed distribution on your device. Without a TeX distribution, compilation is unavailable.

  • 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)

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 > Environment shows green/red status for each tool.

Windows 10/11 setup

On Windows x64, choose one TeX environment. TeX64 can use a managed TeX Live install, a normal TeX Live install, or MiKTeX.

Managed TeX Live

  • Open TeX64 > Settings > Environment and choose the managed TeX Live install action.
  • Review and approve the download. A full TeX Live installation needs several GB of free disk space and can take time.
  • Keep TeX64 open until setup completes. The distribution is stored in an app-managed folder and is detected automatically.

TeX Live (manual)

  • Download the official Windows installer from TeX Users Group and run it.
  • For the fewest missing-package errors, choose the full scheme if you have several GB available.
  • Make sure C:\texlive\<year>\bin\windows is on PATH, then fully quit and reopen TeX64.
  • https://www.tug.org/texlive/acquire-netinstall.html

MiKTeX

  • Install MiKTeX, then use MiKTeX Console to apply updates and install missing packages.
  • Enable on-the-fly package installation if you want MiKTeX to resolve missing .sty files during builds.
  • Confirm the MiKTeX bin directory is on PATH and that lualatex, latexmk, and synctex are available.
  • https://miktex.org/download

Verify from PowerShell

Run these commands in a new PowerShell window, then check Settings > Environment in TeX64:

Get-Command lualatex
Get-Command latexmk
Get-Command latexindent
Get-Command synctex

If a command is not found, fix PATH in Windows Settings > System > About > Advanced system settings > Environment Variables, then fully quit and reopen both PowerShell and TeX64.

Windows troubleshooting

  • TeX Live: verify the PATH year matches the installed folder and ends in \bin\windows.
  • MiKTeX: open MiKTeX Console, update packages, and install latexmk or the missing package named in the build log.
  • Managed install: confirm a stable connection and several GB of free space, retry from Settings > Environment, and include the build/setup log when contacting support.

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.