
노드 경계에 일부 하위 노드를 배치하고 싶습니다. 이것이 내가 가진 것입니다:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\node[rectangle, draw, inner sep=10pt] (Foo) {Foo};
\node[rectangle, draw, fill=white, left=3pt of Foo.south] {\tiny S};
\node[rectangle, draw, fill=white, right=3pt of Foo.south] {\tiny T};
\end{tikzpicture}
\end{document}
결과는 다음과 같습니다.
하지만 이제 타원을 모양으로 사용하고 싶습니다.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning,shapes}
\begin{document}
\begin{tikzpicture}
\node[ellipse, draw, inner sep=10pt] (Foo) {Foo};
\node[ellipse, draw, fill=white, left=3pt of Foo.south] {\tiny S};
\node[ellipse, draw, fill=white, right=3pt of Foo.south] {\tiny T};
\end{tikzpicture}
\end{document}
그리고 놀랍게도 하위 노드는 더 이상 경계에 배치되지 않고 약간 아래에 배치됩니다(그러나 여전히 기본 노드 위에 겹쳐질 만큼 충분히 큽니다).
해당 하위 노드를 기본 노드의 경계에 정확히 배치하려면 어떻게 해야 합니까?
답변1
위치 지정 대신 다음과 같이 되기를 원하므로 모양 테두리에 명시적으로 배치할 수 있습니다.
\node[ellipse, draw, fill=white] at (Foo.-70) {\tiny T};
충분할 수 있습니다. 필요한 경우 shift=(<x amount>,<y amount>)
미세 조정에 사용할 수 있습니다 .