
我出於興趣問自己:是否有可能mark=<...>
在 a 上加上 a \coordinate
?
\documentclass[margin=3cm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\coordinate[label={[mark=*, text=red,left]:A}] (A) at (0,2);
\end{tikzpicture}
\end{document}
註:方法
\foreach \P in {....} \draw[fill=white] (\P) circle (1.5pt);
清楚了。
答案1
為了它的價值。這增加了情節標記和尊重mark options
。
\documentclass[margin=3cm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[cmark/.style={append after command={plot[only marks,mark=#1] coordinates {(\tikzlastnode)}}}]
\coordinate[label={[text=red,left]:A},cmark={*,mark options={fill=white}}]
(A) at (0,2);
\path (2,2) node[circle,inner sep=1.5pt,draw,label={[text=red,left]:B}] (B){} ;
\draw[stealth-stealth] (A) to[out=90,in=90] (B);
\end{tikzpicture}
\end{document}
B
但請注意,與使用節點的選項相比,我沒有看到任何優勢。相反,我看到了一個缺點,因為如果用箭頭連接它們中的任何一個,則只有節點知道邊界,如圖所示。 (當然,在節點情況下,您也可以透過使用B.center
而不是B
在圓弧路徑中連接到中心。)