我想在 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}