Most LuaLaTeX material online was written between 2010 and 2015. Package names drift, defaults change, and a newcomer following those tutorials will spend the first evening fighting inputenc errors instead of writing linguistics. This kit is a small, opinionated starting point for anyone — in particular, students of computational linguistics working with Romance languages (French, Spanish, Italian, Portuguese, Romanian) and IPA.
Everything here assumes a current TeX Live installation and LuaLaTeX as the engine. The six source files below mirror six jobs: understand the engine, keep a reference, start a document, and borrow from three worked examples (Romance languages, corpus statistics, Praat alignment).

Why LuaLaTeX in the first place; what to use instead of the old pdfLaTeX packages (fontspec replaces fontenc, polyglossia replaces babel, tipauni replaces tipa); how to build a safe modern preamble; two-pass compilation; font-cache troubleshooting on Linux and macOS. Also lists learning resources that are actually current.
A compact cheat-sheet covering the symbols a comp-ling student actually needs week to week: common math & statistics notation, IPA via tipauni, interlinear glosses via gb4e, syntax trees via forest, multilingual snippets via polyglossia. Each section is short enough to scan while debugging.
A minimal, heavily commented starter document — safe 2026 preamble plus one example of each major
building block (formula, gloss, IPA, tree, multilingual text). The bibliography block is commented out so
it compiles the first time, with no missing .bib errors. Rename it and begin.
A worked example that leans into Romance-language quirks: direct Unicode for é, ñ, ã, ș; IPA for French pain, Portuguese são, Spanish perro; interlinear glosses for French and Spanish; a forest phrase-structure tree; a dependency-parsing table styled for NLP output; and a short listings snippet calling spaCy on Spanish text. Useful as a reference when a feature works in theory but you want to see the LaTeX for it.
Publication-ready statistical output in pure LaTeX. Decimal-aligned tables with siunitx, properly italicized p-values, scientific notation; a vector-based Zipf's-law plot with pgfplots; and a short note on reading data from a CSV with pgfplotstable. No Python screenshots in your thesis.
The modern phonetician's publishing pipeline: export a spectrogram
from Praat as a PDF, embed it with graphicx, and draw
phoneme, word, and gloss tiers over it with TikZ. Includes a
reusable \phonbox macro and the time-to-coordinate
scaling formula so your TikZ boxes line up with the acoustic
events in the image.
The focused install below covers 99 % of linguistics needs and is kinder to your disk than the full distribution:
sudo apt update
sudo apt install texlive-latex-recommended texlive-latex-extra \
texlive-lang-european texlive-fonts-extra \
texlive-science texlive-luatex latexmk
If you would rather not worry about missing packages ever, install the full distribution instead (5–8 GB):
sudo apt install texlive-full
From the folder containing the kit's files:
latexmk -lualatex cs-starter.tex
A successful run ends with a line like Latexmk: All targets (cs-starter.pdf) are up-to-date and
leaves a cs-starter.pdf next to the .tex file. If you cloned the repo, the included
.latexmkrc means you can even drop the -lualatex flag — just
latexmk cs-starter.tex works.
sudo apt install texstudio
Then open Options → Configure TeXstudio → Build and change the default compiler to LuaLaTeX.
For IPA and Romance special characters, Charis SIL and Doulos SIL are
excellent and free. Download the .ttf files, then:
mkdir -p ~/.local/share/fonts
cp *.ttf ~/.local/share/fonts/
fc-cache -fv
LuaLaTeX will find them the next time you compile. On macOS the equivalent one-off command is
luaotfload-tool --update (without sudo). Then uncomment this line in any template:
\setmainfont{Charis SIL}
Last verified 2026-11-01 on:
TeX Live 2026
LuaLaTeX 1.18.x
latexmk 4.85x
Ubuntu 24.04 LTS / macOS Tahoe 26.6.2
Editor: TeXstudio 6.0.2 (Linux) / Texmaker 6.0.2 (macOS)
Substantially older or newer versions will almost certainly still work; the exact wording of error messages may differ from the troubleshooting table in modern-lualatex-guide.tex.
\noautomath immediately after \usepackage{gb4e}. Without it, any example
containing a subscript or superscript will crash with a parameter-stack error. This is the #1 reason linguistics
students give up on LaTeX. Every template in this repo already does it.
latexmk -lualatex -pdf your-document.tex handles the whole sequence and stops when nothing changes.
It ships with every modern TeX Live.
inputenc, fontenc, textcomp and tipa.
Under LuaLaTeX these are at best unneeded and at worst broken. Use fontspec, polyglossia
and tipauni instead.
LuaLaTeX embeds the Lua programming language, and you can write loops, read CSV files, and compute
directly inside your .tex source with \directlua. However, as a computational
linguist, your real data processing almost certainly belongs in Python or R — not inside the typesetting
engine. One tiny example is included below so you understand the bridge exists; this kit deliberately does
not teach Lua programming.
\directlua{
local words = {"chat", "chien", "maison"}
tex.sprint("Corpus contains " .. #words .. " items.")
}
When compiled, this prints "Corpus contains 3 items." in the body of the PDF. For anything
substantial, process your data in Python or R, write the result to a .csv or .tex
fragment, and let LaTeX \input that file — a cleaner division of labour than embedding complex
logic in your document, and it keeps your analysis reproducible with the tools your discipline already uses.
This kit was motivated by Manuel Pégourié-Gonnard's A Guide to LuaLaTeX (2010), one of the earliest practical introductions to LuaLaTeX for newcomers. The 2026 landscape is very different — many of the packages he described are no longer current — but the effort behind the original guide deserves acknowledgement. See CREDITS.md.
Feedback and suggestions are welcome via the repo's issue tracker.