我通过 MacTeX 在我的 Snow Leopard 笔记本电脑上安装了 TeX Live 2013。
我从2.10版第247页复制了以下代码pgfmanual
:
\documentclass[a4paper,12pt]{report}
\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}
但不知怎的我却得到了这个错误:
./Untitled2.tex:11: Package pgfkeys Error: I do not know the key '/pgf/decorati
on/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);
?
这是一个错误吗?
答案1
我相信我找到了解决方案。使用:
\usetikzlibrary{decorations.pathreplacing}