我经常绘制 tikz 图,其中我分别指定节点和标签:
\tikzset{%
dot/.style={circle, draw, fill=black, inner sep=0pt, minimum width=4pt},
top/.style={anchor=south, inner sep=5pt},
}
\begin{tikzpicture}
\node[dot] (A) at (0,0) {};
\node[top] at (A) {label};
\end{tikzpicture}
这完全没问题,但感觉可以写得更简洁,例如:
\node[dot-top] (A) at (0,0) {label};
我该如何做呢?