Changes between Version 10 and Version 11 of TreeMagic
 Timestamp:
 Oct 30, 2011, 10:32:25 PM (6 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

TreeMagic
v10 v11 21 21 * To start Tree Magic, simply write 22 22 {{{ 23 #!tex24 23 %!begin{tree} 25 24 }}} 26 25 and press ('''alt+enter'''). This will automatically generate the following code: 27 26 {{{ 28 #!tex29 27 %!begin{tree}{magic:023916255455191981} 30 28 % … … 38 36 Then we have 39 37 {{{ 40 #!tex41 38 %!begin{tree}{magic:023916255455191981} 42 39 %f(g(a,b),h(c)) … … 47 44 Then the corresponding Tikz code is generated and inserted in the document: 48 45 {{{ 49 #!tex50 46 %!begin{tree}{magic:023916255455191981} 51 47 %f(g(a,b),h(c)) … … 69 65 * Here the whole Latex source code of this example: 70 66 {{{ 71 #!tex72 67 \documentclass{article} 73 68 … … 106 101 * We continue the previous example. To highlight a the nodes {g,a,b}, simply write '''highlight[paint=red](g, a, b)''' 107 102 {{{ 108 #!tex109 103 %!begin{tree}{magic:023916255455191981} 110 104 %f(g(a,b),h(c)) … … 119 113 * Of course we can highlight multiple parts of the tree: 120 114 {{{ 121 #!tex122 115 %!begin{tree}{magic:023916255455191981} 123 116 %f(g(a,b),h(c)) … … 138 131 * For example, 139 132 {{{ 140 #!tex141 133 %{$f^2(x)$}({$g_h$}(a,b),{h+3}(c)) 142 134 %highlight[paint=red](g_h,a,b) … … 161 153 Then the code: 162 154 {{{ 163 #!tex164 155 %{$f^2(x)$}:root({$g_h$}(a,b),{h+3}(c)) 165 156 %highlight[paint=red](g_h,a,b) … … 172 163 For example to add an arrow from 'c' to the root, add 173 164 {{{ 174 #!tex175 165 \draw [>,very thick] (c) to[bend right=80] (root); 176 166 }}} … … 184 174 For example: 185 175 {{{ 186 #!tex187 176 %f[rectangle,fill=green!50,draw=green!50!black](g(a,b),h(c)) 188 177 %highlight[paint=red](g,a,b) … … 194 183 * We can provide more Tikz options as follows: 195 184 {{{ 196 #!tex197 185 %f([options1] [options2] g [options3](a,b),h(c)) 198 186 }}} 199 187 which results in the following options being passed to child 'g': 200 188 {{{ 201 #!tex202 189 ... [options1] child [options2] { node [options3] (g) {g} ... 203 190 }}} 204 191 For example: 205 192 {{{ 206 #!tex207 193 %f( [] [grow=180] g [rectangle,fill=green!50,draw=green!50!black] (a,b),h(c)) 208 194 }}} 209 195 results in the Tikz code: 210 196 {{{ 211 #!tex212 197 \node (f) {f} 213 198 []child[grow=180] { node[rectangle,fill=green!50,draw=green!50!black] (g) {g}