4

When trying to compile the examples from the manual like

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\begin{document}
\tikz \fill [decorate,decoration={crosses}] [fill=blue!20,draw=blue,thick] (0,0) -- (2,1) arc (90:-90:.5) -- cycle;
\end{document}

all I receive is

! Package pgfkeys Error: I do not know the key '/pgf/decoration/\pgfkeyscurrent
name ' and I am going to ignore it. Perhaps you misspelled it.

Is my tikz installation missing something or what do I do to make this work? The library is there (else I suppose the would be an error) and zigzag for instance is working.

  • works here with \usetikzlibrary{decorations.shapes} and cycle; – Nico Vecchio Dec 12 '14 at 15:58
  • @dcmst Yeah, the semicolon was missing above. But adding the shapes sublibrary does the trick. I wonder why is this not documented. You might want to make this an answer, so I can accept it. – oarfish Dec 12 '14 at 16:23
4

The compilable snippet is:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.shapes}
\begin{document}
\tikz \fill [decorate,decoration={crosses}] [fill=blue!20,draw=blue,thick] (0,0) -- (2,1) arc (90:-90:.5) -- cycle;
\end{document}

The decorations.shapes dependency is not directly documented in the example, but if you look carefully you'll notice that the crosses decoration is the first decoration introduced in the "TikZ Library decorations.shapes" section (Section 48.5.3, pag. 598) ;)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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