LaTeX for Linguistics
by Amy Bruno, Guilherme Garcia, and Henrison Hsieh

We’ll cover packages that provide
  • (Automatic) example numbering (gb4e , linguex, expex) 
  • Glosses (gb4e , linguex , expex )
  • Syntax trees (qtree , tikz-qtree , forest, syntree, parsetree, xyling) 
  • Arrows (for movement, antecedents, etc.)
  • Semantics formulas (mathmode with amsmath, amssymb, stmaryrd)
  • IPA symbols (tipa)
  • OT Tableaux

  • LaTeX wikibook section on linguistics
  • LaTeX for linguists

Example numbering and glosses with linguex 

  • Create a new example with \ex. 

\ex. Colorless green ideas sleep furiously.

  • Important. A blank line must always come before an after an \ex.  block.
  • Create sub-examples with \a. , \b. , …

\ex. \a. Colorless green ideas sleep furiously.
\b. * Green sleep colorless ideas furiously.
  • Further nested examples are created the same way. Use \z.  to close off one nesting level and go back one. This is useful in complicated definitions:

  \a. A governs B iff
     \a. A is a governor; and
     \b. A m-commands B; and
     \c. no barrier intervenes between A and B
  \b. Governors are lexical nodes and tensed I. (Haegeman 1991)

  • Cross-references. Use \label  and \ref  to refer to example numbers without manually writing the number. This is extremely useful when you inevitably change around their ordering or add/remove examples:

\ex.\label{ex:chomsky-colorless} Colorless green ideas sleep furiously.

  \a.\label{ex:government} A governs B iff ...
  \b.\label{ex:governor} Governors are ...
Chomsky (1957) discusses example \ref{ex:chomsky-colorless} in ...

Recall Haegeman's (1991) definition of government in \ref{ex:government} ...
  • Defaults when using \ref. By default, linguex will refer to a sub-example as, for example (2-b), instead of (2b), which is more normal. To fix this, add this line to the preamble:
  • Using \ex.  in footnotes automatically starts numbering the examples with (i), (ii), … instead of (1), (2), … as is customary in theoretical journals.