다이어그램 내에 선택 과목 섹션을 삽입하는 방법

다이어그램 내에 선택 과목 섹션을 삽입하는 방법

이것은 이전 질문에 게시된 "성분" 섹션의 부록입니다.사용자 정의 주제 상관 관계 다이어그램을 그리는 방법.

두 가지 재료가 더 필요합니다.

  • 선택 과목을 만드세요. 우리는 그것을 다음과 같이 라벨링할 수 있습니다 nonfillable elective subject:

    채울 수 없는 선택 과목

    또한 다음과 같은 채울 수 있는 선택 과목이 있어야 합니다 fillable elective subject.

    채울 수 있는 선택 과목

    질문에서 말했듯이 사용할 수 있습니다이 매우 유용한 답변.

  • 선택 과목 세트를 포함하는 모양을 만듭니다.

    선택과목이 포함된 모양

(도형의 배경색과 의 모양 TextField이 다를 수 있으니 걱정하지 마세요.)

내가 필요한 것

  1. 마지막 모양은 모든 여백에 도달하지 않고 큰 주황색 직사각형의 아래쪽 부분에 있어야 합니다.
  2. 선택과목의 높이는 선택과목의 겹침에 따라 다를 수 있으나 너비는 항상 동일하지만 그 안의 선택과목은 중앙에 위치해야 합니다.

    예

  3. 선택 과목은 어떤 개체와도 관련이 없으므로 연한 파란색 모양의 너비를 줄일 수 있습니다.

내가 뭘 한거지

동일한 소스 코드마모트의 대답:

\documentclass{article}
\usepackage[showframe,margin=0in,footskip=0.25in,paperwidth=50cm,paperheight=20cm]{geometry}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
%\usepackage{globalvals}
\usepackage{hyperref}
\usepackage{tikz}
\usetikzlibrary{positioning,backgrounds,fit}
\tikzset{text field/.style={text height=1.5ex,align=center,rounded corners},
title field/.style={text height=2ex,text depth=0.3em,anchor=south,text
width=4.5cm,align=center,font=\footnotesize\sffamily},
pics/fillable subject/.style={code={%
\node[text field] (-TF) 
{\hspace*{-0.5em}\TextField[align=1,name=#1-day,width=1em,charsize=7pt,maxlen=2,bordercolor={1 1 1}]~~/\hspace*{-0.15em}\TextField[align=1,name=#1-month,width=1em,charsize=7pt,maxlen=2,bordercolor={1 1 1}]~~/\hspace*{-0em}\TextField[align=1,name=#1-year,width=2em,charsize=7pt,maxlen=4,bordercolor={1 1 1}]{}~};
\node[title field] (-Title) 
at ([yshift=0.4em]-TF.north) {#1};
\draw[rounded corners] (-TF.south west) |- (-Title.south west)
|- (-Title.north east) -- (-Title.south east) -| (-TF.south east)
 -- cycle;
\draw ([xshift=4pt]-Title.south west) -- ([xshift=-4pt]-Title.south east);
 }},
pics/nonfillable subject/.style={code={%
\node[text field] (-TF) 
{\hspace{1.2em}~/~\hspace{1.15em}~/~\hspace{2.35em}{}};
\node[title field] (-Title) 
at ([yshift=0.4em]-TF.north) {#1};
\draw[rounded corners] (-TF.south west) |- (-Title.south west)
|- (-Title.north east) -- (-Title.south east) -| (-TF.south east)
 -- cycle;
\draw ([xshift=4pt]-Title.south west) -- ([xshift=-4pt]-Title.south east);
 }}, 
 manoooh/.style={column sep=-2cm,row sep=5mm}
 }

\begin{document}

\thispagestyle{empty}   % To suppress page number

\noindent
\begin{tikzpicture}
\fill[white,fill=orange] (0,0) rectangle (\paperwidth,-2cm) node[midway,align=center,font=\Huge] {\bfseries Some text here\\\LARGE More text here};
\end{tikzpicture}

\vfill
\centering
\begin{tikzpicture}[node distance=3.14cm]
 % step 1: add the matrices, name them mat0, mat1 etc.
 \begin{scope}[local bounding box=matrices] 
  \matrix[manoooh] (mat0)  {
         \pic (A)  {nonfillable subject={Subject}}; & & 
         \pic (B)  {nonfillable subject={Subject}}; \\
         & \pic (C)  {nonfillable subject={Subject}}; & \\
         };
  \matrix[manoooh,right=of mat0] (mat1){
         \pic (D)  {nonfillable subject={Subject}}; \\ 
         \pic (E)  {nonfillable subject={Subject}}; \\
         \pic (F)  {nonfillable subject={Subject}}; \\ 
         \pic (G)  {nonfillable subject={Subject}}; \\ 
         };
  \matrix[manoooh,right=of mat1] (mat2)  {
         \pic (H)  {nonfillable subject={Subject}}; & & 
         \pic (I)  {nonfillable subject={Subject}}; \\
         & \pic (J)  {nonfillable subject={Subject}};  & \\
         \pic (K)  {nonfillable subject={Subject}}; 
         & &
         \pic (L)  {nonfillable subject={Subject}}; \\
         };
  \matrix[manoooh,right=of mat2] (mat3)  {
         & \pic (M)  {nonfillable subject={Subject}};  & \\
         \pic (N)  {nonfillable subject={Subject}}; & & 
         \pic (O)  {nonfillable subject={Subject}}; \\
         \pic (P)  {nonfillable subject={Subject}}; 
         & &
         \pic (Q)  {nonfillable subject={Subject}}; \\
         };
 \end{scope}
 \foreach \X in {0,...,3} %<- if you have more or less matrices, adjust 3       
 {\node[anchor=south,yshift=1cm,align=center,font=\LARGE\bfseries\boldmath] 
 at (mat\X |-matrices.north) (L\X) {Level $\X$};
 \begin{scope}[on background layer]
  % the fit parameters determine the shape of the background rectangles
  \node[fit=(L\X) (mat\X) (matrices.south-|mat\X.south),inner ysep=5mm,
  inner xsep=5mm,fill=orange!30,rounded corners=50pt](F\X){};
 \end{scope}}
 % now add the arrows 
 \foreach \X in {D,...,G}
 {\draw[blue,-latex] (B-Title) to[out=0,in=180] (\X-Title);}
\end{tikzpicture}

\vfill
\end{document}

matrixTi의 명령을 사용할 수도 있다고 생각합니다.케이Z 패키지를 사용하여 연한 파란색 모양 안에 그림을 배치할 수 있지만 다음 과 같은 새로운 유형을 정의해야 합니다 subject.(non)fillable elective subject

최종 결과

원래 질문과 유사하지만 이러한 새로운 모양을 추가하고 "레벨 X"와 연한 파란색 모양 사이에 있는 피사체를 수직으로 중앙에 배치합니다.

최종 결과

감사해요!!

답변1

업데이트된 질문에 대한 답변은 다음과 같습니다. (두 가지 답변을 추가하면 안 된다고 생각하는 분들을 위해: 그 중 하나를 기꺼이 제거하겠습니다. 그러나 다른 하나는 잠재적으로 다른 사람들에게 유용할 수 있다고 생각합니다.) 이전과 마찬가지로 전략은 계산된 거리를 작성하는 것입니다. 재컴파일 후에 사용할 수 있도록 aux 파일을 만듭니다.

\documentclass{article}
\usepackage[showframe,margin=0in,footskip=0.25in,paperwidth=54cm,paperheight=24cm]{geometry}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\usepackage{tikz}
\usetikzlibrary{positioning,backgrounds,fit,calc}
\tikzset{text field/.style={text height=1.5ex,align=center,rounded corners},
title field/.style={text height=2ex,text depth=0.3em,anchor=south,text
width=4.5cm,align=center,font=\footnotesize\sffamily},
pics/fillable subject/.style={code={%
\node[text field] (-TF) 
{\hspace*{-0.5em}\TextField[align=1,name=#1-day,width=1em,charsize=7pt,maxlen=2,bordercolor={1 1 1}]~~/\hspace*{-0.15em}\TextField[align=1,name=#1-month,width=1em,charsize=7pt,maxlen=2,bordercolor={1 1 1}]~~/\hspace*{-0em}\TextField[align=1,name=#1-year,width=2em,charsize=7pt,maxlen=4,bordercolor={1 1 1}]{}~};
\node[title field] (-Title) 
at ([yshift=0.4em]-TF.north) {#1};
\draw[rounded corners] (-TF.south west) |- (-Title.south west)
|- (-Title.north east) -- (-Title.south east) -| (-TF.south east)
 -- cycle;
\draw ([xshift=4pt]-Title.south west) -- ([xshift=-4pt]-Title.south east);
 }},
pics/nonfillable subject/.style={code={%
\node[text field] (-TF) 
{\hspace{1.2em}~/~\hspace{1.15em}~/~\hspace{2.35em}{}};
\node[title field] (-Title) 
at ([yshift=0.4em]-TF.north) {#1};
\draw[rounded corners] (-TF.south west) |- (-Title.south west)
|- (-Title.north east) -- (-Title.south east) -| (-TF.south east)
 -- cycle;
\draw ([xshift=4pt]-Title.south west) -- ([xshift=-4pt]-Title.south east);
 }}, 
 manoooh/.style={column sep=-1.75cm,row sep=5mm},
 manooohE/.style={column sep=-2.25cm,row sep=5mm,anchor=south},
 electives/.style={column sep=-2.25cm,row sep=5mm},
 fit sep/.initial=10pt,
 fit dist/.initial=20pt,
 inlay top sep/.initial=24pt,
 matrix top sep/.initial=24pt,
 }

\makeatletter% from https://tex.stackexchange.com/a/85531/121799
\long\def\ifnodedefined#1#2#3{%
    \@ifundefined{pgf@sh@ns@#1}{#3}{#2}%
}
\makeatother

\begin{document}
\thispagestyle{empty}   % To suppress page number
\noindent
\begin{tikzpicture}
\fill[white,fill=orange] (0,0) rectangle (\paperwidth,-2cm) node[midway,align=center,font=\Huge] {\bfseries Some text here\\\LARGE More text here};
\end{tikzpicture}

\ifdefined\mymatdist
%\typeout{got\space\mymatdist}
\else
\typeout{Please\space recompile\space your\space file!}
\def\mymatdist{150pt}
\fi
\ifdefined\mymatbottom
%\typeout{got\space\mymatbottom}
\else
\typeout{Please\space recompile\space your\space file!}
\def\mymatbottom{-150pt}
\fi
\ifdefined\myheight
\else
\def\myheight{0}
\typeout{Please\space recompile\space your\space file!}
\fi
\ifdefined\LstMatShifts
\else
\def\LstMatShifts{{0pt,0pt,0pt,0pt,0pt}}
\fi
%\typeout{height:\myheight}
%\typeout{shifts(in):\LstMatShifts}

\vfill
\centering
\begin{tikzpicture}[node distance=3.14cm]
 % step 1: add the matrices, name them mat0, mat1 etc.
 \begin{scope}[local bounding box=matrices] 
  \matrix[manoooh] (mat0) at (0*\mymatdist,{\LstMatShifts[0]}) {
         \pic[local bounding box=A] (A)  {nonfillable subject={Subject}}; & & 
         \pic (B)  {nonfillable subject={Subject}}; \\
         & \pic (C)  {nonfillable subject={Subject}}; & \\
         };
  \matrix[manooohE,column sep=8pt] (matE0)  at (0*\mymatdist,\mymatbottom) {
         \pic (AE)  {nonfillable subject={Subject}}; &  
         \pic (BE)  {nonfillable subject={Subject}}; \\
         \pic (CE)  {nonfillable subject={Subject}}; &  
         \pic (DE)  {nonfillable subject={Subject}}; \\         
         };       
  \matrix[manoooh] (mat1) at (1*\mymatdist,{\LstMatShifts[1]}) {
         \pic (D)  {nonfillable subject={Subject}}; \\ 
         \pic (E)  {nonfillable subject={Subject}}; \\
         \pic (F)  {nonfillable subject={Subject}}; \\ 
         \pic (G)  {nonfillable subject={Subject}}; \\ 
         \pic (D')  {nonfillable subject={Subject}}; \\ 
         \pic (E')  {nonfillable subject={Subject}}; \\
         \pic (F')  {nonfillable subject={Subject}}; \\ 
         \pic (G')  {nonfillable subject={Subject}}; \\ 
         };
  \matrix[manoooh] (mat2) at (2*\mymatdist,{\LstMatShifts[2]}) {
         \pic (H)  {nonfillable subject={Subject}}; & & 
         \pic (I)  {nonfillable subject={Subject}}; \\
         & \pic (J)  {nonfillable subject={Subject}};  & \\
         \pic (K)  {nonfillable subject={Subject}}; 
         & &
         \pic (L)  {nonfillable subject={Subject}}; \\
         };
  \matrix[manooohE] (matE2) at (2*\mymatdist,\mymatbottom) {
         \pic (HE)  {nonfillable subject={Subject}}; \\
         };       
  \matrix[manoooh] (mat3) at (3*\mymatdist,{\LstMatShifts[3]}) {
         & \pic (M)  {nonfillable subject={Subject}};  & \\
         \pic (N)  {nonfillable subject={Subject}}; & & 
         \pic (O)  {nonfillable subject={Subject}}; \\
         \pic (P)  {nonfillable subject={Subject}}; 
         & &
         \pic (Q)  {nonfillable subject={Subject}}; \\
         };
  \matrix[manooohE] (matE3) at (3*\mymatdist,\mymatbottom) {
         &\pic (ME)  {nonfillable subject={Subject}};  &\\
         \pic (NE)  {nonfillable subject={Subject}}; & &
         \pic (POE)  {nonfillable subject={Subject}}; \\
         \pic (PE)  {nonfillable subject={Subject}}; &  &
         \pic (QE)  {nonfillable subject={Subject}}; \\         
         };              
 \end{scope}
 \pgfmathsetmacro{\mywidth}{0}
 \foreach \X in {0,...,3} %<- if you have more or less matrices, adjust 3       
 {
  \ifnodedefined{matE\X}{% has inlay
   \path let \p1=($(mat\X.north east)-(mat\X.south west)$),
    \p2=($(matE\X.north east)-(matE\X.south west)$)
      in 
    \pgfextra{\pgfmathsetmacro{\mywidth}{max(\x1,\mywidth)}
     \pgfmathsetmacro{\myheight}{max(\y1+\y2+%
       \pgfkeysvalueof{/tikz/inlay top sep}+\pgfkeysvalueof{/tikz/matrix top sep},%
       \myheight)}
     \xdef\mywidth{\mywidth}\xdef\myheight{\myheight}
     \pgfmathsetmacro{\myshift}{(\pgfkeysvalueof{/tikz/inlay top sep}+\y2)/2}
     \ifnum\X=0
     \xdef\LstMatShifts{\myshift pt}
     \else
     \xdef\LstMatShifts{\LstMatShifts,\myshift pt}
     \fi};}{% no inlay
   \path 
    let \p1=($(mat\X.north east)-(mat\X.south west)$)  in 
  \pgfextra{\pgfmathsetmacro{\mywidth}{max(\x1,\mywidth)}
    \pgfmathsetmacro{\myheight}{max(\y1+\pgfkeysvalueof{/tikz/matrix top sep},\myheight)} 
    \xdef\mywidth{\mywidth}\xdef\myheight{\myheight}};
    \ifnum\X=0
    \xdef\LstMatShifts{0pt}
    \else
    \xdef\LstMatShifts{\LstMatShifts,0pt}
    \fi
     }
  \node[anchor=south,yshift=1cm,align=center,font=\LARGE\bfseries\boldmath] 
  at (mat\X |-matrices.north) (L\X) {Level $\X$};
  \begin{scope}[on background layer]
   % the fit parameters determine the shape of the background rectangles
   \node[fit=(L\X) (mat\X) (matrices.south-|mat\X.south),inner ysep=5mm,
   minimum width=\mymatdist-\pgfkeysvalueof{/tikz/fit dist}/2,
   fill=orange!30,rounded corners=50pt](F\X){};
  \end{scope}}
 %\typeout{height1:\myheight} % 
 %
 \pgfmathsetmacro{\mydist}{\mywidth+2*\pgfkeysvalueof{/tikz/fit
 sep}+\pgfkeysvalueof{/tikz/fit dist}}
 \xdef\mydist{\mydist}
 \def\mymatbottom{0pt}
 \foreach \X in {0,...,3} %
 {\ifnodedefined{matE\X}{\path let \p1=($(mat\X.north)-(mat\X.south)$),
      \p2=($(matE\X.north)-(matE\X.south)$),
      \n1={max(abs(\y1)/2+abs(\y2)+2*\pgfkeysvalueof{/tikz/inlay top sep},\mymatbottom)}
     in \pgfextra{\xdef\mymatbottom{\n1}}
     node[anchor=south east,xshift=-2cm,font=\LARGE\bfseries] (El\X)
      at (matE\X.north){Electives};
  \begin{scope}[on background layer]      
    \node[fit=(matE\X) (El\X)] (FE\X){};
    \fill[blue!30,rounded corners=30pt] (\X*\mymatdist-
    \mymatdist/2+\pgfkeysvalueof{/tikz/fit dist}/4+10pt,0|-FE\X.north)
    rectangle (\X*\mymatdist+
    \mymatdist/2-\pgfkeysvalueof{/tikz/fit dist}/4-10pt,0|-FE\X.south);
  \end{scope}}{}}
 %\typeout{shifts(end):\LstMatShifts} 
 \makeatletter
 \immediate\write\@mainaux{\xdef\string\mymatdist{\mydist pt}\relax}
 \immediate\write\@mainaux{\xdef\string\mymatbottom{-\mymatbottom}\relax}
 \immediate\write\@mainaux{\xdef\string\myheight{\myheight}\relax}
 \immediate\write\@mainaux{\xdef\string\LstMatShifts{{\LstMatShifts}}\relax}
 \makeatother

 % now add the arrows 
 \foreach \X in {D,...,G}
 {\draw[blue,-latex] (B-Title) to[out=0,in=180] (\X-Title);}
\end{tikzpicture}

\vfill
\end{document}

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

답변2

가장 큰 문제는 아직 tikz 행렬을 중첩(?)할 수 없다는 것입니다. 따라서 이 제안은 약간 다른 전략을 따르는데, 이는 개념적으로 다음과 거의 동일합니다.여기에 사용된 것:

  1. 몇 가지 추측된 거리를 사용하여 행렬을 구축합니다.
  2. 행렬을 측정합니다.
  3. 측정된 값으로부터 "최적" 거리를 계산합니다.
  4. 재컴파일 후에 사용할 수 있도록 aux 파일에 "최적" 거리를 기록합니다.

이 예에는 무슨 일이 일어나고 있는지 이해하는 데 도움이 되는 많은 주석이 있습니다. 또한 실제 인레이를 반복해야 합니다. 즉, 인레이를 추가하거나 제거하려면 를 수정해야 할 수도 있습니다 \foreach \X in {0,2,3}.

\documentclass{article}
\usepackage[showframe,margin=0in,footskip=0.25in,paperwidth=54cm,paperheight=20cm]{geometry}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\usepackage{tikz}
\usetikzlibrary{positioning,backgrounds,fit,calc}
\tikzset{text field/.style={text height=1.5ex,align=center,rounded corners},
title field/.style={text height=2ex,text depth=0.3em,anchor=south,text
width=4.5cm,align=center,font=\footnotesize\sffamily},
pics/fillable subject/.style={code={%
\node[text field] (-TF) 
{\hspace*{-0.5em}\TextField[align=1,name=#1-day,width=1em,charsize=7pt,maxlen=2,bordercolor={1 1 1}]~~/\hspace*{-0.15em}\TextField[align=1,name=#1-month,width=1em,charsize=7pt,maxlen=2,bordercolor={1 1 1}]~~/\hspace*{-0em}\TextField[align=1,name=#1-year,width=2em,charsize=7pt,maxlen=4,bordercolor={1 1 1}]{}~};
\node[title field] (-Title) 
at ([yshift=0.4em]-TF.north) {#1};
\draw[rounded corners] (-TF.south west) |- (-Title.south west)
|- (-Title.north east) -- (-Title.south east) -| (-TF.south east)
 -- cycle;
\draw ([xshift=4pt]-Title.south west) -- ([xshift=-4pt]-Title.south east);
 }},
pics/nonfillable subject/.style={code={%
\node[text field] (-TF) 
{\hspace{1.2em}~/~\hspace{1.15em}~/~\hspace{2.35em}{}};
\node[title field] (-Title) 
at ([yshift=0.4em]-TF.north) {#1};
\draw[rounded corners] (-TF.south west) |- (-Title.south west)
|- (-Title.north east) -- (-Title.south east) -| (-TF.south east)
 -- cycle;
\draw ([xshift=4pt]-Title.south west) -- ([xshift=-4pt]-Title.south east);
 }}, 
 manoooh/.style={column sep=-1.75cm,row sep=5mm},
 manooohE/.style={column sep=-2.25cm,row sep=5mm,anchor=south},
 wrapper/.style={fit=#1,inner sep=0pt,minimum width=\useVal{matrix_width}}
 electives/.style={column sep=-2.25cm,row sep=5mm},
 fit sep/.initial=10pt,
 fit dist/.initial=20pt,
 inlay top sep/.initial=24pt
 }

\begin{document}
\thispagestyle{empty}   % To suppress page number
\noindent
\begin{tikzpicture}
\fill[white,fill=orange] (0,0) rectangle (\paperwidth,-2cm) node[midway,align=center,font=\Huge] {\bfseries Some text here\\\LARGE More text here};
\end{tikzpicture}

\ifdefined\mymatdist
%\typeout{got\space\mymatdist}
\else
\typeout{Please\space recompile\space your\space file!}
\def\mymatdist{150pt}
\fi
\ifdefined\mymatbottom
%\typeout{got\space\mymatbottom}
\else
\typeout{Please\space recompile\space your\space file!}
\def\mymatbottom{-150pt}
\fi


\vfill
\centering
\begin{tikzpicture}[node distance=3.14cm]
 % step 1: add the matrices, name them mat0, mat1 etc.
 \begin{scope}[local bounding box=matrices] 
  \matrix[manoooh] (mat0) at (0*\mymatdist,0) {
         \pic[local bounding box=A] (A)  {nonfillable subject={Subject}}; & & 
         \pic (B)  {nonfillable subject={Subject}}; \\
         & \pic (C)  {nonfillable subject={Subject}}; & \\
         };
  \matrix[manooohE,column sep=8pt] (matE0)  at (0*\mymatdist,\mymatbottom) {
         \pic (AE)  {nonfillable subject={Subject}}; &  
         \pic (BE)  {nonfillable subject={Subject}}; \\
         \pic (CE)  {nonfillable subject={Subject}}; &  
         \pic (DE)  {nonfillable subject={Subject}}; \\         
         };       
  \matrix[manoooh] (mat1) at (1*\mymatdist,0) {
         \pic (D)  {nonfillable subject={Subject}}; \\ 
         \pic (E)  {nonfillable subject={Subject}}; \\
         \pic (F)  {nonfillable subject={Subject}}; \\ 
         \pic (G)  {nonfillable subject={Subject}}; \\ 
         };
  \matrix[manoooh] (mat2) at (2*\mymatdist,0) {
         \pic (H)  {nonfillable subject={Subject}}; & & 
         \pic (I)  {nonfillable subject={Subject}}; \\
         & \pic (J)  {nonfillable subject={Subject}};  & \\
         \pic (K)  {nonfillable subject={Subject}}; 
         & &
         \pic (L)  {nonfillable subject={Subject}}; \\
         };
  \matrix[manooohE] (matE2) at (2*\mymatdist,\mymatbottom) {
         \pic (HE)  {nonfillable subject={Subject}}; \\
         };       
  \matrix[manoooh] (mat3) at (3*\mymatdist,0) {
         & \pic (M)  {nonfillable subject={Subject}};  & \\
         \pic (N)  {nonfillable subject={Subject}}; & & 
         \pic (O)  {nonfillable subject={Subject}}; \\
         \pic (P)  {nonfillable subject={Subject}}; 
         & &
         \pic (Q)  {nonfillable subject={Subject}}; \\
         };
  \matrix[manooohE] (matE3) at (3*\mymatdist,\mymatbottom) {
         &\pic (ME)  {nonfillable subject={Subject}};  &\\
         \pic (NE)  {nonfillable subject={Subject}}; & &
         \pic (POE)  {nonfillable subject={Subject}}; \\
         \pic (PE)  {nonfillable subject={Subject}}; &  &
         \pic (QE)  {nonfillable subject={Subject}}; \\         
         };              
 \end{scope}
 \pgfmathsetmacro{\mywidth}{0pt}
 \foreach \X in {0,...,3} %<- if you have more or less matrices, adjust 3       
 {\path let \p1=($(mat\X.east)-(mat\X.west)$) in 
 \pgfextra{\pgfmathsetmacro{\mywidth}{max(\x1,\mywidth)}
 \xdef\mywidth{\mywidth}};
 \node[anchor=south,yshift=1cm,align=center,font=\LARGE\bfseries\boldmath] 
 at (mat\X |-matrices.north) (L\X) {Level $\X$};
 \begin{scope}[on background layer]
  % the fit parameters determine the shape of the background rectangles
  \node[fit=(L\X) (mat\X) (matrices.south-|mat\X.south),inner ysep=5mm,
  minimum width=\mymatdist-\pgfkeysvalueof{/tikz/fit dist}/2,
  fill=orange!30,rounded corners=50pt](F\X){};
 \end{scope}}
 %\xdef\mydist{\mydist}
 \pgfmathsetmacro{\mydist}{\mywidth+2*\pgfkeysvalueof{/tikz/fit
 sep}+\pgfkeysvalueof{/tikz/fit dist}}
 \xdef\mydist{\mydist}
 \def\mymatbottom{0pt}
 \foreach \X in {0,2,3} %<run only over those entries that have inlays
 {\path let \p1=($(mat\X.north)-(mat\X.south)$),
      \p2=($(matE\X.north)-(matE\X.south)$),
      \n1={max(abs(\y1)/2+abs(\y2)+2*\pgfkeysvalueof{/tikz/inlay top sep},\mymatbottom)}
     in \pgfextra{\xdef\mymatbottom{\n1}}
     node[anchor=south east,xshift=-2cm,font=\LARGE\bfseries] (El\X)
      at (matE\X.north){Electives};
  \begin{scope}[on background layer]      
    \node[fit=(matE\X) (El\X)] (FE\X){};
    \fill[blue!30,rounded corners=30pt] (\X*\mymatdist-
    \mymatdist/2+\pgfkeysvalueof{/tikz/fit dist}/4+10pt,0|-FE\X.north)
    rectangle (\X*\mymatdist+
    \mymatdist/2-\pgfkeysvalueof{/tikz/fit dist}/4-10pt,0|-FE\X.south);
  \end{scope}}
 \makeatletter
 \immediate\write\@mainaux{\xdef\string\mymatdist{\mydist pt}\relax}
 \immediate\write\@mainaux{\xdef\string\mymatbottom{-\mymatbottom}\relax}
 \makeatother

 % now add the arrows 
 \foreach \X in {D,...,G}
 {\draw[blue,-latex] (B-Title) to[out=0,in=180] (\X-Title);}
\end{tikzpicture}

\vfill
\end{document}

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

이는 스크린샷에 더 가까운 주석이 포함된 두 번째 예입니다.

\documentclass{article}
\usepackage[showframe,margin=0in,footskip=0.25in,paperwidth=54cm,paperheight=24cm]{geometry}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\usepackage{tikz}
\usetikzlibrary{positioning,backgrounds,fit,calc}
\tikzset{text field/.style={text height=1.5ex,align=center,rounded corners},
title field/.style={text height=2ex,text depth=0.3em,anchor=south,text
width=4.5cm,align=center,font=\footnotesize\sffamily},
pics/fillable subject/.style={code={%
\node[text field] (-TF) 
{\hspace*{-0.5em}\TextField[align=1,name=#1-day,width=1em,charsize=7pt,maxlen=2,bordercolor={1 1 1}]~~/\hspace*{-0.15em}\TextField[align=1,name=#1-month,width=1em,charsize=7pt,maxlen=2,bordercolor={1 1 1}]~~/\hspace*{-0em}\TextField[align=1,name=#1-year,width=2em,charsize=7pt,maxlen=4,bordercolor={1 1 1}]{}~};
\node[title field] (-Title) 
at ([yshift=0.4em]-TF.north) {#1};
\draw[rounded corners] (-TF.south west) |- (-Title.south west)
|- (-Title.north east) -- (-Title.south east) -| (-TF.south east)
 -- cycle;
\draw ([xshift=4pt]-Title.south west) -- ([xshift=-4pt]-Title.south east);
 }},
pics/nonfillable subject/.style={code={%
\node[text field] (-TF) 
{\hspace{1.2em}~/~\hspace{1.15em}~/~\hspace{2.35em}{}};
\node[title field] (-Title) 
at ([yshift=0.4em]-TF.north) {#1};
\draw[rounded corners] (-TF.south west) |- (-Title.south west)
|- (-Title.north east) -- (-Title.south east) -| (-TF.south east)
 -- cycle;
\draw ([xshift=4pt]-Title.south west) -- ([xshift=-4pt]-Title.south east);
 }}, 
 manoooh/.style={column sep=-1.75cm,row sep=5mm},
 manooohE/.style={column sep=-2.25cm,row sep=5mm,anchor=south},
 wrapper/.style={fit=#1,inner sep=0pt,minimum width=\useVal{matrix_width}}
 electives/.style={column sep=-2.25cm,row sep=5mm},
 fit sep/.initial=10pt,
 fit dist/.initial=20pt,
 inlay top sep/.initial=24pt
 }

\begin{document}
\thispagestyle{empty}   % To suppress page number
\noindent
\begin{tikzpicture}
\fill[white,fill=orange] (0,0) rectangle (\paperwidth,-2cm) node[midway,align=center,font=\Huge] {\bfseries Some text here\\\LARGE More text here};
\end{tikzpicture}

\ifdefined\mymatdist
%\typeout{got\space\mymatdist}
\else
\typeout{Please\space recompile\space your\space file!}
\def\mymatdist{150pt}
\fi
\ifdefined\mymatbottom
%\typeout{got\space\mymatbottom}
\else
\typeout{Please\space recompile\space your\space file!}
\def\mymatbottom{-150pt}
\fi


\vfill
\centering
\begin{tikzpicture}[node distance=3.14cm]
 % step 1: add the matrices, name them mat0, mat1 etc.
 \begin{scope}[local bounding box=matrices] 
  \matrix[manoooh] (mat0) at (0*\mymatdist,0) {
         \pic[local bounding box=A] (A)  {nonfillable subject={Subject}}; & & 
         \pic (B)  {nonfillable subject={Subject}}; \\
         & \pic (C)  {nonfillable subject={Subject}}; & \\
         };
  \matrix[manooohE,column sep=8pt] (matE0)  at (0*\mymatdist,\mymatbottom) {
         \pic (AE)  {nonfillable subject={Subject}}; &  
         \pic (BE)  {nonfillable subject={Subject}}; \\
         \pic (CE)  {nonfillable subject={Subject}}; &  
         \pic (DE)  {nonfillable subject={Subject}}; \\         
         };       
  \matrix[manoooh] (mat1) at (1*\mymatdist,0) {
         \pic (D)  {nonfillable subject={Subject}}; \\ 
         \pic (E)  {nonfillable subject={Subject}}; \\
         \pic (F)  {nonfillable subject={Subject}}; \\ 
         \pic (G)  {nonfillable subject={Subject}}; \\ 
         \pic (D')  {nonfillable subject={Subject}}; \\ 
         \pic (E')  {nonfillable subject={Subject}}; \\
         \pic (F')  {nonfillable subject={Subject}}; \\ 
         \pic (G')  {nonfillable subject={Subject}}; \\ 
         };
  \matrix[manoooh] (mat2) at (2*\mymatdist,0) {
         \pic (H)  {nonfillable subject={Subject}}; & & 
         \pic (I)  {nonfillable subject={Subject}}; \\
         & \pic (J)  {nonfillable subject={Subject}};  & \\
         \pic (K)  {nonfillable subject={Subject}}; 
         & &
         \pic (L)  {nonfillable subject={Subject}}; \\
         };
  \matrix[manooohE] (matE2) at (2*\mymatdist,\mymatbottom) {
         \pic (HE)  {nonfillable subject={Subject}}; \\
         };       
  \matrix[manoooh] (mat3) at (3*\mymatdist,0) {
         & \pic (M)  {nonfillable subject={Subject}};  & \\
         \pic (N)  {nonfillable subject={Subject}}; & & 
         \pic (O)  {nonfillable subject={Subject}}; \\
         \pic (P)  {nonfillable subject={Subject}}; 
         & &
         \pic (Q)  {nonfillable subject={Subject}}; \\
         };
  \matrix[manooohE] (matE3) at (3*\mymatdist,\mymatbottom) {
         &\pic (ME)  {nonfillable subject={Subject}};  &\\
         \pic (NE)  {nonfillable subject={Subject}}; & &
         \pic (POE)  {nonfillable subject={Subject}}; \\
         \pic (PE)  {nonfillable subject={Subject}}; &  &
         \pic (QE)  {nonfillable subject={Subject}}; \\         
         };              
 \end{scope}
 \pgfmathsetmacro{\mywidth}{0pt}
 \foreach \X in {0,...,3} %<- if you have more or less matrices, adjust 3       
 {\path let \p1=($(mat\X.east)-(mat\X.west)$) in 
 \pgfextra{\pgfmathsetmacro{\mywidth}{max(\x1,\mywidth)}
 \xdef\mywidth{\mywidth}};
 \node[anchor=south,yshift=1cm,align=center,font=\LARGE\bfseries\boldmath] 
 at (mat\X |-matrices.north) (L\X) {Level $\X$};
 \begin{scope}[on background layer]
  % the fit parameters determine the shape of the background rectangles
  \node[fit=(L\X) (mat\X) (matrices.south-|mat\X.south),inner ysep=5mm,
  minimum width=\mymatdist-\pgfkeysvalueof{/tikz/fit dist}/2,
  fill=orange!30,rounded corners=50pt](F\X){};
 \end{scope}}
 %\xdef\mydist{\mydist}
 \pgfmathsetmacro{\mydist}{\mywidth+2*\pgfkeysvalueof{/tikz/fit
 sep}+\pgfkeysvalueof{/tikz/fit dist}}
 \xdef\mydist{\mydist}
 \def\mymatbottom{0pt}
 \foreach \X in {0,2,3} %<run only over those entries that have inlays
 {\path let \p1=($(mat\X.north)-(mat\X.south)$),
      \p2=($(matE\X.north)-(matE\X.south)$),
      \n1={max(abs(\y1)/2+abs(\y2)+2*\pgfkeysvalueof{/tikz/inlay top sep},\mymatbottom)}
     in \pgfextra{\xdef\mymatbottom{\n1}}
     node[anchor=south east,xshift=-2cm,font=\LARGE\bfseries] (El\X)
      at (matE\X.north){Electives};
  \begin{scope}[on background layer]      
    \node[fit=(matE\X) (El\X)] (FE\X){};
    \fill[blue!30,rounded corners=30pt] (\X*\mymatdist-
    \mymatdist/2+\pgfkeysvalueof{/tikz/fit dist}/4+10pt,0|-FE\X.north)
    rectangle (\X*\mymatdist+
    \mymatdist/2-\pgfkeysvalueof{/tikz/fit dist}/4-10pt,0|-FE\X.south);
  \end{scope}}
 \makeatletter
 \immediate\write\@mainaux{\xdef\string\mymatdist{\mydist pt}\relax}
 \immediate\write\@mainaux{\xdef\string\mymatbottom{-\mymatbottom}\relax}
 \makeatother

 % now add the arrows 
 \foreach \X in {D,...,G}
 {\draw[blue,-latex] (B-Title) to[out=0,in=180] (\X-Title);}
 \foreach \X in {0,...,3}
 {\node[circle,red,inner sep=4pt,fill,label={[font=\Huge,text=red]above:mat \X\ center}] (c\X) at 
 (mat\X.center){};
 \unless\ifnum\X=1
 \node[circle,blue,inner sep=4pt,fill,
 label={[font=\Huge,text=blue]above:matE \X' south}] (c\X') at 
 (matE\X.south){};
 \fi
 }
\end{tikzpicture}

\vfill
\end{document}

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

관련 정보