LaTeX and Phonology
Last updated: April 08, 2024
Content
Phonetic transcription (IPA)
All you need to produce phonetic symbols in \(\LaTeX\) is the tipa
package. The cheat sheet for the package can be found here. Here’s an example with a sentence in Portuguese:
\documentclass{article}
\usepackage{tipa} %
\newcommand{\ipa}{\textipa}
\begin{document}
\ipa{[vo"se "pO\t{dZ}I u""\t{tS}ili"zaR k\super
waw"kER "simbUlU fo"nE\t{tS}\r*ikU]}
% "You can use any phonetic symbol" \end{document}
- Check out the function
ipa2tipa()
in the packageFonology
here.
Extras
Here are some specific symbols you may want to use which are not in the cheat sheet above.
- Dark /l/:
\textltilde
- Rhoticized schwa:
\textrhookschwa
- Rhoticized open-mid central unrounded vowel:
\textrhookrevepsilon
Finally, note that tipa
might not work well if you plan to use a different font family. You may have a conflict between different packages, for example, so bear that in mind if you don’t like \(\LaTeX\) CMU fonts. You can also end up with a font which doesn’t work well with phonetic symbols, so your transcriptions will use CMU but your text will use a different font. If you have OCD, that will bother you (it bothers me).
Vowels
You can use the vowel
package (see documentation here). Here’s an example with all vowels, so you can just hide the ones you don’t want.
\documentclass{article}
\usepackage{tipa,vowel}
\begin{document}
\begin{center}
{\Large
\begin{vowel}
\putcvowel[l]{i}{1}
\putvowel[l]{i}{0pt}{0pt}
\putcvowel[r]{y}{1}
\putcvowel[l]{e}{2}
\putcvowel[r]{\textipa{\o}}{2}
\putcvowel[l]{\textipa{E}}{3}
\putcvowel[r]{\textipa{\oe}}{3}
\putcvowel[l]{\textipa{a}}{4}
\putcvowel[r]{\textscoelig}{4}
\putcvowel[l]{\textipa{A}}{5}
\putcvowel[r]{\textipa{6}}{5}
\putcvowel[l]{\textipa{2}}{6}
\putcvowel[r]{\textipa{O}}{6}
\putcvowel[l]{\textipa{7}}{7}
\putcvowel[r]{\textipa{o}}{7}
\putcvowel[l]{\textipa{W}}{8}
\putcvowel[r]{\textipa{u}}{8}
\putcvowel[l]{\textipa{1}}{9}
\putcvowel[r]{\textipa{0}}{9}
\putcvowel[l]{\textipa{9}}{10}
\putcvowel[r]{\textipa{8}}{10}
\putcvowel{\textipa{@}}{11}
\putcvowel[l]{\textipa{3}}{12}
\putcvowel[r]{\textcloserevepsilon}{12}
\putcvowel{\textipa{I}\ \textipa{Y}}{13}
\putcvowel{\textipa{U}}{14}
\putcvowel{\textipa{5}}{15}
\putcvowel{\textipa{\ae}}{16}
\end{vowel}
}
\end{center}
\end{document}
3D vowel diagram
Here’s a figure from Ladefoged & Maddieson (1996, p. 283). Unlike the previous diagram, this one did not use the vowel
package. Instead, I used tikz
and commands such as \path
to create nodes, and \draw
to connect them—see examples below.
Prosodic trees
There are many different ways to draw non-linear structures in \(\LaTeX\). The easiest way is to use syntactic trees (e.g., qtree
package). The problem there is that all your brances will be symmetrical out of the box. So here are two ways you can get asymmetrical trees.
Example 1
This is perhaps the most obvious way to do it: tikz
is a powerful package to draw in \(\LaTeX\). So what you do is tell it where exactly you want to draw a particular node and voilà. It looks messy and counter-intuitive, but that changes as you get more and more familiar with it.
\documentclass{article}
\usepackage{textgreek}
\usepackage{tikz}
\usepackage{pgf}
\usetikzlibrary{backgrounds, matrix, positioning}
\usepackage{tipa}
\begin{document}
\begin{tikzpicture}
%
\draw[solid] (4,1.95) node[above](wd2){\textomega} -- (0,1.24);
\draw[solid] (4,1.95) -- (2,1.24);
\draw[solid] (4,1.95) -- (4,1.24);
%
\foreach \x in {0,2,4}
\draw[solid] (\x,0.75) node[above](foot){\textSigma} --
(\x,0) node[below](head){\textsigma};
%
\draw[solid] (0,0.75) -- (1,0) node[below](dep){\textsigma};
\draw[solid] (2,0.75) -- (3,0) node[below](dep){\textsigma};
\draw[solid] (4,0.75) -- (5,0) node[below](dep){\textsigma};
%
\node[draw=none, below] at (0,-0.3) {\strut a};
\node[draw=none, below] at (1,-0.3) {\strut pa};
\node[draw=none, below] at (2,-0.3) {\strut la};
\node[draw=none, below] at (3,-0.3) {\strut chi};
\node[draw=none, below] at (4,-0.3) {\strut co};
\node[draw=none, below] at (5,-0.3) {\strut la};
%
\end{tikzpicture}
\end{document}
Example 2
Here’s an example combining a typical syllable with variable heights for phonemes depending on their sonority (see app here).
\documentclass{article}
\usepackage{tikz}
\usepackage{tipa}
\begin{document}
\begin{tikzpicture}[scale = 0.8]
\path (2,5.5) node(sigma) {\strut \textsigma};
\path (0.5,2.5) node(O) {\strut O};
\path (2,4) node(R) {\strut R};
\path (2,2.55) node(N) {\strut N};
\path (3.5,2) node(C) {\strut C};
%
\node at (0,0) [circle, draw, inner sep = 0pt] (b) {\strut \textipa{b}};
\node at (1,0.8) [circle, draw, inner sep = 0pt] (l) {\strut \textipa{l}};
\node at (2,1.5) [circle, draw, inner sep = 0pt] (e) {\strut \textipa{E}};
\node at (3,0.6) [circle, draw, inner sep = 0pt] (n) {\strut \textipa{n}};
\node at (4,0) [circle, draw, inner sep = 0pt] (d) {\strut \textipa{d}};
\node at (2,-1) (caption) {`blend'};
%
\draw[dashed] (b) -- (l) -- (e) -- (n) -- (d);
\draw (sigma.south) -- (O.north);
\draw (O.south) -- (b.north);
\draw (O.south) -- (l.north);
\draw (sigma.south) -- (R.north);
\draw (R.south) -- (N.north);
\draw (R.south) -- (C.north);
\draw (N.south) -- (e.north);
\draw (C.south) -- (n.north);
\draw (C.south) -- (d.north);
\end{tikzpicture} \end{document}
Example 3
A similar but perhaps more intuitive way is to explicitly picture the whole thing as a table. If you were drawing a prosodic structure on top of a grid, you could make reference to a particular cell to locate your nodes (this is similar to example 1 above). Here’s a simple example of nasalization in English.
\usepackage{textgreek}
\usepackage{tikz}
\usepackage{pgf}
\usetikzlibrary{backgrounds, matrix, positioning}
\usepackage{tipa}
...
\begin{tikzpicture}
\matrix [matrix of nodes, row sep=1em,
column sep={2.5em,between origins},
row 5/.style={font=\scshape}]
%
{
& & |(top)| {\textsigma} && \\
|(onset)| O & & |(rhyme)| R && \\
& & |(nucleus)| N && |(coda)| C \\
& & |(mora1)| {$\mu$} && |(mora2)| {$\mu$} \\
|(r1)| rt & & |(r2)| rt && |(r4)| rt \\
|(c1)| C & & |(v1)| V && |(c2)| C \\
|(k)| /k/ & & |(a)| /{\textipa{\ae}}/ && |(n)| /{\textipa{n}}/ \\[1.5em]
& & && |(nf)| [nas] \\
};
%
% Top links (from syllable)
\draw foreach \x in {onset, rhyme} {(top.south) -- (\x.north)};
\draw foreach \x in {nucleus, coda} {(rhyme.south) -- (\x.north)};
%
% Linking onset, nucleus, and coda
\draw (onset.south) -- (r1.north);
\draw (nucleus.south) -- (mora1.north);
\draw (coda.south) -- (mora2.north);
%
\draw (mora1.south) -- (r2.north);
\draw (mora2.south) -- (r4.north);
%
\draw (r1.south) -- (c1.north);
\draw (r2.south) -- (v1.north);
\draw (r4.south) -- (c2.north);
\draw (c1.south) -- (k.north);
\draw (v1.south) -- (a.north);
\draw (c2.south) -- (n.north);
\draw (n.south) -- (nf.north);
\draw[dashed] (a.south) -- (nf.north);
% \end{tikzpicture}
Feature geometry
Overall representation
Once you get used to tikz
, drawing non-linear structures will be straightforward. Feature geometry is just a slightly fancier structure. The tree below is adapted from Clements & Hume (1995, p. 292).
\documentclass{article}
\usepackage{mathtools}
\usepackage{tikz}
\usepackage{pgf}
\usetikzlibrary{backgrounds, matrix, positioning}
\usepackage{tipa}
\begin{document}
\textsf{\normalsize
%
\begin{tikzpicture}[scale = 0.8]
%
%
%
%
%
\path (4,13) node (mora) {{$\mu$}};
\path (4,11.5) node (seg) {{/.../}};
\path (4,10.5) node (x) {{$\times$}};
\path (4,9) node (root) {{root}};
%
% Matrix by root node:
\path (6.5,9) node (matrix) {$\begin{bmatrix*}[l]\pm
\text{sonorant}\\
\pm \text{approximant}\\
\pm \text{syllabic}\end{bmatrix*}$};
%
%
\path (1,7) node (lar) {\textbf{laryngeal}};
\path (-1,5.5) node (vce) {{[voice]}};
\path (0,4.5) node (sg) {{[spread]}};
\path (2,5.5) node (cg) {{[constr]}};
%
\path (6,7) node (oral) {\textbf{oral cavity}};
\path (4,7.5) node (nasal) {{[nasal]}};
%
%
\path (7.5,5.6) node (cont) {{[continuant]}};
%
\path (4.8,5) node (Cplace) {{C-place}};
\path (2,3.3) node (dor) {{[dorsal]}};
\path (2.8,1.9) node (cor) {{[coronal]}};
\path (4.5,-0.5) node (ant) {{[anterior]}};
\path (2,-0.75) node (distr) {{[distributed]}};
\path (4.8,2.35) node (lab) {{[labial]}};
%
\path (7.5, 3.75) node (vocalic) {vocalic};
\path (7, 2.2) node (Vplace) {V-place};
\path (5, 0.75) node (Vlab) {[labial]};
\path (6.5, -0.45) node (Vcor) {[coronal]};
\path (5.5, -1.9) node (Vant) {[anterior]};
\path (8, -1.7) node (Vdistr) {[distributed]};
\path (8.5, 0) node (Vdor) {[dorsal]};
%
\path (9.5, 2.2) node (aperture) {aperture};
\path (10.5, 1.0) node (open) {[open]};
%
%
\draw (seg.north) -- (mora.south);
\draw (x.north) -- (seg.south);
\draw (root.north) -- (x.south);
\draw (root.south) -- (lar);
\draw (root.south) -- (oral);
\draw (root.south) -- (nasal.north);
\draw (oral.south) -- (cont.north);
\draw (lar.south) -- (vce.north);
\draw (lar.south) -- (sg.north);
\draw (lar.south) -- (cg.north);
%
\draw (oral.south) -- (Cplace.north);
%
\draw (Cplace.south) -- (dor.north);
\draw (Cplace.south) -- (cor.north);
\draw (Cplace.south) -- (lab.north);
\draw (cor.south) -- (distr.north);
\draw (cor.south) -- (ant.north);
%
\draw (Cplace.south) -- (vocalic.north);
\draw (vocalic.south) -- (Vplace.north);
\draw (vocalic.south) -- (aperture.north);
\draw (open.north) -- (aperture.south);
\draw (Vplace.south) -- (Vlab);
\draw (Vplace.south) -- (Vdor);
\draw (Vplace.south) -- (Vcor);
\draw (Vcor.south) -- (Vant);
\draw (Vcor.south) -- (Vdistr);
%
%
\end{tikzpicture}
} \end{document}
Example: nasal place assimilation
This is adapted from Davenport & Hannahs (2020, p. 162).
\documentclass{article}
\usepackage{mathtools}
\usepackage{tikz}
\usepackage{pgf}
\usetikzlibrary{backgrounds, matrix, positioning}
\usepackage{tipa}
\begin{document}
{\footnotesize\textsf{
%
\begin{tikzpicture}[scale = 0.5]
%
\path (4,8) node (n) {\footnotesize\textipa{/n/}};
\path (4,7) node (root) {{root}};
\path (1,6) node (lar) {\textbf{laryngeal}};
\path (-1,4.5) node (vce) {{[$+$voice]}};
\path (6,4) node (supra) {\textbf{supralaryngeal}};
\path (7.5,6) node (son) {{[$+$sonorant]}};
\path (7.8,5) node (cons) {{[$+$consonantal]}};
\path (0,2.5) node (velum) {{velum}};
\path (0,0.5) node (nasal) {{[$+$nasal]}};
\path (6,2) node (manner) {{manner}};
\path (6,0) node (cont) {{[$-$cont]}};
\path (9,0) node (place) {{place}};
\path (9,-1.7) node (cor) {{cor}};
\path (9,-3) node (ant) {{[$+$ant]}};
\draw (root.south) -- (lar) ;
\draw (root.south) -- (supra) ;
\draw (supra.south) -- (velum.north);
\draw (root.south) -- (son.west);
\draw (root.south) -- (cons.west);
\draw (velum.south) -- (nasal.north);
\draw (supra.south) -- (manner.north);
\draw (manner.south) -- (cont.north);
\draw (lar.south) -- (vce.north);
\draw (supra.south) -- node[circle,
midway,
rotate = -40]{
\textbf{$||$}}(place.north);
\draw (place.south) -- (cor.north);
\draw (cor.south) -- (ant.north);
%
% Second tree
%
\begin{scope}[xshift = 15cm, yshift = 0cm, scale=1]
%
\path (4,8) node (p) {\footnotesize\textipa{/p/}};
\path (4,7) node (root) {{root}};
\path (1,6) node (lar) {\textbf{laryngeal}};
\path (-1,4.5) node (vce) {{[$-$voice]}};
\path (6,4) node (supra2) {\textbf{supralaryngeal}};
\path (7.5,6) node (son) {{[$-$sonorant]}};
\path (7.8,5) node (cons) {{[$+$consonantal]}};
\path (9,2) node (velum) {{velum}};
\path (6,2) node (manner) {{manner}};
\path (6,0) node (cont) {{[$-$cont]}};
\path (0,-1) node (place2) {{place}};
\path (0,-2.5) node (lab) {{lab}};
%
\draw (root.south) -- (lar) ;
\draw (root.south) -- (supra2) ;
\draw (supra2.south) -- (velum.north);
\draw (root.south) -- (son.west);
\draw (root.south) -- (cons.west);
\draw (supra2.south) -- (manner.north);
\draw (manner.south) -- (cont.north);
\draw (lar.south) -- (vce.north);
\draw (supra2.south) -- (place2.north);
\draw (place2.south) -- (lab.north);
\draw (cor.south) -- (ant.north);
%
\draw[-stealth, dashed, semithick] (place2.north) --
(supra.south);
\end{scope}
\end{tikzpicture}
}}
\end{document}
Prosody + feature geometry
You have a lot of flexibility with tikz
. For instance, you could create a figure that combines (most of) the prosodic hierarchy using the Tree
command with some feature geometry using the path
command—you can link nodes from both objects by creating a scope
environment. Here’s a simplified example for “pretty butterfly”.
Morphology-phonology interface
This is adapted from Booij (2012, p. 159).
\documentclass{article}
\usepackage[LGRgreek]{mathastext}
\usepackage{tikz}
\begin{document}
{\scriptsize
\begin{tikzpicture}[scale = 0.9]
%
% MORPHOLOGGY FOR INTERNATIONAL
%
\path (1.5,1) node (pr) {\strut{Af}};
\path (3.5,1) node (n) {\strut{N}};
\path (4.25,2) node (adj1) {\strut{Adj}};
\path (4.25,3) node (adj2) {\strut{Adj}};
\path (5,1) node (su) {\strut{Af}};
\path (1,0) node (in) {\strut{\textbf{in}}};
\path (2,0) node (ter) {\strut{\textbf{ter}}};
\path (3,0) node (na) {\strut{\textbf{na}}};
\path (4,0) node (tion) {\strut{\textbf{tion}}};
\path (5,0) node (al) {\strut{\textbf{al}}};
%
% PHONOLOGY FOR INTERNATIONAL
%
\path (1,-1) node (s1) {\strut{$\sigma$}};
\path (2,-1) node (s2) {\strut{$\sigma$}};
\path (3,-1) node (s3) {\strut{$\sigma$}};
\path (4,-1) node (s4) {\strut{$\sigma$}};
\path (5,-1) node (s5) {\strut{$\sigma$}};
\path (1,-2) node (f1) {\strut{$\Sigma$}};
\path (3,-2) node (f2) {\strut{$\Sigma$}};
\path (3,-3) node (w) {\strut{$\omega$}};
%
% LINES
%
\draw (in.north) -- (pr.south);
\draw (ter.north) -- (pr.south);
\draw (na.north) -- (n.south);
\draw (tion.north) -- (n.south);
\draw (al.north) -- (su.south);
\draw (su.north) -- (adj1.south);
\draw (al.south) -- (s5.north);
\draw (n.north) -- (adj1.south);
\draw (adj1.north) -- (adj2.south);
\draw (pr.north) -- (adj2.south);
\draw (in.south) -- (s1.north);
\draw (ter.south) -- (s2.north);
\draw (na.south) -- (s3.north);
\draw (tion.south) -- (s4.north);
\draw (s1.south) -- (f1.north);
\draw (s2.south) -- (f1.north);
\draw (s3.south) -- (f2.north);
\draw (s4.south) -- (f2.north);
\draw (s5.south) -- (w.north);
\draw (f1.south) -- (w.north);
\draw (f2.south) -- (w.north);
\draw (2.7,-0.2) rectangle (4.4,0.2);
\path (4.4, -0.33) node (stem) {\tiny \emph{stem}};
%
\end{tikzpicture}
%
\hspace{4em}
%
\begin{tikzpicture}[scale = 0.9]
%
% MORPHOLOGGY FOR NEIGHBORHOOD
%
\path (1.5,1) node (n1) {\strut{N}};
\path (1.5,3) node (n2) {\strut{N}};
\path (3,1) node (af) {\strut{Af}};
\path (1,0) node (neigh) {\strut{\textbf{neigh}}};
\path (2,0) node (bor) {\strut{\textbf{bor}}};
\path (3,0) node (hood) {\strut{\textbf{hood}}};
%
% PHONOLOGY FOR NEIGHBORHOOD
%
\path (1,-1) node (s1) {\strut{$\sigma$}};
\path (2,-1) node (s2) {\strut{$\sigma$}};
\path (3,-1) node (s3) {\strut{$\sigma$}};
\path (1,-2) node (f1) {\strut{$\Sigma$}};
\path (3,-2) node (f2) {\strut{$\Sigma$}};
\path (1,-3) node (w) {\strut{$\omega$}};
%
% LINES
%
\draw (neigh.north) -- (n1.south);
\draw (bor.north) -- (n1.south);
\draw (hood.north) -- (af.south);
\draw (af.north) -- (n2.south);
\draw (n1.north) -- (n2.south);
\draw (neigh.south) -- (s1.north);
\draw (bor.south) -- (s2.north);
\draw (hood.south) -- (s3.north);
\draw (s1.south) -- (f1.north);
\draw (s2.south) -- (f1.north);
\draw (s3.south) -- (f2.north);
\draw (f1.south) -- (w.north);
\draw (f2.south) -- (w.north);
\draw (0.5,-0.2) rectangle (2.35,0.2);
\path (2.35, -0.33) node (stem) {\tiny \emph{stem}};
%
\end{tikzpicture}
} \end{document}
SPE rules (The Sound Pattern of English)
For SPE rules (Chomsky & Halle, 1968), we need matrices (so you can read about that particular topic and transfer the fundamentals to SPE rules). You can use the mathtools
package. I’m using the \text{}
function around the feature names because I don’t want them to be in italics (the default for math mode). The [l]
right next to \begin{bmatrix*}
simply tells \(\LaTeX\) to left align the bundle of features within the matrix. The example below is from a hypothetical language where high vowels lower when followed by uvular consonants.
\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{mathabx}
\usepackage{MnSymbol}
\usepackage{tipa}
\begin{document}
\[
\text{\textipa{[i,y,W,u]}} {\rightarrow} \text{\textipa{[e,\o,7,o]}}/{
\underline{\hspace{0.4cm}}} \text{\textipa{[q,\;N]}}:
%
\begin{bmatrix*}[l]
+\text{syl}\\
+\text{high}
\end{bmatrix*}
%
{\rightarrow}
%
\begin{bmatrix*}[l]
-\text{high}\\
-\text{low}
\end{bmatrix*}
/
\underline{\hspace{0.6cm}}
%
\begin{bmatrix*}[l]
-\text{cont}\\
-\text{high}
\end{bmatrix*}
\]
\end{document}
OT architecture
Given the non-linear figures above, drawing a typical OT architecture (Prince & Smolensky, 1993) is simple (again using tikz
).
\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{mathabx}
\usepackage{MnSymbol}
\usepackage{tipa, tikz}
\begin{document}
%
\begin{tikzpicture}[scale = 1.4]
\path (0,5) node(input) {\textrm{\textbf{/input/}}};
\path (0,4) node(gen) {\textsc{gen}};
\foreach \x in {1,...,4} {
\path (\x-2.5, 3) node(cand\x) {\textrm{\emph{cand}}};
}
%
\path(0,2) node(eval) {\textsc{eval}};
\path(0,1) node(output) {\textrm{\textbf{[output]}}};
%
\path(-3,2) node(con) {\scriptsize$\begin{Bmatrix*}[l]
\text{\textsc{faithfulness}}\\
\text{\textsc{markedness}}\\
\text{\textsc{alignment}}
\end{Bmatrix*}$\textsc{con}};
%
%
\draw[->] (input) -- (gen);
\foreach \x in {1,...,4} {
%
\draw[->] (gen.south) -- (cand\x.north);
\draw[] (cand\x.south) -- (eval.north);
}
%
\draw[->, dashed] (con) -- (eval);
\draw[->] (eval) -- (output);
%
\end{tikzpicture}
% \end{document}
Copyright © 2024 Guilherme Duarte Garcia