Linguistics has its own typesetting needs, and LaTeX covers them — numbered examples with interlinear glosses (gb4e), IPA transcription (tipa), syntax trees (forest), and attribute-value matrices (avm). This page surveys the core packages.
Numbered examples & glosses — gb4e
gb4e numbers linguistic examples and sets interlinear glosses (the source aligned with a word-by-word gloss). Inside an exe environment, start an example with \ex (or \ea/\z); \gll gives a two-line interlinear gloss (source plus per-word gloss, each line closed by \\), and \glt gives the free translation. Grammaticality markers (*, ?) attach to examples. Note: load gb4e last in the preamble (otherwise you may hit a stack-size error).
\usepackage{gb4e} % プリアンブルの最後に / load it last
...
\begin{exe}
\ex
\gll これ は 例 です \\
this TOP example COP \\
\glt `This is an example.'
\end{exe}Phonetic symbols — tipa
tipa (by Fukui Rei) typesets the IPA (International Phonetic Alphabet). Put symbols inside \textipa{...} (or the IPA environment) using TIPA’s shortcut encoding. It is the standard way to set phonetic transcriptions.
\usepackage{tipa}
...
\textipa{[tSi:z]} % cheese → [tʃiːz]Syntax trees — forest
forest (by Sašo Živanović), built on pgf/TikZ, draws syntax trees from bracket notation — \begin{forest} [S [NP][VP]] \end{forest}. It packs trees compactly and lets you style nodes with key-value options. The go-to for syntax trees (alternatives: tikz-qtree, qtree).
\usepackage{forest}
...
\begin{forest}
[S [NP [犬]] [VP [V [走る]]]]
\end{forest}Feature structures — avm
For the feature structures of HPSG and unification grammars, avm (Chris Manning’s avm.sty) sets attribute-value matrices — list attributes and values inside \begin{avm} … \end{avm}. A modern alternative, langsci-avm, is also in TeX Live.