diff options
author | Patrick Simianer <p@simianer.de> | 2014-08-10 12:21:13 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-08-10 12:21:13 +0100 |
commit | 60c1b9387cd98b3ba875bddb13c86e9e090cb1f1 (patch) | |
tree | b3d144e80d9386821485a29ed554525e79f22cad /templates/latex/word-alignment.tex |
init
Diffstat (limited to 'templates/latex/word-alignment.tex')
-rw-r--r-- | templates/latex/word-alignment.tex | 30 |
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: |