tikz 图片中的括号

tikz 图片中的括号

我想在 tikz 图片中添加一个括号。但是,当我处理文件时

\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}

我明白了

! 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.

我看到了类似的问题这里这里这里,但答案似乎对我没有帮助。非常感谢您的帮助。

答案1

你需要decorations.pathreplacing图书馆。

\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}

支撑

相关内容