summaryrefslogtreecommitdiff
path: root/templates/latex/word-alignment.tex
diff options
context:
space:
mode:
Diffstat (limited to 'templates/latex/word-alignment.tex')
-rw-r--r--templates/latex/word-alignment.tex30
1 files changed, 30 insertions, 0 deletions
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: