Documentation/Specialized Notation/How to Write Linguistic Trees and IPA in LaTeX
Specialized Notation

How to Write Linguistic Trees and IPA in LaTeX

Linguistics papers require specialized typesetting: syntax trees for phrase structure, IPA symbols for phonetic transcription, numbered examples with glossing, and phonological rules. LaTeX has mature packages for all of these — forest for trees, tipa or unicode for IPA, and gb4e/linguex for glossed examples. This guide covers the essential toolkit for linguistics typesetting. Bibby AI supports all major linguistics packages and renders trees instantly, making it ideal for syntax homework and research papers alike.

Draw Syntax Trees with the forest Package

Use the forest package for automatic, beautifully laid-out syntax trees with labeled nodes and movement arrows:

\documentclass{article}
\usepackage{forest}

\begin{document}

% Basic phrase structure tree
\begin{forest}
[S
    [NP
        [Det [the]]
        [N$'$
            [Adj [big]]
            [N [cat]]
        ]
    ]
    [VP
        [V [sat]]
        [PP
            [P [on]]
            [NP
                [Det [the]]
                [N [mat]]
            ]
        ]
    ]
]
\end{forest}

\bigskip

% X-bar style with movement
\begin{forest}
[CP
    [C$'$
        [C [will$_i$, name=will]]
        [TP
            [NP [John]]
            [T$'$
                [T [$t_i$, name=trace]]
                [VP
                    [V [leave]]
                ]
            ]
        ]
    ]
]
\draw[->, dashed, red] (trace) to[out=west, in=south west] (will);
\end{forest}

\end{document}

Typeset IPA and Numbered Glossed Examples

Use tipa for IPA symbols and gb4e for numbered linguistic examples with interlinear glosses:

\documentclass{article}
\usepackage{tipa}    % IPA symbols
\usepackage{gb4e}    % Numbered examples and glossing

\begin{document}

\section{Phonetic Transcription}

% IPA transcription
The word \textit{photograph} is transcribed as
\textipa{["f@Ut@gr\ae f]}.

The vowel system: \textipa{/i, e, \ae, A, O, o, u, @/}

% Phonological rule
\textipa{/t/} $\rightarrow$ \textipa{[R]} / V\underline{\hspace{1em}}V
\hfill (Flapping in American English)

\section{Glossed Examples}

\begin{exe}
    \ex \label{ex:german}
    \gll Der    Hund jagt     die   Katze.\\
         the.\textsc{nom} dog  chases the.\textsc{acc} cat\\
    \glt `The dog chases the cat.'

    \ex \label{ex:japanese}
    \gll Taroo-ga    hon-o       yonda.\\
         Taroo-\textsc{nom} book-\textsc{acc} read.\textsc{pst}\\
    \glt `Taroo read a book.'
\end{exe}

As shown in (\ref{ex:german}), German marks case on the determiner.

\end{document}

Use Unicode IPA with XeLaTeX (Modern Approach)

With XeLaTeX/LuaLaTeX, you can type IPA characters directly using Unicode instead of the tipa package:

% Compile with: xelatex or lualatex
\documentclass{article}
\usepackage{fontspec}

% Use a font with full IPA coverage
\setmainfont{Charis SIL}  % Excellent IPA support
% Alternatives: Doulos SIL, Gentium Plus, Linux Libertine

\usepackage{gb4e}
\noautomath  % Prevent gb4e conflicts with fontspec

\begin{document}

\section{Unicode IPA}

% Type IPA characters directly (no tipa needed!)
The word \textit{photograph}: [ˈfoʊtəɡɹæf]

Vowel chart excerpt:
\begin{tabular}{lcccc}
            & Front & Central & Back \\ \hline
    Close   & i, y  &         & ɯ, u \\
    Mid     & e, ø  & ə       & ɤ, o \\
    Open    & æ     & a       & ɑ, ɒ \\
\end{tabular}

% Tone marks
Mandarin tones: mā (1st), má (2nd), mǎ (3rd), mà (4th)

\section{Examples with Unicode}
\begin{exe}
    \ex
    \gll O      menino comeu    a      maçã.\\
         the.\textsc{m} boy    ate      the.\textsc{f} apple\\
    \glt `The boy ate the apple.' (Portuguese)
\end{exe}

\end{document}

💡 Tips

  • Prefer forest over qtree or tikz-qtree — it produces better layouts and supports more features like movement arrows.
  • For modern workflows, use XeLaTeX with Unicode IPA (type characters directly) instead of the tipa package.
  • The gb4e package numbers examples automatically — use \label and \ref to cross-reference them.
  • Install the SIL fonts (Charis SIL, Doulos SIL) for comprehensive IPA coverage in Unicode-based documents.

Try This in Bibby AI

Write LaTeX faster with AI auto-complete and instant compilation.

Start Writing Free

Related Tutorials

How to Write Linguistic Trees and IPA in LaTeX | Bibby AI