LaTex로 이 그림을 그리는 방법은 무엇입니까? TikZ/PGF?

LaTex로 이 그림을 그리는 방법은 무엇입니까? TikZ/PGF?

나는 다음과 같은 그림을 그리고 싶다.

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

때문에 어렵다고 생각해요

  • 각 직사각형은 크기가 비슷하며 내부에 여러 줄의 텍스트가 있습니다.
  • 직사각형의 오른쪽 상단 모서리 중 일부에는 숫자가 있습니다.
  • 나는 직사각형 IV에서 발사되는 네 개의 화살을 다룰 수 없습니다.
  • 직사각형 X를 찾는 방법을 모릅니다.
  • 저는 이런 그래프를 그려본 적도 없고 전략도 없습니다.

내 질문이 포럼의 규범을 위반했을 수도 있지만 다른 방법이 없습니다.

답변1

(거의 거의) 모든 질문에는 수행하려는 작업과 최소한 어느 정도 관련이 있는 최소한의 예가 포함되어야 합니다. 예를 들어 작업 중인 텍스트 콘텐츠와 기본 문서 프레임워크가 포함되어 있습니다.


한 가지 방법은 다음과 같습니다.

\documentclass[tikz,multi,border=10pt]{standalone}
\usepackage[edges]{forest}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{forest}
  forked edges,
  /tikz/>/.tip={Stealth[]},
  my label/.style={%
    tikz+={\node [font=\scriptsize, anchor=south east] at (.north east) {#1};}
  },
  for tree={%
    draw,
    align=center,
    minimum height=20mm,
    minimum width=30mm,
    anchor=center,
    font=\scshape,
    l sep'=10mm,
    edge={->},
    s sep'=10mm,
  }
  [Introduction\\Sets, my label=1
    [I\\Groups, l sep'=20mm, my label={2,3}
      [II\\Structure\\of Groups, edge path'={(!u.west) |- (.child anchor)}, before computing xy={l'=20mm}]
      [III\\Rings, my label={2,3}
        [IV\\Modules, edge+={densely dashed}, my label={2,3,4}
          [V\\Galois\\Theory, my label={2,5}
            [VI\\Structure\\of Fields, my label=6]
          ]
          [VII\\Linear\\Algebra]
          [VIII\\Commutative\\Rings \&\\Modules, tikz+={\draw [->, densely dashed] (.east) -- (!n.west);}, my label=?]
          [IX\\Structure\\of Rings, my label={8,9,10}]
        ]
      ]
      [X\\Categories, no edge, before computing xy={l'=20mm}, my label=11]
    ]
  ]
\end{forest}
\end{document}

산림 솔루션

답변2

나는 질문의 발표자입니다. 수정 대기 중인 답변이 있습니다. 대부분의 답변은링크. 답변이 틀리기 전, 후@cfr열성적인 지도를 받아 드디어 완성되었습니다.

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes,fit,calc,positioning,arrows}
\begin{document}

\begin{tikzpicture}
\newlength{\hrrth}\setlength{\hrrth}{10mm}
\newlength{\wrrth}\setlength{\wrrth}{30mm}
\tikzset{box/.style={draw, rectangle, thick, text centered, minimum width=\wrrth, minimum height=20mm, align=center}}
\tikzset{line/.style={draw, thick, -latex' }}

\node [box] (O) {Introduction\\ Sets};
\node [box, below=\hrrth of O](I){I\\ Groups};
\node [below=\hrrth of I](Ia){};
\node [box, left=\wrrth of Ia](II){II\\ Structure\\ of Groups};
\node [box, below=\hrrth of I](III){III\\ Rings};
\node [box, below=\hrrth of III](IV){IV\\ Modules};
\coordinate[below=0.5\hrrth of IV](lline){};
\node [box, below=\hrrth of lline, xshift=-1.8\wrrth](V){V\\ Galoi Theory};
\node [box, below=\hrrth of V](VI){VI\\ Structure\\ of Fields};
\node [box, below=\hrrth of lline, xshift=-0.6\wrrth](VII){VII\\ Linear\\ Algebra};
\node [box, below=\hrrth of lline, xshift=0.6\wrrth](VIII){VIII\\ Commutative\\ Rings\\ \& Modules};
\node [box, below=\hrrth of lline, xshift=1.8\wrrth](IX){IX\\ Structure\\ of Rings};
\node [box, right=\wrrth of Ia](X){X\\ Categories};

\path [line] (O) -- (I);
\path [line] (I) -| (II);
\path [line] (I) -- (III);
\path [line,dashed] (III) -- (IV);
\draw [thick] (IV) -- (lline);
\path [line] (lline) -| (V);
\path [line] (lline) -| (VII);
\path [line] (lline) -| (VIII);
\path [line] (lline) -| (IX);
\path [line,dashed] (VIII) -- (IX);
\path [line] (V) -- (VI);


\node [above=0pt of O.north east, anchor=south east, font=\small] {1};
\node [above=0pt of I.north east, anchor=south east, font=\small] {2,3};
\node [above=0pt of III.north east, anchor=south east, font=\small] {2,3};
\node [above=0pt of IV.north east, anchor=south east, font=\small] {2,3,4};
\node [above=0pt of V.north east, anchor=south east, font=\small] {2,5};
\node [above=0pt of VI.north east, anchor=south east, font=\small] {6};
\node [above=0pt of VII.north east, anchor=south east, font=\small] {2,3};
\node [above=0pt of VIII.north east, anchor=south east, font=\small] {7};
\node [above=0pt of IX.north east, anchor=south east, font=\small] {8,9,10};
\node [above=0pt of X.north east, anchor=south east, font=\small] {11};

\end{tikzpicture}
\end{document} 

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

관련 정보