我将tikzpicture
在我的 ... 中使用两个不同的部分document
。我的兴趣是[scale=x]
为每个部分使用两个不同的选项。当我[scale=x]
只考虑其中一个时,一切都很好。但是当我将添加[scale=y]
到后者时,我出现了以下错误:
! Package pgfkeys Error: I do not know the key '/tikz/place' 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.27 \node[place]
(waiting) {};
我们可以检查代码,如下面的代码片段所示:
\documentclass[]{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[scale = 0.5]
\foreach \x in {1, ..., 10}
\shadedraw[] (\x * 36:10) circle (1.0);
\end{tikzpicture}
\begin{tikzpicture}
[scale = 2.0, transform shape, place/.style={circle, draw=blue!50, fill=blue!20, thick, inner sep = 0pt,
minimum size=12},
transition/.style={rectangle, draw=black!50, fill=black!20, thick, inner sep = 0pt, minimum size=8}]
\node[place] (waiting) {};
\node[place] (critical) [below=of waiting] {};
\node[place] (semaphore) [below=of critical] {};
\node[transition] (leave critical) [right=of critical] {};
\node[transition] (enter critical) [left=of critical] {};
\node[red, above] at (semaphore.north) {$s \le 3$};
\end{tikzpicture}
\end{document}
有可能做这样的事吗?!...
提前致谢...
................................
编辑:根据应用的建议,上述代码可以工作......