为什么“每个节点”在范围环境中不起作用?

为什么“每个节点”在范围环境中不起作用?

我刚刚尝试了以下操作但惊讶的是它不起作用:

\begin{tikzpicture}
  ... some commands

  \begin{scope}[very thick,
    every node=./style={circle, fill=white, minimum size=1.2mm, inner sep=0pt}
    ]

    \node {};
  \end{scope}

  ... other commands

\end{tikzpicture}

结果是

! Package pgfkeys Error: I do not know the key '/tikz/every node./style' 
and I am going to ignore it. Perhaps you misspelled it.

如何every nodescope环境中提供?

答案1

语法上有错别字。请将您的版本与此版本进行比较。

\begin{scope}[
  very thick,
  every node/.style={   % <<< here was your typo
    circle,
    fill=white,
    minimum size=1.2mm,
    inner sep=0pt
  }
]

  \node {};
\end{scope}

相关内容