노드를 트리 오른쪽에 배치

노드를 트리 오른쪽에 배치

나는 현재 다음을 가지고 있습니다 :

\begin{forest}
for tree={
draw,
minimum height=2cm,
anchor=north,
align=center,
child anchor=north
},
[{Size 5}, align=center, name=SS
[{Size 1 \\ Size 2\\ Size 3}]
[{Size 6 \\ Size 9 \\ Size 10}] 
]
\end{forest}

\tikz \node[draw,circle, text width=3cm,align=center]{Un-tested shoes: \\ Size 4 \\ Size    5 \\ Size 7 \\ Size 8};

그 결과 원형 노드가 있는 트리가 생성됩니다. 하지만 저는 노드를 트리 오른쪽에 배치하고 싶습니다.

이 작업을 어떻게 수행할 수 있는지 아시나요?

감사합니다.

답변1

빈 줄을 두지 마십시오(이는 에 대한 새 단락을 시작하는 것과 같습니다 tikzpicture).

\documentclass{article}
\usepackage{forest}

\begin{document}

\begin{forest}
for tree={
draw,
minimum height=2cm,
anchor=north,
align=center,
child anchor=north
},
[{Size 5}, align=center, name=SS
[{Size 1 \\ Size 2\\ Size 3}]
[{Size 6 \\ Size 9 \\ Size 10}] 
]
\end{forest}\quad
\tikz\node[draw,circle, text width=3cm,align=center]
{Un-tested shoes: \\ Size 4 \\ Size    5 \\ Size 7 \\ Size 8};


\end{document}

여기에 이미지 설명을 입력하세요

그러나 원하는 것을 달성하기 위해 두 개의 별도 구성이 필요하지 않습니다. 의 일부 노드에 이름을 지정한 forest다음 이 이름을 사용하여 at (<name>)synatx 및 적절한 앵커를 사용하여 원하는 새 요소를 배치할 수 있습니다.

\documentclass{article}
\usepackage{forest}

\begin{document}

\begin{forest}
for tree={
draw,
minimum height=2cm,
anchor=north,
align=center,
child anchor=north
},
[{Size 5}, align=center, name=SS
[{Size 1 \\ Size 2\\ Size 3}]
[{Size 6 \\ Size 9 \\ Size 10},name=aux] 
]
\node[draw,circle, text width=3cm,align=center,anchor=south west]
  at ([xshift=1cm]aux.east)
  {Un-tested shoes: \\ Size 4 \\ Size    5 \\ Size 7 \\ Size 8};
\end{forest}


\end{document}

여기에 이미지 설명을 입력하세요

관련 정보