Skip to main content
Use linguex or gb4e for numbered examples and aligned glosses, \usepackage[linguistics]{forest} for syntax trees, and fontspec with Charis SIL for Unicode IPA under XeLaTeX or LuaLaTeX (or tipa under pdfLaTeX).

Numbered examples and glosses with linguex

linguex uses compact macro syntax: start an example with \ex., add sub-examples with \a. and \b., start a two-line word-aligned gloss with \exg., and terminate each example with a blank line. With the default linguex cross-reference format, \ref{ex:label} already includes parentheses.
linguex-glosses.tex
Ready to use this syntax? Continue in the browser editor when you want to adapt the example in a real project.Open LaTeX Cloud Studio

Multi-tier glosses with gb4e

Use gb4e when you prefer explicit environments (exe, xlist) or need three-line glosses (\glll) alongside two-line glosses (\gll) and free translations (\glt). By default, gb4e activates _ and ^ outside math mode, which can break TikZ, forest, and other packages; either load gb4e last in your preamble or call \noautomath immediately after \usepackage{gb4e}. Do not load linguex and gb4e in the same document—both define \ex and conflict.
gb4e-glosses.tex

Syntax trees with forest

Load \usepackage[linguistics]{forest} to draw phrase-structure trees from nested bracket notation ([Parent [Child1] [Child2]]). The [linguistics] option adds roof for phrase triangles—attach roof to the child text node ([the student, roof]) under DP—and because forest builds on TikZ, you can name nodes (name=wh, name=trace) and draw movement arrows directly underneath the tree.
forest-syntax-tree.tex

Phonetic transcription (IPA)

Unicode IPA with XeLaTeX or LuaLaTeX

For new linguistics papers, compile with XeLaTeX (or LuaLaTeX) using fontspec and an IPA-complete Unicode font such as Charis SIL or Doulos SIL. You can type Unicode IPA symbols, diacritics, and length marks directly in your .tex file without escape codes.
ipa-xelatex.tex

ASCII shorthand IPA with tipa (pdfLaTeX)

When a journal template requires pdfLaTeX, load \usepackage{tipa} and wrap phonetic transcriptions in \textipa{...}. Passing the [tone] option enables \tone{...} for Chao tone letters (such as \tone{55} and \tone{214}).
ipa-tipa.tex

Phonological rules and Optimality Theory tableaux

This example uses amsmath for the rule, standard tabular for the Optimality Theory (OT) tableau, and pifont for the winning-candidate marker (\ding{43}).
phonology-ot-tableau.tex

Common Leipzig glossing abbreviations

Format grammatical category labels in small caps with \textsc{...} (for example \textsc{3sg.pst}):

Common mistakes

  • Loading gb4e before tikz or forest without \noautomath: Because gb4e changes the category codes for _ and ^, loading it before tikz or forest can fail with TeX capacity exceeded. Load gb4e last in your preamble or write \noautomath right after \usepackage{gb4e}.
  • Loading linguex and gb4e together: Both packages define \ex, and loading them together can break example parsing. Choose one per document.
  • Forgetting the blank line after \ex. in linguex: linguex uses a blank line (\par) to close each example. Also write \ref{ex:id} instead of (\ref{ex:id}) to avoid double parentheses like ((1)).
  • Calling \tone{...} without [tone] in tipa: The [tone] option loads TIPA’s tone.sty support file, which defines \tone.
  • Putting roof on the category node in forest: Putting roof on DP applies it to the edge from DP to its parent, if it has one. Attach roof to the terminal phrase instead: [DP [the student, roof]].

In LaTeX Cloud Studio

LaTeX Cloud Studio compiles with TeX Live 2026 (full distribution), which includes linguex, gb4e, forest, tipa, pifont, and the Unicode IPA fonts Charis SIL and Doulos SIL. The linguex, gb4e, forest, tipa, and OT tableau examples compile under PDFLaTeX; for the Unicode IPA example (fontspec + Charis SIL), select XeLaTeX (or LuaLaTeX) under Settings -> General -> LaTeX Engine (default Auto (Recommended)), and your explicit choice is kept. If your fieldwork or publisher requires another Unicode phonetic font, upload its .ttf or .otf files into your project and load them with fontspec. Ready to draft a linguistics paper in the browser? Start from the Basic Article template in LaTeX Cloud Studio and replace main.tex with whichever complete example above fits your paper.