|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
error with two examples of the manualHello
I try to make a document with some examples of the pgfmanual (version 2.0) and I get an error if the first example is not in a group. The first example is page 223 and the second is page 192. Without \begingroup and \endgroup, I get Latex Error: ./trunk.tex:92 Package pgfkeys Error: I do not know the key '/tikz/trunk' and I am going to ignore it. Perhaps you misspelled it. The solution with a group is not completely satisfactory because I can not use the logo for example in another page I would like to know if there is another method ? Best Regards Alain Matthes The code \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[upright]{fourier} \usepackage{tikz} \usetikzlibrary{% arrows,% calc,% plotmarks,% chains,% topaths,% trees,% through,% positioning,% scopes} \begin{document} \begingroup \tikzset{ ld/.style={level distance=#1},lw/.style={line width=#1}, level 1/.style={ld=4.5mm, trunk, lw=1ex ,sibling angle=60}, level 2/.style={ld=3.5mm, trunk!80!leaf a,lw=.8ex,sibling angle=56}, level 3/.style={ld=2.75mm,trunk!60!leaf a,lw=.6ex,sibling angle=52}, level 4/.style={ld=2mm, trunk!40!leaf a,lw=.4ex,sibling angle=48}, level 5/.style={ld=1mm, trunk!20!leaf a,lw=.3ex,sibling angle=44}, level 6/.style={ld=1.75mm,leaf a, lw=.2ex,sibling angle=40}, } \pgfarrowsdeclare{leaf}{leaf} {\pgfarrowsleftextend{-2pt} \pgfarrowsrightextend{1pt}} { \pgfpathmoveto{\pgfpoint{-2pt}{0pt}} \pgfpatharc{150}{30}{1.8pt} \pgfpatharc{-30}{-150}{1.8pt} \pgfusepathqfill } \newcommand{\logo}[5] { \colorlet{border}{#1} \colorlet{trunk}{#2} \colorlet{leaf a}{#3} \colorlet{leaf b}{#4} \begin{tikzpicture} \scriptsize\scshape \draw[border,line width=1ex,yshift=.3cm, yscale=1.45,xscale=1.05,looseness=1.42] (1,0) to [out=90, in=0] (0,1) to [out=180,in=90] (-1,0) to [out=-90,in=-180] (0,-1) to [out=0, in=-90] (1,0) -- cycle; \coordinate (root) [grow cyclic,rotate=90] child { child [line cap=round] foreach \a in {0,1} { child foreach \b in {0,1} { child foreach \c in {0,1} { child foreach \d in {0,1} { child foreach \leafcolor in {leaf a,leaf b} { edge from parent [color=\leafcolor,-#5] } } } } } edge from parent [shorten >=-1pt,serif cm-,line cap=butt] }; \node [text centered,text width=2cm,below] at (0pt,-.5ex) { \textcolor{border}{T}heoretical \\ \textcolor{border}{C}omputer \\ \textcolor{border}{S}cience }; \end{tikzpicture} } \begin{minipage}{3cm} \logo{green!80!black}{green!25!black}{green}{green!80}{leaf}\\ \logo{green!50!black}{black}{green!80!black}{red!80!green}{leaf}\\ \logo{red!75!black}{red!25!black}{red!75!black}{orange}{leaf}\\ \logo{black!50}{black}{black!50}{black!25}{} \end{minipage} \endgroup \begin{tikzpicture} \node {root} child { node {left} edge from parent node[left] {a} node[right] {b} } child { node {right} child { node {child} edge from parent node[left] {c} } child {node {child}} edge from parent node[near end] {x} }; \end{tikzpicture} \end{document} ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ pgf-users mailing list pgf-users@... https://lists.sourceforge.net/lists/listinfo/pgf-users |
| Free Forum Powered by Nabble | Forum Help |