![如何概述课程/课程树?](https://linux22.com/image/385906/%E5%A6%82%E4%BD%95%E6%A6%82%E8%BF%B0%E8%AF%BE%E7%A8%8B%2F%E8%AF%BE%E7%A8%8B%E6%A0%91%EF%BC%9F.png)
答案1
这不是答案,而是告诉你手工绘制这个需要多少努力。我希望看到另一个更自动化的答案,从而学到一些新东西。
\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{positioning,fit}
\begin{document}
\begin{tikzpicture}[course/.style={draw,minimum width=2cm,minimum
height=8mm,node contents={Course #1},name=n#1},
font=\sffamily,node distance=2cm and 1cm]
\node[course=1];
\node[right=of n1,course=2];
\node[right=of n2,course=3];
\node[below=of n1,course=5];
\node[right=of n5,course=6];
\node[right=1.8cm of n6,course=4];
%
\node[below=of n5,course=9];
\node[right=2.3cm of n9,course=7];
\node[right=of n7,course=8];
\node[below right=2cm and -0.5cm of n9,course=10];
\node[right=1.8cm of n10,course=11];
\node[right=of n11,course=12];
%
\begin{scope}[thick]
\draw (n1) -- (n5) coordinate[midway] (aux1)
(n6.140) |- (aux1) (n2) -- (n6)
(n6.-40) coordinate(aux2) -- (n7.north -| aux2)
(n3.-155) coordinate(aux3) -- (n7.north -| aux3)
(n9.-35) coordinate(aux4) -- (n10.north -| aux4)
(n12.40) |- (n4)
(n7.south) -- ++ (0,-0.4) coordinate(aux5) -| (n10)
(aux5) -| (n12);
%
\node[fit=(n1) (n4),inner xsep=8mm,inner ysep=2mm] (fit1){};
\draw ([xshift=2mm]fit1.south west) -| (fit1.north west)
node[pos=0.75,left=3mm,font=\sffamily\bfseries]{Level 1} -- ++(2mm,0);
%
\node[fit=(n9) (n12),inner xsep=8mm,inner ysep=2mm] (fit2){};
\draw ([xshift=2mm]fit2.south west) -| (fit2.north west)
node[pos=0.75,left=3mm,font=\sffamily\bfseries]{Level 2} -- ++(2mm,0);
\end{scope}
\end{tikzpicture}
\end{document}