I have been using TikZ with some success, but I can't figure out why the following code doesn't produce anything:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\begin{document}
\begin{tikzpicture}
\draw[decorate, decoration=snake, segment length=5mm, amplitude=15mm] (0,0) -- (10,10);
\end{tikzpicture}
\end{document}
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?
Best Answer
You are missing a pair of braces. The line should be written as
amplitude
is an option todecoration
and not to\path
, therefore the braces.