Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with tikz decorations

1,929 views
Skip to first unread message

Alan Munn

unread,
Apr 9, 2009, 10:44:11 PM4/9/09
to
The following sample code from the tikz manual fails with the following
error:


! Package pgfkeys Error: I do not know the key '/pgf/decoration/brace'
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.11 \draw[decorate,decoration=brace]
(a) -- (b);

What am I missing here?

Alan


\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations}
\begin{document}

\begin{tikzpicture}
\node (a) {A};
\node (b) at (2,1) {B};
\draw (a) -- (b);
\draw[decorate,decoration=brace] (a) -- (b);
\draw[decorate,decoration={brace,mirror},red] (a) -- (b);
\draw[decorate,decoration={brace,mirror,raise=5pt},blue] (a) -- (b);
\end{tikzpicture}

\end{document}

Alain Matthes

unread,
Apr 10, 2009, 12:08:15 AM4/10/09
to
On 2009-04-10 04:44:11 +0200, Alan Munn <am...@msu.edu> said:

> The following sample code from the tikz manual fails with the following
> error:
>
>
> ! Package pgfkeys Error: I do not know the key '/pgf/decoration/brace'
> and I am
> going to ignore it. Perhaps you misspelled it.
>
>
>

> \documentclass{article}
> \usepackage{tikz}
> \usetikzlibrary{decorations}

\usetikzlibrary{decorations.pathreplacing}


> \begin{document}
>
> \begin{tikzpicture}
> \node (a) {A};
> \node (b) at (2,1) {B};
> \draw (a) -- (b);
> \draw[decorate,decoration=brace] (a) -- (b);
> \draw[decorate,decoration={brace,mirror},red] (a) -- (b);
> \draw[decorate,decoration={brace,mirror,raise=5pt},blue] (a) -- (b);
> \end{tikzpicture}
>
> \end{document}

Alain Matthes

Alan Munn

unread,
Apr 10, 2009, 9:13:39 AM4/10/09
to
In article <49dec672$0$12622$ba4a...@news.orange.fr>,
Alain Matthes <alain....@nofree.fr> wrote:

> On 2009-04-10 04:44:11 +0200, Alan Munn <am...@msu.edu> said:
>
> > The following sample code from the tikz manual fails with the following
> > error:
> >
> >
> > ! Package pgfkeys Error: I do not know the key '/pgf/decoration/brace'
> > and I am
> > going to ignore it. Perhaps you misspelled it.
> >
> >
> >
> > \documentclass{article}
> > \usepackage{tikz}
> > \usetikzlibrary{decorations}
>
> \usetikzlibrary{decorations.pathreplacing}

Thanks, Alain. This is one frustrating part about the otherwise stellar
tikz manual: it's not always obvious which libraries must be used for
which bits of sample code.

Alan

Alain Matthes

unread,
Apr 10, 2009, 2:40:47 PM4/10/09
to

First, you can use all the librairies :

\usetikzlibrary{%
arrows,%
calc,%
fit,%
patterns,%
plotmarks,%
shapes.geometric,%
shapes.misc,%
shapes.symbols,%
shapes.arrows,%
shapes.callouts,%
% shapes.multipart,%
% shapes.gates.logic.US,%
% shapes.gates.logic.IEC,%
% er,%
% automata,%
backgrounds,%
chains,%
topaths,%
trees,%
petri,%
mindmap,%
matrix,%
% calendar,%
folding,%
fadings,%
through,%
positioning,%
scopes,%
decorations.fractals,%
decorations.shapes,%
decorations.text,%
decorations.pathmorphing,%
decorations.pathreplacing,%
decorations.footprints,%
decorations.markings,%
shadows}

and after you remove some of them

Best Regards

Alain Matthes

Zhou Bobby

unread,
Jul 7, 2021, 10:58:23 PM7/7/21
to
I encountered the same problem. And Alain's solution addressed this issue. Many thanks Alain!

Andrej Kon'kov

unread,
Feb 2, 2022, 9:23:23 AM2/2/22
to
Thank you Alain very much!
I had the same problem with tikz decorations. Your advice helped me deal with it.
Best regards
Andrej Kon'kov.
0 new messages