Skip to content

Instantly share code, notes, and snippets.

@adodge
Created November 30, 2012 04:30
Show Gist options
  • Save adodge/4173781 to your computer and use it in GitHub Desktop.
Save adodge/4173781 to your computer and use it in GitHub Desktop.
Example x-bar tree with movement
% Example x-bar tree with movement
% Alex Dodge, alexdodge@gmail.com
\documentclass[12pt]{article}
\usepackage{qtree,tree-dvips}
% Macros for styling the leaf nodes and traces
\newcommand{\word}[2]{#1\\#2}
\newcommand{\trace}[1]{\emph{t$_{#1}$}}
\begin{document}
% Tree (qtree)
% http://www.ling.upenn.edu/advice/latex/qtree/qtreenotes.pdf
\Tree
[.CP
[.\node{topic}{DP} [.D\1
\word{D}{die}
[.NP [.N\1 \word{N}{Kinder} ] ]
] ]
[.C\1
\word{C}{\node{haben}{haben}}
[.TP
[.T\1
[.VP
[.V\1
[.VP
\word{DP}{ \node{ttopic}{ \trace{topic} } }
[.V\1
[.DP [.D\1
\word{D}{diesen}
[.NP [.N\1 \word{N}{Film} ] ]
] ]
\word{V}{gesehen}
]
]
\word{V}{\node{thaben1}{ \trace{} }}
]
]
\word{T}{\node{thaben2}{ \trace{} }}
]
]
]
]
% Movement (tree-dvips)
% http://www.essex.ac.uk/linguistics/external/clmt/latex4ling/trees/tree-dvips/index.pdf
\anodecurve[r]{thaben1}[b]{thaben2}{20px}
\anodecurve[tr]{thaben2}[tr]{haben}{150px}
\nodeoval{thaben1}
\nodeoval{thaben2}
{\makedash{4pt}
\anodecurve[l]{ttopic}[bl]{topic}{100px}
\nodeoval{ttopic}
}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment