From 60c1b9387cd98b3ba875bddb13c86e9e090cb1f1 Mon Sep 17 00:00:00 2001
From: Patrick Simianer <p@simianer.de>
Date: Sun, 10 Aug 2014 12:21:13 +0100
Subject: init

---
 templates/latex/word-alignment.tex | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 templates/latex/word-alignment.tex

(limited to 'templates/latex/word-alignment.tex')

diff --git a/templates/latex/word-alignment.tex b/templates/latex/word-alignment.tex
new file mode 100644
index 0000000..b836cfc
--- /dev/null
+++ b/templates/latex/word-alignment.tex
@@ -0,0 +1,30 @@
+% Note: works only for XeLaTeX.
+\documentclass[border=1mm]{standalone}
+\usepackage{tikz}
+\usepackage{xltxtra}
+
+\begin{document}
+\begin{tikzpicture}[scale=0.7]
+  \tikzstyle{vertex}=[rectangle,rounded corners, fill=red!80!white,draw=red!70!black,
+  minimum size=0.6cm,line width=1]
+  \draw[step=1cm,draw=gray] (0,0) grid (5,7);
+
+  \foreach \y/\f in {0/a, 1/b, 2/c, 3/d, 4/e, 5/f, 6/g} {
+    \node[left] at (-.2,6.5-\y) {{\raggedleft \f }};
+  }
+
+  \foreach \x/\e in {0/she, 1/broke, 2/the, 3/school, 4/windows} {
+    \node[rotate=60,right] at (\x+.4,7.2) {{\raggedright \e}};
+  }
+
+  % draw word alignment
+  \foreach \x/\y in {0/0, 1/6, 3/2, 4/4} {
+    \node[vertex] at (\x+.5, 6.5-\y) {};
+  }
+\end{tikzpicture}
+\end{document}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End:
-- 
cgit v1.2.3

