3

I would like to have a brace in a tikz picture. However, when I process the file

\documentclass{amsart}
\usepackage{tikz}
\usetikzlibrary{decorations}
\usetikzlibrary{decorations.text}
\begin{document}
\begin{tikzpicture}[scale=8]
  \def\C{(0.688191,0)}
  \def\D{(0.688191, 0.1844)}
  \def\E{(0.830424, 0.1844)}
  \draw[decorate,decoration=brace] \C -- \D;
\end{tikzpicture}
\end{document}

I get

! Package pgfkeys Error: I do not know the key '/pgf/decoration/\pgfkeyscurrent
name ' 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.10 \draw[decorate,decoration=brace]  
                                      \C -- \D;

help. Pretend that you're Hercule Poirot: Examine all clues, and deduce the truth by order and method.

I saw similar questions here and here and here, but the answers to them don't seem to help me. I would appreciate your help.

Iosif Pinelis
  • 387
  • 1
  • 12

1 Answers1

2

You need the decorations.pathreplacing library.

\documentclass[border=10pt,multi,tikz]{standalone}
\usetikzlibrary{decorations.pathreplacing}

\begin{document}
\begin{tikzpicture}[scale=8]
  \def\C{(0.688191,0)} \def\D{(0.688191, 0.1844)} \def\E{(0.830424, 0.1844)}
  \draw[decorate,decoration=brace] \C -- \D;
\end{tikzpicture}
\end{document}

brace

cfr
  • 198,882