|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Using chains but it says chainin is undefined control sequenceHi all,
The following diagram is not typesetting correctly. I get: ! Undefined control sequence. l.50 \chainin (s4); However, I can't understand this as I include the chains library. \documentclass[11pt]{minimal} \usepackage{tikz} \usetikzlibrary{chains,shapes,arrows,trees,matrix,positioning,decorations.pathmorphing} \usepackage[T1]{fontenc} \usepackage{bsymb} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} \setlength\PreviewBorder{1pt}% \begin{document} \begin{tikzpicture}[ item/.style={ thick, draw=black!50, top color=white, bottom color=black!20, circle split }, queue/.style={ rectangle, minimum size=6mm, very thick, draw=red!50!black!50, top color=white, bottom color=red!50!black!20, font=\itshape }, hv path/.style={to path={-| (\tikztotarget)}}, vh path/.style={to path={|- (\tikztotarget)}}, every join/.style={rounded corners}, ] \matrix[column sep=4mm, row sep=5mm] { % First row: \node (s4) [item] {$s_4$ \nodepart{lower} $32$}; & \node (s3) [item] {$s_3$ \nodepart{lower} $35$}; & \node (s2) [item] {$s_2$ \nodepart{lower} $32$}; & \node (s1) [item] {$s_1$ \nodepart{lower} $25$}; \\ % Second row: & & & & \node (pq) [queue] {Queue}; \\ % Third row: & & & & & \node (ss1) [item] {$s_1$ \nodepart{lower} $25$}; & \node (ss4) [item] {$s_4$ \nodepart{lower} $32$}; & \node (ss2) [item] {$s_2$ \nodepart{lower} $32$}; & \node (ss3) [item] {$s_3$ \nodepart{lower} $35$}; \\ }; { [start chain] \chainin (s4); \chainin (s3); \chainin (s2); \chainin (s1); \chainin (pq) [join=by {hv path, tip}]; \chainin (ss1) [join=by {vh path, tip}]; \chainin (ss4); \chainin (ss2); \chainin (ss3); } \end{tikzpicture} \end{document} Any idea of what's the problem? Cheers, -- Paulo Jorge Matos - pocmatos at gmail.com Webpage: http://www.pmatos.net ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ pgf-users mailing list pgf-users@... https://lists.sourceforge.net/lists/listinfo/pgf-users |
|
|
Re: Using chains but it says chainin is undefined control sequenceProblem solved... I also needed the scopes library. :)
Thanks! On Tue, 2009-10-20 at 12:41 +0000, Paulo J. Matos wrote: > Hi all, > > The following diagram is not typesetting correctly. I get: > ! Undefined control sequence. > l.50 \chainin > (s4); > > However, I can't understand this as I include the chains library. > \documentclass[11pt]{minimal} > \usepackage{tikz} > \usetikzlibrary{chains,shapes,arrows,trees,matrix,positioning,decorations.pathmorphing} > \usepackage[T1]{fontenc} > \usepackage{bsymb} > \usepackage[active,tightpage]{preview} > \PreviewEnvironment{tikzpicture} > \setlength\PreviewBorder{1pt}% > > \begin{document} > \begin{tikzpicture}[ > item/.style={ > thick, > draw=black!50, > top color=white, > bottom color=black!20, > circle split > }, > queue/.style={ > rectangle, > minimum size=6mm, > very thick, > draw=red!50!black!50, > top color=white, > bottom color=red!50!black!20, > font=\itshape > }, > hv path/.style={to path={-| (\tikztotarget)}}, > vh path/.style={to path={|- (\tikztotarget)}}, > every join/.style={rounded corners}, > ] > > \matrix[column sep=4mm, row sep=5mm] { > % First row: > \node (s4) [item] {$s_4$ \nodepart{lower} $32$}; & > \node (s3) [item] {$s_3$ \nodepart{lower} $35$}; & > \node (s2) [item] {$s_2$ \nodepart{lower} $32$}; & > \node (s1) [item] {$s_1$ \nodepart{lower} $25$}; \\ > % Second row: > & & & & \node (pq) [queue] {Queue}; \\ > % Third row: > & & & & & > \node (ss1) [item] {$s_1$ \nodepart{lower} $25$}; & > \node (ss4) [item] {$s_4$ \nodepart{lower} $32$}; & > \node (ss2) [item] {$s_2$ \nodepart{lower} $32$}; & > \node (ss3) [item] {$s_3$ \nodepart{lower} $35$}; \\ > }; > > { [start chain] > \chainin (s4); > \chainin (s3); > \chainin (s2); > \chainin (s1); > \chainin (pq) [join=by {hv path, tip}]; > \chainin (ss1) [join=by {vh path, tip}]; > \chainin (ss4); > \chainin (ss2); > \chainin (ss3); > } > \end{tikzpicture} > \end{document} > > Any idea of what's the problem? > > Cheers, > > ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ pgf-users mailing list pgf-users@... https://lists.sourceforge.net/lists/listinfo/pgf-users |
|
|
Re: Using chains but it says chainin is undefined control sequenceI have changed the diagram to include some decorations but I am getting:
! Package pgfkeys Error: I do not know the key '/pgf/decoration/snake' and I am going to ignore it. Perhaps you misspelled it. See the pgfkeys package documentation for explanation. Type H <return> for immediate help. ... l.53 \chainin (s3) [join=by link]; Any tips? \documentclass[11pt]{minimal} \usepackage{tikz} \usetikzlibrary{scopes,chains,shapes,arrows,trees,matrix,positioning,decorations} \usepackage[T1]{fontenc} \usepackage{bsymb} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} \setlength\PreviewBorder{1pt}% \begin{document} \begin{tikzpicture}[ item/.style={ thick, draw=black!50, top color=white, bottom color=black!20, circle split }, queue/.style={ rectangle, minimum size=6mm, very thick, draw=red!50!black!50, top color=white, bottom color=red!50!black!20, font=\itshape }, link/.style={-,decorate,decoration={snake}}, tip/.style={->,shorten >=1pt}, hv path/.style={to path={-| (\tikztotarget)}}, vh path/.style={to path={|- (\tikztotarget)}}, every join/.style={rounded corners}, ] \matrix[column sep=4mm, row sep=5mm] { % First row: \node (s4) [item] {$s_4$ \nodepart{lower} $32$}; & \node (s3) [item] {$s_3$ \nodepart{lower} $35$}; & \node (s2) [item] {$s_2$ \nodepart{lower} $32$}; & \node (s1) [item] {$s_1$ \nodepart{lower} $25$}; \\ % Second row: & & & & \node (pq) [queue] {Queue}; \\ % Third row: & & & & & \node (ss1) [item] {$s_1$ \nodepart{lower} $25$}; & \node (ss4) [item] {$s_4$ \nodepart{lower} $32$}; & \node (ss2) [item] {$s_2$ \nodepart{lower} $32$}; & \node (ss3) [item] {$s_3$ \nodepart{lower} $35$}; \\ }; { [start chain] \chainin (s4); \chainin (s3) [join=by link]; \chainin (s2) [join=by link]; \chainin (s1) [join=by link]; \chainin (pq) [join=by {hv path, tip}]; \chainin (ss1) [join=by {vh path, tip}]; \chainin (ss4) [join=by link]; \chainin (ss2) [join=by link]; \chainin (ss3) [join=by link]; } \end{tikzpicture} \end{document} ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ pgf-users mailing list pgf-users@... https://lists.sourceforge.net/lists/listinfo/pgf-users |
|
|
Re: Using chains but it says chainin is undefined control sequenceHi Paulo,
\usetikzlibrary{(...), decorations.pathmorphing} which replaces the old snakes library. Sebastian ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ pgf-users mailing list pgf-users@... https://lists.sourceforge.net/lists/listinfo/pgf-users |
| Free embeddable forum powered by Nabble | Forum Help |