TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been using TikZ with some success, but I can't figure out why the following code doesn't produce anything:


    \draw[decorate, decoration=snake, segment length=5mm, amplitude=15mm] (0,0) -- (10,10);


except the following error

Latex Error: ./untitled.tex:7 Package pgfkeys Error: I do not know the key '/tikz/amplitude' and I am going to ignore it. Perhaps you misspelled it.

Were I to remove the amplitude option, this would compile. I just tried installing the very latest pgf-TikZ package, but that didn't change anything (the update went well, other features are working correctly). This leads me to believe that this option is somehow outdated, but I can't find anything to remedy this.

Does anyone know how to control the 'snake' amplitude in the latest TikZ package?

share|improve this question
up vote 13 down vote accepted

You are missing a pair of braces. The line should be written as

\draw[decorate, decoration={snake, segment length=5mm, amplitude=15mm}] (0,0) -- (10,10);

amplitude is an option to decoration and not to \path, therefore the braces.

share|improve this answer
What do you know. It works! :) Do I feel silly. Those brackets don't seem to be needed until I add that third argument. Strange? – Jóhann Nov 12 '10 at 2:01
It is indeed strange that segment length can be given outside the grouping (amplitude can't even if it is the only argument). Maybe a bug for segment length. – Caramdir Nov 12 '10 at 2:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.