Three pieces: a TeX distribution, an editor, and Git. Twenty minutes. Do it once.
All examples assume XeLaTeX as the engine. XeLaTeX reads UTF-8 source natively and loads system fonts directly — no encoding gymnastics, no font installation rituals beyond what your OS already has. LuaLaTeX also works; differences are noted where they matter.
| piece | what it is | why |
|---|---|---|
| TeX Live | the TeX distribution | contains XeLaTeX, all standard packages |
| TeXstudio | editor / IDE | Thai-aware, integrated compile, good defaults |
| Git | version control | track changes, share templates, recover mistakes |
Download the Windows installer:
mirror.ctan.org/systems/texlive/tlnet/install-tl-windows.exetlmgr install <package> from a terminal.Download from the official release:
texstudio-4.9.2-win-qt6-signed.exe (github.com/texstudio-org)Or check texstudio.org/#download for the current release.
Or current release at git-scm.com/download/win
Open a new command prompt or Git Bash and run:
xelatex --version git --version
Both should print version strings. If xelatex is not found, TeX Live may not be on your PATH — see troubleshoot/path.
MacTeX is the standard distribution for macOS — it is TeX Live packaged for the Mac. Download from:
tug.org/texlive/quickinstall.htmlOr direct: tug.org/mactex/ for the full MacTeX .pkg installer.
/usr/local/texlive/. No prefix change needed on Mac — the default location is fine.git is already installed. Run git --version to check.brew install git if you use Homebrew.Prefer the upstream installer over your distro's package manager — distro TeX Live packages are often years behind and missing Thai-specific components.
tug.org/texlive/quickinstall.htmlwget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz tar xf install-tl-unx.tar.gz cd install-tl-*/ sudo perl install-tl --scheme=medium
pkg install tex-xetex texlive-full works for most cases, or use the upstream installer for full control.sudo apt install texstudio or sudo dnf install texstudiosudo apt install git # Debian/Ubuntu sudo dnf install git # Fedora/RHEL sudo pkg install git # FreeBSD
The standard Thai font for XeLaTeX work. Must be installed system-wide so XeLaTeX can find it by name. Platform-specific steps are in fonts/.
If your document mixes Thai and English body text, TeX Gyre Pagella pairs well with THSarabunNew — similar x-height and weight, Palatino-family, included in TeX Live Medium. No download needed; just reference it by name in fontspec. Pairing notes and examples are in fonts/pairing.
% test.tex
\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{thai}
\setmainfont{TH Sarabun New}
\begin{document}
สวัสดี XeLaTeX
\end{document}
Compile with xelatex test.tex. If you see Thai text in the PDF, your install is working.