Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

A Latex+tikz question for you: I can't seem to get snakes to work (scientific linux 6.3). I've been looking at the tikz manual; sure would like to know how to get those snakes!

\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations,backgrounds}

\begin{document}
  % p43 : can't get snakes to work
  %       \usetikzlibrary{arrows,snakes,backgrounds}      \draw [->,snakes=snake] (0,0) -- (2,0)      : Package pgfkeys Error: I do not know the key '/tikz/snakes' and I am going to...
  %       \usetikzlibrary{arrows,snakes,backgrounds}      \draw [->,snake=snake] (0,0) -- (2,0)       : Package tikz Warning: Snakes have been superseded by decorations. Please use th...
  %       \usetikzlibrary{arrows,decorations,backgrounds} \draw [->,snake=snake] (0,0) -- (2,0)       : I can't find file `tikzlibrarydecoration.code.tex'...
  %       \usetikzlibrary{arrows,decorations,backgrounds} \draw [->,decoration=snake] (0,0) -- (2,0)  : Package pgfkeys Error: I do not know the key '/pgf/decoration/snake' and I am...
  %       \usetikzlibrary{arrows,decorations,backgrounds} \draw [->,decoration=snakes] (0,0) -- (2,0) : Package pgfkeys Error: I do not know the key '/pgf/decoration/snakes' and I a
  \begin{tikzpicture}
    \draw [->,decoration=snake] (0,0) -- (2,0);
  \end{tikzpicture}
\end{document}
share|improve this question
2  
You have to load the right decorations library, not just the general one. In this case, \usetikzlibrary{decorations.pathmorphing} will get your example to compile, and adding decorate to your \draw option will actually make the snake show up. –  Jake Dec 17 '12 at 21:04
    
I'm almost there... \draw [->,decorate,decoration=snake,line after snake=1mm] (0,0) -- (2,0); doesn't recognize the "line after snake=1mm" as given in the tikz manual. Presumably the command has changed? –  user21497 Dec 17 '12 at 21:14
1  
Yes, it has. You now have to use decoration={snake, post length=1mm}. –  Jake Dec 17 '12 at 21:21
    
@Jake fancy posting an answer? Or else vote to close as TL? –  cmhughes Dec 18 '12 at 2:07
    
how to install latex in scientifc linux 6.3 –  user24128 Jan 8 '13 at 12:42
show 2 more comments

closed as too localized by Andrew Swann, zeroth, Claudio Fiandrino, Qrrbrbirlbel, Stefan Kottwitz Jan 8 '13 at 13:18

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.