Skip to content

Instantly share code, notes, and snippets.

@pavelrudnev
Last active October 8, 2017 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pavelrudnev/f13fc08bc21c4fa075b2f6125b1b15ab to your computer and use it in GitHub Desktop.
Save pavelrudnev/f13fc08bc21c4fa075b2f6125b1b15ab to your computer and use it in GitHub Desktop.
This is the LaTeX source for drawing diagrams for two kinds of (syntactic) alignment --- ergative-absolutive and nominative-accusative. The pgf/tikz package is required.
\documentclass[14pt]{scrartcl}
\usepackage{subfigure}
\usepackage{tikz}
\usetikzlibrary{arrows,backgrounds,calc,fit,matrix,positioning,
shapes,shapes.geometric,shapes.misc}
\pgfdeclarelayer{foreground}
\pgfdeclarelayer{background}
\pgfsetlayers{background,%
main,%
foreground%
}
\begin{document}
\begin{figure}[h]
\centering
\subfigure[Ergative-absolutive]{\label{Ergative-absolutive}
\begin{tikzpicture}[
buffer/.style = {
isosceles triangle,
isosceles triangle apex angle=66,
shape border rotate=90,%
%fill=blue!20, opacity=0.6,
node distance=2em,
rounded corners=60pt,
minimum height=2.5em},
frames/.style args = {#1/#2}{minimum height=#1,
minimum width=#2+\pgfkeysvalueof{/pgf/minimum height},
draw, rounded corners=5mm, fill=pink, opacity=0.6,
sloped},
]
\begin{pgfonlayer}{foreground}
\node (A) at (0,0) {S};
\node (B) at (-2,-3) {A};
\node (C) at (2,-3) {O};
\end{pgfonlayer}
\begin{pgfonlayer}{main}
\path let \p1 = ($(C.center)-(A.center)$),
\n1 = {veclen(\y1,\x1)} in
(A) --
node[frames=11mm/\n1] {} (C);
\end{pgfonlayer}
\begin{pgfonlayer}{background}
\node[buffer]at (0,-1.9){};
\end{pgfonlayer}
\end{tikzpicture}
}\hspace*{5em}
\subfigure[Nominative-accusative]{\label{Nominative-accusative}
\begin{tikzpicture}[
buffer/.style = {
isosceles triangle,
isosceles triangle apex angle=66,
shape border rotate=90,%
%fill=blue!20, opacity=0.6,
node distance=2em,
rounded corners=60pt,
minimum height=2.5em},
frames/.style args = {#1/#2}{minimum height=#1,
minimum width=#2+\pgfkeysvalueof{/pgf/minimum height},
draw, rounded corners=5mm, fill=pink, opacity=0.6,
sloped},
]
\begin{pgfonlayer}{foreground}
\node (A) at (0,0) {S};
\node (B) at (-2,-3) {A};
\node (C) at (2,-3) {O};
\end{pgfonlayer}
\begin{pgfonlayer}{main}
\path let \p1 = ($(B.center)-(A.center)$),
\n1 = {veclen(\y1,\x1)} in
(A) --
node[frames=11mm/\n1] {} (B);
\end{pgfonlayer}
\begin{pgfonlayer}{background}
\node[buffer]at (0,-1.9){};
\end{pgfonlayer}
\end{tikzpicture}
}
\end{figure}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment