LaTeX, Day 4
2025-09-05
gb4e?gb4e (core)cgloss4e (glossing)tipa (IPA if needed)gb4e ActivityOften in Linguistics we need to draw tree structures.
Sometimes in Phonology:
forest package\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{forest} % trees
% A clean, reusable style for our trees:
\forestset{
mytree/.style={
for tree={
align=center,
parent anchor=south,
child anchor=north,
edge={-Latex}, % arrowed edges; swap to draw,-> etc.
s sep=8mm, % sibling sep
l sep=8mm, % level sep
inner sep=2pt,
rounded corners
}
}
}
\begin{document}
text
\end{document}forest?forest, draw a tree of the sentence, “That cow can jump over the moon.”\documentclass{standalone} % class to make a single image
\usepackage{newtx} % Times font clone
\usepackage[linguistics]{forest}
\forestset{default preamble={for tree={edge=semithick}}} % thicker edges
\begin{document}
\begin{forest}
[TP [DP\\John, name=SpecTP]
[T$'$ [T\\\textsc{past}]
[vP [DP\\t, name=SpecvP]
[v$'$ [v [V\\roll, name=littlev] [v]]
[VP [DP [D\\the] [NP\\ball]]
[V$'$ [V\\t, name=bigV]
[PP [P\\down]
[DP [D\\the] [NP\\hill]]]]]]]]]
\draw[->] (SpecvP) to[out=south west, in=south] (SpecTP);
\draw[->] (bigV) to[out=south, in=south] (littlev);
\end{forest}
\end{document}see https://www.kennethhanson.net/teaching/latex-tree-drawing/
gb4e Activity\documentclass{article}
\usepackage{gb4e}
\begin{document}
\begin{exe}
\ex
\gll Ali kitab-ı oku-du.\\
Ali.NOM book-ACC read-PST.3SG\\
\trans `Ali read the book.'
\end{exe}
\begin{exe}
\ex[*]{
\gll Weil er hat das Buch gelesen.\\
because he has the book read.PTCP\\
\trans `Because he has read the book.'}
\end{exe}
\begin{exe}
\ex
\gll Maria wasi-ta riku-sha-n.\\
Maria house-ACC see-PROG-3\\
\trans `Maria is looking at the house.'
\end{exe}
\end{document}\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{forest} % trees
% A clean, reusable style for our trees:
\forestset{
mytree/.style={
for tree={
align=center,
parent anchor=south,
child anchor=north,
edge={-Latex}, % arrowed edges; swap to draw,-> etc.
s sep=8mm, % sibling sep
l sep=8mm, % level sep
inner sep=2pt,
rounded corners
}
}
}
\begin{document}
% Requires: \usepackage{forest}
\begin{forest}
for tree={
align=center,
parent anchor=south,
child anchor=north,
edge={-Latex},
s sep=8mm,
l sep=8mm,
inner sep=2pt,
}
[TP
[DP
[D [That] ]
[NP [cow] ]
]
[T$'$
[T [can] ]
[VP
[V$'$
[V [jump] ]
[PP
[P [over] ]
[DP
[D [the] ]
[NP [moon] ]
]
]
]
]
]
]
\end{forest}
\end{document}\documentclass{standalone} % single-image output
\usepackage{newtx} % Times-like font
\usepackage[linguistics]{forest}
\forestset{default preamble={for tree={edge=semithick,align=center}}}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{forest}
[CP
[DP\\\emph{what}$_i$, name=SpecCP] % landing site (Spec-CP)
[C$'$
[C\\did, name=Chead] % did in C after T→C
[TP
[DP\\you, name=SpecTP]
[T$'$
[T\\t, name=Thead] % trace of did in T
[VP
[V$'$
[V\\do, name=Vhead]
[DP\\t$_i$, name=ObjTrace] % original object position
]
]
]
]
]
]
% ---- movement arrows ----
\draw[dashed,->] (ObjTrace) to[out=south west, in=south] (SpecCP); % DP (obj) → Spec-CP
\draw[dashed,->] (Thead) to[out=south, in=south] (Chead); % T → C (did)
\end{forest}
\end{document}\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{forest} % -> TikZ-based tree drawing
% A clean, readable forest style
\forestset{
ie tree/.style={
for tree={
align=center,
parent anchor=south,
child anchor=north,
edge={-Latex},
s sep=8mm, % sibling separation
l sep=8mm, % level separation
inner sep=2pt,
}
}
}
\begin{document}
\thispagestyle{empty}
% ---- Indo‑European Stammbaum with a "Core IE (layout)" node ----
\begin{center}
\scalebox{0.8}{ % shrink to 80%
\begin{forest}
ie tree
[Proto-Indo-European\\(PIE)
[Anatolian]
[Tocharian]
[Core IE\\(layout)
[Indo-Iranian]
[Greek]
[Armenian]
[Albanian]
[Germanic]
[Italic]
[Celtic]
[Balto-Slavic]
]
]
\end{forest}}
\end{center}
% (Presentation note: “Core IE (layout)” is just a layout convenience,
% not a phylogenetic claim.)
\end{document}