summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tikz-qtree/tests.tex
blob: 98bdf9ac41ee8f228c9b5103cd33f825600a8433 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
\documentclass{minimal}

\usepackage{tikz,tikz-qtree}

\begin{document}

\pgfnewsubpicture{s}

\begin{pgfpicture}
\begin{pgfsubpicture}
\pgfnode{rectangle}{center}{A}{a}{\pgfusepath{stroke}}
\end{pgfsubpicture}
\pgfsavesubpicture{s}

\begin{pgfsubpicture}
{\pgftransformshift{\pgfpoint{30pt}{0pt}}
\pgfnode{rectangle}{center}{B}{b}{\pgfusepath{stroke}}}
\end{pgfsubpicture}
\pgfmergesubpicture{s}

\pgfrestoresubpicture{s}

{\pgftransformrotate{30}
\pgftransformscale{0.75}{0.75}
\pgfplacesubpicture
}

{\pgftransformshift{\pgfpoint{0pt}{-30pt}}
\pgfnode{rectangle}{center}{C}{c}{\pgfusepath{stroke}}}
{\pgftransformshift{\pgfpoint{30pt}{-30pt}}
\pgfnode{rectangle}{center}{D}{d}{\pgfusepath{stroke}}}

\pgfpathmoveto{\pgfpointanchor{a}{east}}
\pgfpathlineto{\pgfpointanchor{b}{west}}
\pgfusepath{stroke}

\pgfpathmoveto{\pgfpointanchor{a}{south}}
\pgfpathlineto{\pgfpointanchor{c}{north}}
\pgfusepath{stroke}

\pgfpathmoveto{\pgfpointanchor{b}{south}}
\pgfpathlineto{\pgfpointanchor{d}{north}}
\pgfusepath{stroke}

\pgfpathmoveto{\pgfpointanchor{c}{east}}
\pgfpathlineto{\pgfpointanchor{d}{west}}
\pgfusepath{stroke}

\end{pgfpicture}

\Tree [.S [.NP [.Adj colorless ] [.Adj green ] [.N ideas ] ] [.VP [.VP [.V sleep ] ] [.Adv furiously ] ] ]
\Tree [.X 
	a a a a a a a a a a
	a a a a a a a a a a
	a a a a a a a a a a
	a a a a a a a a a a
	a a a a a a a a a a 
	]
	
\Tree 
  [.a [.a [.a [.a [.a [.a [.a [.a [.a [.a
  ] ] ] ] ] ] ] ] ] ]
  
  
  
\section{Testing tikz trees compatibility}

\begin{tikzpicture}[grow=right,level distance=1in]
\node {A} child {node {B}} child {node {C}};
\end{tikzpicture}
\begin{tikzpicture}[grow'=right,sibling distance=1in]
\node {A} child {node {B}} child {node {C}};
\end{tikzpicture}

  

\end{document}