diff options
author | pks <pks@pks.rocks> | 2021-01-23 11:24:30 +0100 |
---|---|---|
committer | pks <pks@pks.rocks> | 2021-01-23 11:24:30 +0100 |
commit | e8d6464f5c834b2ea801ac596ee1d31791f2c2fd (patch) | |
tree | 40603505815b83a2043bd89da6ac0660db3bb982 /templates/latex/word-alignment.tex | |
parent | 6423f685e82168ad26df06c9701af89488d6bdec (diff) | |
parent | af8617eeff5e40df0610b00214c20095654d63a6 (diff) |
Merge remote-tracking branch 'templates/master'
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: |