How to insert elective subjects section within a diagramWrite information on aux file when using include to build documentHow to draw a diagram of custom subject correlativitiesHow to draw multiple fillable PDF forms inside a rectangle using `tikzpicture` environmentArrow within a signal (timing diagram)Drawing electromagnetic tetrahedron diagram having text within node connectionsThe easiest way to draw a diagram within a textTikZ/ERD: node (=Entity) label on the insideHow can I insert a picture into a TikZ diagram?Tikz Diagram: Block Diagramuse circuitikz picture inside tikzpictureInsert a graphic within a sentence nicely?How to draw Adjacency Diagram?How to draw a diagram of custom subject correlativities

How are passwords stolen from companies if they only store hashes?

PTIJ: Who should I vote for? (21st Knesset Edition)

World War I as a war of liberals against authoritarians?

How to make healing in an exploration game interesting

A single argument pattern definition applies to multiple-argument patterns?

Print a physical multiplication table

Meme-controlled people

Welcoming 2019 Pi day: How to draw the letter π?

Is a party consisting of only a bard, a cleric, and a warlock functional long-term?

What are substitutions for coconut in curry?

Bach's Toccata and Fugue in D minor breaks the "no parallel octaves" rule?

Professor being mistaken for a grad student

Official degrees of earth’s rotation per day

Why is the President allowed to veto a cancellation of emergency powers?

Why Choose Less Effective Armour Types?

Are Roman Catholic priests ever addressed as pastor

Are all passive ability checks floors for active ability checks?

Is there a hypothetical scenario that would make Earth uninhabitable for humans, but not for (the majority of) other animals?

What is the significance behind "40 days" that often appears in the Bible?

What do you call the act of removing a part of a word and replacing it with an apostrophe

How to write cleanly even if my character uses expletive language?

Do I need to be arrogant to get ahead?

Why do passenger jet manufacturers design their planes with stall prevention systems?

Python if-else code style for reduced code for rounding floats



How to insert elective subjects section within a diagram


Write information on aux file when using include to build documentHow to draw a diagram of custom subject correlativitiesHow to draw multiple fillable PDF forms inside a rectangle using `tikzpicture` environmentArrow within a signal (timing diagram)Drawing electromagnetic tetrahedron diagram having text within node connectionsThe easiest way to draw a diagram within a textTikZ/ERD: node (=Entity) label on the insideHow can I insert a picture into a TikZ diagram?Tikz Diagram: Block Diagramuse circuitikz picture inside tikzpictureInsert a graphic within a sentence nicely?How to draw Adjacency Diagram?How to draw a diagram of custom subject correlativities













4















This is and addendum of the "Ingredients" section posted on a previous question: How to draw a diagram of custom subject correlativities.



We need two more ingredients:




  • Make an elective subject. We can label it as nonfillable elective subject:



    Non fillable elective subject



    Also, we need to have a fillable elective subject, called for example fillable elective subject:



    Fillable elective subject



    As said in the question, you can use this very helpful answer.




  • Make a shape that contains a set of elective subjects:



    Shape containing elective subjects



(Both the background color of the shape and the TextField's may vary. Do not worry about that).



What I need



  1. The last shape must be in the lower part of the big orange rectangle, without reaching all margins.


  2. The elective subjects can have different heights depending on the stack of elective subjects but the width is always the same, but the elective subjects inside it must be centered:



    Example



  3. Note that elective subjects do not relate to any object, so that's why we can reduce the width of the light blue shape.

What I have done



The same source code of marmot's answer:



documentclassarticle
usepackage[showframe,margin=0in,footskip=0.25in,paperwidth=50cm,paperheight=20cm]geometry
usepackage[english]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
%usepackageglobalvals
usepackagehyperref
usepackagetikz
usetikzlibrarypositioning,backgrounds,fit
tikzsettext 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=footnotesizesffamily,
pics/fillable subject/.style=code=- (-Title.south west)
,
pics/nonfillable subject/.style=code=- (-Title.north east) -- (-Title.south east) -,
manoooh/.style=column sep=-2cm,row sep=5mm


begindocument

thispagestyleempty % To suppress page number

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

vfill
centering
begintikzpicture[node distance=3.14cm]
% step 1: add the matrices, name them mat0, mat1 etc.
beginscope[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; \
;
endscope
foreach X in 0,...,3 %<- if you have more or less matrices, adjust 3
matX.south),inner ysep=5mm,
inner xsep=5mm,fill=orange!30,rounded corners=50pt](FX);
endscope
% now add the arrows
foreach X in D,...,G
draw[blue,-latex] (B-Title) to[out=0,in=180] (X-Title);
endtikzpicture

vfill
enddocument


I think that we could also use the matrix command of the TikZ package to position the pictures inside the light blue shape, but we need to define a new type of subject: (non)fillable elective subject.



Final result



Similar to the original question but adding these new shapes:



Final result



Thanks!!










share|improve this question



















  • 2





    If you dont mind, could you please add the code from the linked questions (I would still retain the links :)). So that it will be easier for looking-up.

    – Raaja
    Mar 13 at 10:59






  • 1





    @Raaja done. Thanks for the suggestion!

    – manooooh
    Mar 13 at 14:10






  • 1





    Perfect!! :-D

    – Raaja
    Mar 13 at 14:12















4















This is and addendum of the "Ingredients" section posted on a previous question: How to draw a diagram of custom subject correlativities.



We need two more ingredients:




  • Make an elective subject. We can label it as nonfillable elective subject:



    Non fillable elective subject



    Also, we need to have a fillable elective subject, called for example fillable elective subject:



    Fillable elective subject



    As said in the question, you can use this very helpful answer.




  • Make a shape that contains a set of elective subjects:



    Shape containing elective subjects



(Both the background color of the shape and the TextField's may vary. Do not worry about that).



What I need



  1. The last shape must be in the lower part of the big orange rectangle, without reaching all margins.


  2. The elective subjects can have different heights depending on the stack of elective subjects but the width is always the same, but the elective subjects inside it must be centered:



    Example



  3. Note that elective subjects do not relate to any object, so that's why we can reduce the width of the light blue shape.

What I have done



The same source code of marmot's answer:



documentclassarticle
usepackage[showframe,margin=0in,footskip=0.25in,paperwidth=50cm,paperheight=20cm]geometry
usepackage[english]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
%usepackageglobalvals
usepackagehyperref
usepackagetikz
usetikzlibrarypositioning,backgrounds,fit
tikzsettext 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=footnotesizesffamily,
pics/fillable subject/.style=code=- (-Title.south west)
,
pics/nonfillable subject/.style=code=- (-Title.north east) -- (-Title.south east) -,
manoooh/.style=column sep=-2cm,row sep=5mm


begindocument

thispagestyleempty % To suppress page number

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

vfill
centering
begintikzpicture[node distance=3.14cm]
% step 1: add the matrices, name them mat0, mat1 etc.
beginscope[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; \
;
endscope
foreach X in 0,...,3 %<- if you have more or less matrices, adjust 3
matX.south),inner ysep=5mm,
inner xsep=5mm,fill=orange!30,rounded corners=50pt](FX);
endscope
% now add the arrows
foreach X in D,...,G
draw[blue,-latex] (B-Title) to[out=0,in=180] (X-Title);
endtikzpicture

vfill
enddocument


I think that we could also use the matrix command of the TikZ package to position the pictures inside the light blue shape, but we need to define a new type of subject: (non)fillable elective subject.



Final result



Similar to the original question but adding these new shapes:



Final result



Thanks!!










share|improve this question



















  • 2





    If you dont mind, could you please add the code from the linked questions (I would still retain the links :)). So that it will be easier for looking-up.

    – Raaja
    Mar 13 at 10:59






  • 1





    @Raaja done. Thanks for the suggestion!

    – manooooh
    Mar 13 at 14:10






  • 1





    Perfect!! :-D

    – Raaja
    Mar 13 at 14:12













4












4








4








This is and addendum of the "Ingredients" section posted on a previous question: How to draw a diagram of custom subject correlativities.



We need two more ingredients:




  • Make an elective subject. We can label it as nonfillable elective subject:



    Non fillable elective subject



    Also, we need to have a fillable elective subject, called for example fillable elective subject:



    Fillable elective subject



    As said in the question, you can use this very helpful answer.




  • Make a shape that contains a set of elective subjects:



    Shape containing elective subjects



(Both the background color of the shape and the TextField's may vary. Do not worry about that).



What I need



  1. The last shape must be in the lower part of the big orange rectangle, without reaching all margins.


  2. The elective subjects can have different heights depending on the stack of elective subjects but the width is always the same, but the elective subjects inside it must be centered:



    Example



  3. Note that elective subjects do not relate to any object, so that's why we can reduce the width of the light blue shape.

What I have done



The same source code of marmot's answer:



documentclassarticle
usepackage[showframe,margin=0in,footskip=0.25in,paperwidth=50cm,paperheight=20cm]geometry
usepackage[english]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
%usepackageglobalvals
usepackagehyperref
usepackagetikz
usetikzlibrarypositioning,backgrounds,fit
tikzsettext 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=footnotesizesffamily,
pics/fillable subject/.style=code=- (-Title.south west)
,
pics/nonfillable subject/.style=code=- (-Title.north east) -- (-Title.south east) -,
manoooh/.style=column sep=-2cm,row sep=5mm


begindocument

thispagestyleempty % To suppress page number

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

vfill
centering
begintikzpicture[node distance=3.14cm]
% step 1: add the matrices, name them mat0, mat1 etc.
beginscope[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; \
;
endscope
foreach X in 0,...,3 %<- if you have more or less matrices, adjust 3
matX.south),inner ysep=5mm,
inner xsep=5mm,fill=orange!30,rounded corners=50pt](FX);
endscope
% now add the arrows
foreach X in D,...,G
draw[blue,-latex] (B-Title) to[out=0,in=180] (X-Title);
endtikzpicture

vfill
enddocument


I think that we could also use the matrix command of the TikZ package to position the pictures inside the light blue shape, but we need to define a new type of subject: (non)fillable elective subject.



Final result



Similar to the original question but adding these new shapes:



Final result



Thanks!!










share|improve this question
















This is and addendum of the "Ingredients" section posted on a previous question: How to draw a diagram of custom subject correlativities.



We need two more ingredients:




  • Make an elective subject. We can label it as nonfillable elective subject:



    Non fillable elective subject



    Also, we need to have a fillable elective subject, called for example fillable elective subject:



    Fillable elective subject



    As said in the question, you can use this very helpful answer.




  • Make a shape that contains a set of elective subjects:



    Shape containing elective subjects



(Both the background color of the shape and the TextField's may vary. Do not worry about that).



What I need



  1. The last shape must be in the lower part of the big orange rectangle, without reaching all margins.


  2. The elective subjects can have different heights depending on the stack of elective subjects but the width is always the same, but the elective subjects inside it must be centered:



    Example



  3. Note that elective subjects do not relate to any object, so that's why we can reduce the width of the light blue shape.

What I have done



The same source code of marmot's answer:



documentclassarticle
usepackage[showframe,margin=0in,footskip=0.25in,paperwidth=50cm,paperheight=20cm]geometry
usepackage[english]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
%usepackageglobalvals
usepackagehyperref
usepackagetikz
usetikzlibrarypositioning,backgrounds,fit
tikzsettext 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=footnotesizesffamily,
pics/fillable subject/.style=code=- (-Title.south west)
,
pics/nonfillable subject/.style=code=- (-Title.north east) -- (-Title.south east) -,
manoooh/.style=column sep=-2cm,row sep=5mm


begindocument

thispagestyleempty % To suppress page number

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

vfill
centering
begintikzpicture[node distance=3.14cm]
% step 1: add the matrices, name them mat0, mat1 etc.
beginscope[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; \
;
endscope
foreach X in 0,...,3 %<- if you have more or less matrices, adjust 3
matX.south),inner ysep=5mm,
inner xsep=5mm,fill=orange!30,rounded corners=50pt](FX);
endscope
% now add the arrows
foreach X in D,...,G
draw[blue,-latex] (B-Title) to[out=0,in=180] (X-Title);
endtikzpicture

vfill
enddocument


I think that we could also use the matrix command of the TikZ package to position the pictures inside the light blue shape, but we need to define a new type of subject: (non)fillable elective subject.



Final result



Similar to the original question but adding these new shapes:



Final result



Thanks!!







tikz-pgf horizontal-alignment vertical-alignment diagrams






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 13 at 14:09







manooooh

















asked Mar 13 at 9:39









manoooohmanooooh

1,0651516




1,0651516







  • 2





    If you dont mind, could you please add the code from the linked questions (I would still retain the links :)). So that it will be easier for looking-up.

    – Raaja
    Mar 13 at 10:59






  • 1





    @Raaja done. Thanks for the suggestion!

    – manooooh
    Mar 13 at 14:10






  • 1





    Perfect!! :-D

    – Raaja
    Mar 13 at 14:12












  • 2





    If you dont mind, could you please add the code from the linked questions (I would still retain the links :)). So that it will be easier for looking-up.

    – Raaja
    Mar 13 at 10:59






  • 1





    @Raaja done. Thanks for the suggestion!

    – manooooh
    Mar 13 at 14:10






  • 1





    Perfect!! :-D

    – Raaja
    Mar 13 at 14:12







2




2





If you dont mind, could you please add the code from the linked questions (I would still retain the links :)). So that it will be easier for looking-up.

– Raaja
Mar 13 at 10:59





If you dont mind, could you please add the code from the linked questions (I would still retain the links :)). So that it will be easier for looking-up.

– Raaja
Mar 13 at 10:59




1




1





@Raaja done. Thanks for the suggestion!

– manooooh
Mar 13 at 14:10





@Raaja done. Thanks for the suggestion!

– manooooh
Mar 13 at 14:10




1




1





Perfect!! :-D

– Raaja
Mar 13 at 14:12





Perfect!! :-D

– Raaja
Mar 13 at 14:12










1 Answer
1






active

oldest

votes


















2














The main complication is that one cannot yet (?) nest tikz matrices. So this proposal follows a slightly different strategy, which is conceptually more or less the same as the one used here:



  1. Build the matrices with some guessed distances.

  2. Measure the matrices.

  3. Compute "optimal" distances from the measured values.

  4. Write the "optimal" distances to the aux file such that they can be used after recompilation.

The example has a lot of annotations that should help to understand what is going on. Notice also that you have to loop over the actual inlays, that is, if you want to add or remove inlays, you may have to modify foreach X in 0,2,3.



documentclassarticle
usepackage[showframe,margin=0in,footskip=0.25in,paperwidth=54cm,paperheight=20cm]geometry
usepackage[english]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagehyperref
usepackagetikz
usetikzlibrarypositioning,backgrounds,fit,calc
tikzsettext 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=footnotesizesffamily,
pics/fillable subject/.style=code=- (-Title.south west)
,
pics/nonfillable subject/.style=code=- (-Title.north east) -- (-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=useValmatrix_width
electives/.style=column sep=-2.25cm,row sep=5mm,
fit sep/.initial=10pt,
fit dist/.initial=20pt,
inlay top sep/.initial=24pt


begindocument
thispagestyleempty % To suppress page number
noindent
begintikzpicture
fill[white,fill=orange] (0,0) rectangle (paperwidth,-2cm) node[midway,align=center,font=Huge] bfseries Some text here\LARGE More text here;
endtikzpicture

ifdefinedmymatdist
%typeoutgotspacemymatdist
else
typeoutPleasespace recompilespace yourspace file!
defmymatdist150pt
fi
ifdefinedmymatbottom
%typeoutgotspacemymatbottom
else
typeoutPleasespace recompilespace yourspace file!
defmymatbottom-150pt
fi


vfill
centering
begintikzpicture[node distance=3.14cm]
% step 1: add the matrices, name them mat0, mat1 etc.
beginscope[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; \
;
endscope
pgfmathsetmacromywidth0pt
foreach X in 0,...,3 %<- if you have more or less matrices, adjust 3
-matrices.north) (LX) Level $X$;
beginscope[on background layer]
% the fit parameters determine the shape of the background rectangles
node[fit=(LX) (matX) (matrices.south-
%xdefmydistmydist
pgfmathsetmacromydistmywidth+2*pgfkeysvalueof/tikz/fit
sep+pgfkeysvalueof/tikz/fit dist
xdefmydistmydist
defmymatbottom0pt
foreach X in 0,2,3 %<run only over those entries that have inlays
path let p1=($(matX.north)-(matX.south)$),
p2=($(matEX.north)-(matEX.south)$),
n1=max(abs(y1)/2+abs(y2)+2*pgfkeysvalueof/tikz/inlay top sep,mymatbottom)
in pgfextraxdefmymatbottomn1
node[anchor=south east,xshift=-2cm,font=LARGEbfseries] (ElX)
at (matEX.north)Electives;
beginscope[on background layer]
node[fit=(matEX) (ElX)] (FEX);
fill[blue!30,rounded corners=30pt] (X*mymatdist-
mymatdist/2+pgfkeysvalueof/tikz/fit dist/4+10pt,0
makeatletter
immediatewrite@mainauxxdefstringmymatdistmydist ptrelax
immediatewrite@mainauxxdefstringmymatbottom-mymatbottomrelax
makeatother

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

vfill
enddocument


enter image description here



And this is a second example with annotations which is also closer to your screen shot.



documentclassarticle
usepackage[showframe,margin=0in,footskip=0.25in,paperwidth=54cm,paperheight=24cm]geometry
usepackage[english]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagehyperref
usepackagetikz
usetikzlibrarypositioning,backgrounds,fit,calc
tikzsettext 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=footnotesizesffamily,
pics/fillable subject/.style=code=- (-Title.south west)
,
pics/nonfillable subject/.style=code=- (-Title.north east) -- (-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=useValmatrix_width
electives/.style=column sep=-2.25cm,row sep=5mm,
fit sep/.initial=10pt,
fit dist/.initial=20pt,
inlay top sep/.initial=24pt


begindocument
thispagestyleempty % To suppress page number
noindent
begintikzpicture
fill[white,fill=orange] (0,0) rectangle (paperwidth,-2cm) node[midway,align=center,font=Huge] bfseries Some text here\LARGE More text here;
endtikzpicture

ifdefinedmymatdist
%typeoutgotspacemymatdist
else
typeoutPleasespace recompilespace yourspace file!
defmymatdist150pt
fi
ifdefinedmymatbottom
%typeoutgotspacemymatbottom
else
typeoutPleasespace recompilespace yourspace file!
defmymatbottom-150pt
fi


vfill
centering
begintikzpicture[node distance=3.14cm]
% step 1: add the matrices, name them mat0, mat1 etc.
beginscope[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; \
;
endscope
pgfmathsetmacromywidth0pt
foreach X in 0,...,3 %<- if you have more or less matrices, adjust 3
-matrices.north) (LX) Level $X$;
beginscope[on background layer]
% the fit parameters determine the shape of the background rectangles
node[fit=(LX) (matX) (matrices.south-
%xdefmydistmydist
pgfmathsetmacromydistmywidth+2*pgfkeysvalueof/tikz/fit
sep+pgfkeysvalueof/tikz/fit dist
xdefmydistmydist
defmymatbottom0pt
foreach X in 0,2,3 %<run only over those entries that have inlays
path let p1=($(matX.north)-(matX.south)$),
p2=($(matEX.north)-(matEX.south)$),
n1=max(abs(y1)/2+abs(y2)+2*pgfkeysvalueof/tikz/inlay top sep,mymatbottom)
in pgfextraxdefmymatbottomn1
node[anchor=south east,xshift=-2cm,font=LARGEbfseries] (ElX)
at (matEX.north)Electives;
beginscope[on background layer]
node[fit=(matEX) (ElX)] (FEX);
fill[blue!30,rounded corners=30pt] (X*mymatdist-
mymatdist/2+pgfkeysvalueof/tikz/fit dist/4+10pt,0
makeatletter
immediatewrite@mainauxxdefstringmymatdistmydist ptrelax
immediatewrite@mainauxxdefstringmymatbottom-mymatbottomrelax
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] (cX) at
(matX.center);
unlessifnumX=1
node[circle,blue,inner sep=4pt,fill,
label=[font=Huge,text=blue]above:matE X' south] (cX') at
(matEX.south);
fi

endtikzpicture

vfill
enddocument


enter image description here






share|improve this answer

























  • Thanks! Where are the blue shapes?

    – manooooh
    2 days ago











  • Yes of course, I agree with your answer. No problem in compiling twice.

    – manooooh
    2 days ago











  • @manooooh I updated my answer. Notice that it is quite possible that there is a simple trick that allows one to avoid this gymnastics but everything I could come up with (like putting the matrices into a tabular) is of comparable complexity, or even more complex.

    – marmot
    yesterday










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479245%2fhow-to-insert-elective-subjects-section-within-a-diagram%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














The main complication is that one cannot yet (?) nest tikz matrices. So this proposal follows a slightly different strategy, which is conceptually more or less the same as the one used here:



  1. Build the matrices with some guessed distances.

  2. Measure the matrices.

  3. Compute "optimal" distances from the measured values.

  4. Write the "optimal" distances to the aux file such that they can be used after recompilation.

The example has a lot of annotations that should help to understand what is going on. Notice also that you have to loop over the actual inlays, that is, if you want to add or remove inlays, you may have to modify foreach X in 0,2,3.



documentclassarticle
usepackage[showframe,margin=0in,footskip=0.25in,paperwidth=54cm,paperheight=20cm]geometry
usepackage[english]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagehyperref
usepackagetikz
usetikzlibrarypositioning,backgrounds,fit,calc
tikzsettext 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=footnotesizesffamily,
pics/fillable subject/.style=code=- (-Title.south west)
,
pics/nonfillable subject/.style=code=- (-Title.north east) -- (-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=useValmatrix_width
electives/.style=column sep=-2.25cm,row sep=5mm,
fit sep/.initial=10pt,
fit dist/.initial=20pt,
inlay top sep/.initial=24pt


begindocument
thispagestyleempty % To suppress page number
noindent
begintikzpicture
fill[white,fill=orange] (0,0) rectangle (paperwidth,-2cm) node[midway,align=center,font=Huge] bfseries Some text here\LARGE More text here;
endtikzpicture

ifdefinedmymatdist
%typeoutgotspacemymatdist
else
typeoutPleasespace recompilespace yourspace file!
defmymatdist150pt
fi
ifdefinedmymatbottom
%typeoutgotspacemymatbottom
else
typeoutPleasespace recompilespace yourspace file!
defmymatbottom-150pt
fi


vfill
centering
begintikzpicture[node distance=3.14cm]
% step 1: add the matrices, name them mat0, mat1 etc.
beginscope[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; \
;
endscope
pgfmathsetmacromywidth0pt
foreach X in 0,...,3 %<- if you have more or less matrices, adjust 3
-matrices.north) (LX) Level $X$;
beginscope[on background layer]
% the fit parameters determine the shape of the background rectangles
node[fit=(LX) (matX) (matrices.south-
%xdefmydistmydist
pgfmathsetmacromydistmywidth+2*pgfkeysvalueof/tikz/fit
sep+pgfkeysvalueof/tikz/fit dist
xdefmydistmydist
defmymatbottom0pt
foreach X in 0,2,3 %<run only over those entries that have inlays
path let p1=($(matX.north)-(matX.south)$),
p2=($(matEX.north)-(matEX.south)$),
n1=max(abs(y1)/2+abs(y2)+2*pgfkeysvalueof/tikz/inlay top sep,mymatbottom)
in pgfextraxdefmymatbottomn1
node[anchor=south east,xshift=-2cm,font=LARGEbfseries] (ElX)
at (matEX.north)Electives;
beginscope[on background layer]
node[fit=(matEX) (ElX)] (FEX);
fill[blue!30,rounded corners=30pt] (X*mymatdist-
mymatdist/2+pgfkeysvalueof/tikz/fit dist/4+10pt,0
makeatletter
immediatewrite@mainauxxdefstringmymatdistmydist ptrelax
immediatewrite@mainauxxdefstringmymatbottom-mymatbottomrelax
makeatother

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

vfill
enddocument


enter image description here



And this is a second example with annotations which is also closer to your screen shot.



documentclassarticle
usepackage[showframe,margin=0in,footskip=0.25in,paperwidth=54cm,paperheight=24cm]geometry
usepackage[english]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagehyperref
usepackagetikz
usetikzlibrarypositioning,backgrounds,fit,calc
tikzsettext 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=footnotesizesffamily,
pics/fillable subject/.style=code=- (-Title.south west)
,
pics/nonfillable subject/.style=code=- (-Title.north east) -- (-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=useValmatrix_width
electives/.style=column sep=-2.25cm,row sep=5mm,
fit sep/.initial=10pt,
fit dist/.initial=20pt,
inlay top sep/.initial=24pt


begindocument
thispagestyleempty % To suppress page number
noindent
begintikzpicture
fill[white,fill=orange] (0,0) rectangle (paperwidth,-2cm) node[midway,align=center,font=Huge] bfseries Some text here\LARGE More text here;
endtikzpicture

ifdefinedmymatdist
%typeoutgotspacemymatdist
else
typeoutPleasespace recompilespace yourspace file!
defmymatdist150pt
fi
ifdefinedmymatbottom
%typeoutgotspacemymatbottom
else
typeoutPleasespace recompilespace yourspace file!
defmymatbottom-150pt
fi


vfill
centering
begintikzpicture[node distance=3.14cm]
% step 1: add the matrices, name them mat0, mat1 etc.
beginscope[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; \
;
endscope
pgfmathsetmacromywidth0pt
foreach X in 0,...,3 %<- if you have more or less matrices, adjust 3
-matrices.north) (LX) Level $X$;
beginscope[on background layer]
% the fit parameters determine the shape of the background rectangles
node[fit=(LX) (matX) (matrices.south-
%xdefmydistmydist
pgfmathsetmacromydistmywidth+2*pgfkeysvalueof/tikz/fit
sep+pgfkeysvalueof/tikz/fit dist
xdefmydistmydist
defmymatbottom0pt
foreach X in 0,2,3 %<run only over those entries that have inlays
path let p1=($(matX.north)-(matX.south)$),
p2=($(matEX.north)-(matEX.south)$),
n1=max(abs(y1)/2+abs(y2)+2*pgfkeysvalueof/tikz/inlay top sep,mymatbottom)
in pgfextraxdefmymatbottomn1
node[anchor=south east,xshift=-2cm,font=LARGEbfseries] (ElX)
at (matEX.north)Electives;
beginscope[on background layer]
node[fit=(matEX) (ElX)] (FEX);
fill[blue!30,rounded corners=30pt] (X*mymatdist-
mymatdist/2+pgfkeysvalueof/tikz/fit dist/4+10pt,0
makeatletter
immediatewrite@mainauxxdefstringmymatdistmydist ptrelax
immediatewrite@mainauxxdefstringmymatbottom-mymatbottomrelax
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] (cX) at
(matX.center);
unlessifnumX=1
node[circle,blue,inner sep=4pt,fill,
label=[font=Huge,text=blue]above:matE X' south] (cX') at
(matEX.south);
fi

endtikzpicture

vfill
enddocument


enter image description here






share|improve this answer

























  • Thanks! Where are the blue shapes?

    – manooooh
    2 days ago











  • Yes of course, I agree with your answer. No problem in compiling twice.

    – manooooh
    2 days ago











  • @manooooh I updated my answer. Notice that it is quite possible that there is a simple trick that allows one to avoid this gymnastics but everything I could come up with (like putting the matrices into a tabular) is of comparable complexity, or even more complex.

    – marmot
    yesterday















2














The main complication is that one cannot yet (?) nest tikz matrices. So this proposal follows a slightly different strategy, which is conceptually more or less the same as the one used here:



  1. Build the matrices with some guessed distances.

  2. Measure the matrices.

  3. Compute "optimal" distances from the measured values.

  4. Write the "optimal" distances to the aux file such that they can be used after recompilation.

The example has a lot of annotations that should help to understand what is going on. Notice also that you have to loop over the actual inlays, that is, if you want to add or remove inlays, you may have to modify foreach X in 0,2,3.



documentclassarticle
usepackage[showframe,margin=0in,footskip=0.25in,paperwidth=54cm,paperheight=20cm]geometry
usepackage[english]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagehyperref
usepackagetikz
usetikzlibrarypositioning,backgrounds,fit,calc
tikzsettext 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=footnotesizesffamily,
pics/fillable subject/.style=code=- (-Title.south west)
,
pics/nonfillable subject/.style=code=- (-Title.north east) -- (-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=useValmatrix_width
electives/.style=column sep=-2.25cm,row sep=5mm,
fit sep/.initial=10pt,
fit dist/.initial=20pt,
inlay top sep/.initial=24pt


begindocument
thispagestyleempty % To suppress page number
noindent
begintikzpicture
fill[white,fill=orange] (0,0) rectangle (paperwidth,-2cm) node[midway,align=center,font=Huge] bfseries Some text here\LARGE More text here;
endtikzpicture

ifdefinedmymatdist
%typeoutgotspacemymatdist
else
typeoutPleasespace recompilespace yourspace file!
defmymatdist150pt
fi
ifdefinedmymatbottom
%typeoutgotspacemymatbottom
else
typeoutPleasespace recompilespace yourspace file!
defmymatbottom-150pt
fi


vfill
centering
begintikzpicture[node distance=3.14cm]
% step 1: add the matrices, name them mat0, mat1 etc.
beginscope[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; \
;
endscope
pgfmathsetmacromywidth0pt
foreach X in 0,...,3 %<- if you have more or less matrices, adjust 3
-matrices.north) (LX) Level $X$;
beginscope[on background layer]
% the fit parameters determine the shape of the background rectangles
node[fit=(LX) (matX) (matrices.south-
%xdefmydistmydist
pgfmathsetmacromydistmywidth+2*pgfkeysvalueof/tikz/fit
sep+pgfkeysvalueof/tikz/fit dist
xdefmydistmydist
defmymatbottom0pt
foreach X in 0,2,3 %<run only over those entries that have inlays
path let p1=($(matX.north)-(matX.south)$),
p2=($(matEX.north)-(matEX.south)$),
n1=max(abs(y1)/2+abs(y2)+2*pgfkeysvalueof/tikz/inlay top sep,mymatbottom)
in pgfextraxdefmymatbottomn1
node[anchor=south east,xshift=-2cm,font=LARGEbfseries] (ElX)
at (matEX.north)Electives;
beginscope[on background layer]
node[fit=(matEX) (ElX)] (FEX);
fill[blue!30,rounded corners=30pt] (X*mymatdist-
mymatdist/2+pgfkeysvalueof/tikz/fit dist/4+10pt,0
makeatletter
immediatewrite@mainauxxdefstringmymatdistmydist ptrelax
immediatewrite@mainauxxdefstringmymatbottom-mymatbottomrelax
makeatother

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

vfill
enddocument


enter image description here



And this is a second example with annotations which is also closer to your screen shot.



documentclassarticle
usepackage[showframe,margin=0in,footskip=0.25in,paperwidth=54cm,paperheight=24cm]geometry
usepackage[english]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagehyperref
usepackagetikz
usetikzlibrarypositioning,backgrounds,fit,calc
tikzsettext 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=footnotesizesffamily,
pics/fillable subject/.style=code=- (-Title.south west)
,
pics/nonfillable subject/.style=code=- (-Title.north east) -- (-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=useValmatrix_width
electives/.style=column sep=-2.25cm,row sep=5mm,
fit sep/.initial=10pt,
fit dist/.initial=20pt,
inlay top sep/.initial=24pt


begindocument
thispagestyleempty % To suppress page number
noindent
begintikzpicture
fill[white,fill=orange] (0,0) rectangle (paperwidth,-2cm) node[midway,align=center,font=Huge] bfseries Some text here\LARGE More text here;
endtikzpicture

ifdefinedmymatdist
%typeoutgotspacemymatdist
else
typeoutPleasespace recompilespace yourspace file!
defmymatdist150pt
fi
ifdefinedmymatbottom
%typeoutgotspacemymatbottom
else
typeoutPleasespace recompilespace yourspace file!
defmymatbottom-150pt
fi


vfill
centering
begintikzpicture[node distance=3.14cm]
% step 1: add the matrices, name them mat0, mat1 etc.
beginscope[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; \
;
endscope
pgfmathsetmacromywidth0pt
foreach X in 0,...,3 %<- if you have more or less matrices, adjust 3
-matrices.north) (LX) Level $X$;
beginscope[on background layer]
% the fit parameters determine the shape of the background rectangles
node[fit=(LX) (matX) (matrices.south-
%xdefmydistmydist
pgfmathsetmacromydistmywidth+2*pgfkeysvalueof/tikz/fit
sep+pgfkeysvalueof/tikz/fit dist
xdefmydistmydist
defmymatbottom0pt
foreach X in 0,2,3 %<run only over those entries that have inlays
path let p1=($(matX.north)-(matX.south)$),
p2=($(matEX.north)-(matEX.south)$),
n1=max(abs(y1)/2+abs(y2)+2*pgfkeysvalueof/tikz/inlay top sep,mymatbottom)
in pgfextraxdefmymatbottomn1
node[anchor=south east,xshift=-2cm,font=LARGEbfseries] (ElX)
at (matEX.north)Electives;
beginscope[on background layer]
node[fit=(matEX) (ElX)] (FEX);
fill[blue!30,rounded corners=30pt] (X*mymatdist-
mymatdist/2+pgfkeysvalueof/tikz/fit dist/4+10pt,0
makeatletter
immediatewrite@mainauxxdefstringmymatdistmydist ptrelax
immediatewrite@mainauxxdefstringmymatbottom-mymatbottomrelax
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] (cX) at
(matX.center);
unlessifnumX=1
node[circle,blue,inner sep=4pt,fill,
label=[font=Huge,text=blue]above:matE X' south] (cX') at
(matEX.south);
fi

endtikzpicture

vfill
enddocument


enter image description here






share|improve this answer

























  • Thanks! Where are the blue shapes?

    – manooooh
    2 days ago











  • Yes of course, I agree with your answer. No problem in compiling twice.

    – manooooh
    2 days ago











  • @manooooh I updated my answer. Notice that it is quite possible that there is a simple trick that allows one to avoid this gymnastics but everything I could come up with (like putting the matrices into a tabular) is of comparable complexity, or even more complex.

    – marmot
    yesterday













2












2








2







The main complication is that one cannot yet (?) nest tikz matrices. So this proposal follows a slightly different strategy, which is conceptually more or less the same as the one used here:



  1. Build the matrices with some guessed distances.

  2. Measure the matrices.

  3. Compute "optimal" distances from the measured values.

  4. Write the "optimal" distances to the aux file such that they can be used after recompilation.

The example has a lot of annotations that should help to understand what is going on. Notice also that you have to loop over the actual inlays, that is, if you want to add or remove inlays, you may have to modify foreach X in 0,2,3.



documentclassarticle
usepackage[showframe,margin=0in,footskip=0.25in,paperwidth=54cm,paperheight=20cm]geometry
usepackage[english]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagehyperref
usepackagetikz
usetikzlibrarypositioning,backgrounds,fit,calc
tikzsettext 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=footnotesizesffamily,
pics/fillable subject/.style=code=- (-Title.south west)
,
pics/nonfillable subject/.style=code=- (-Title.north east) -- (-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=useValmatrix_width
electives/.style=column sep=-2.25cm,row sep=5mm,
fit sep/.initial=10pt,
fit dist/.initial=20pt,
inlay top sep/.initial=24pt


begindocument
thispagestyleempty % To suppress page number
noindent
begintikzpicture
fill[white,fill=orange] (0,0) rectangle (paperwidth,-2cm) node[midway,align=center,font=Huge] bfseries Some text here\LARGE More text here;
endtikzpicture

ifdefinedmymatdist
%typeoutgotspacemymatdist
else
typeoutPleasespace recompilespace yourspace file!
defmymatdist150pt
fi
ifdefinedmymatbottom
%typeoutgotspacemymatbottom
else
typeoutPleasespace recompilespace yourspace file!
defmymatbottom-150pt
fi


vfill
centering
begintikzpicture[node distance=3.14cm]
% step 1: add the matrices, name them mat0, mat1 etc.
beginscope[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; \
;
endscope
pgfmathsetmacromywidth0pt
foreach X in 0,...,3 %<- if you have more or less matrices, adjust 3
-matrices.north) (LX) Level $X$;
beginscope[on background layer]
% the fit parameters determine the shape of the background rectangles
node[fit=(LX) (matX) (matrices.south-
%xdefmydistmydist
pgfmathsetmacromydistmywidth+2*pgfkeysvalueof/tikz/fit
sep+pgfkeysvalueof/tikz/fit dist
xdefmydistmydist
defmymatbottom0pt
foreach X in 0,2,3 %<run only over those entries that have inlays
path let p1=($(matX.north)-(matX.south)$),
p2=($(matEX.north)-(matEX.south)$),
n1=max(abs(y1)/2+abs(y2)+2*pgfkeysvalueof/tikz/inlay top sep,mymatbottom)
in pgfextraxdefmymatbottomn1
node[anchor=south east,xshift=-2cm,font=LARGEbfseries] (ElX)
at (matEX.north)Electives;
beginscope[on background layer]
node[fit=(matEX) (ElX)] (FEX);
fill[blue!30,rounded corners=30pt] (X*mymatdist-
mymatdist/2+pgfkeysvalueof/tikz/fit dist/4+10pt,0
makeatletter
immediatewrite@mainauxxdefstringmymatdistmydist ptrelax
immediatewrite@mainauxxdefstringmymatbottom-mymatbottomrelax
makeatother

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

vfill
enddocument


enter image description here



And this is a second example with annotations which is also closer to your screen shot.



documentclassarticle
usepackage[showframe,margin=0in,footskip=0.25in,paperwidth=54cm,paperheight=24cm]geometry
usepackage[english]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagehyperref
usepackagetikz
usetikzlibrarypositioning,backgrounds,fit,calc
tikzsettext 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=footnotesizesffamily,
pics/fillable subject/.style=code=- (-Title.south west)
,
pics/nonfillable subject/.style=code=- (-Title.north east) -- (-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=useValmatrix_width
electives/.style=column sep=-2.25cm,row sep=5mm,
fit sep/.initial=10pt,
fit dist/.initial=20pt,
inlay top sep/.initial=24pt


begindocument
thispagestyleempty % To suppress page number
noindent
begintikzpicture
fill[white,fill=orange] (0,0) rectangle (paperwidth,-2cm) node[midway,align=center,font=Huge] bfseries Some text here\LARGE More text here;
endtikzpicture

ifdefinedmymatdist
%typeoutgotspacemymatdist
else
typeoutPleasespace recompilespace yourspace file!
defmymatdist150pt
fi
ifdefinedmymatbottom
%typeoutgotspacemymatbottom
else
typeoutPleasespace recompilespace yourspace file!
defmymatbottom-150pt
fi


vfill
centering
begintikzpicture[node distance=3.14cm]
% step 1: add the matrices, name them mat0, mat1 etc.
beginscope[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; \
;
endscope
pgfmathsetmacromywidth0pt
foreach X in 0,...,3 %<- if you have more or less matrices, adjust 3
-matrices.north) (LX) Level $X$;
beginscope[on background layer]
% the fit parameters determine the shape of the background rectangles
node[fit=(LX) (matX) (matrices.south-
%xdefmydistmydist
pgfmathsetmacromydistmywidth+2*pgfkeysvalueof/tikz/fit
sep+pgfkeysvalueof/tikz/fit dist
xdefmydistmydist
defmymatbottom0pt
foreach X in 0,2,3 %<run only over those entries that have inlays
path let p1=($(matX.north)-(matX.south)$),
p2=($(matEX.north)-(matEX.south)$),
n1=max(abs(y1)/2+abs(y2)+2*pgfkeysvalueof/tikz/inlay top sep,mymatbottom)
in pgfextraxdefmymatbottomn1
node[anchor=south east,xshift=-2cm,font=LARGEbfseries] (ElX)
at (matEX.north)Electives;
beginscope[on background layer]
node[fit=(matEX) (ElX)] (FEX);
fill[blue!30,rounded corners=30pt] (X*mymatdist-
mymatdist/2+pgfkeysvalueof/tikz/fit dist/4+10pt,0
makeatletter
immediatewrite@mainauxxdefstringmymatdistmydist ptrelax
immediatewrite@mainauxxdefstringmymatbottom-mymatbottomrelax
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] (cX) at
(matX.center);
unlessifnumX=1
node[circle,blue,inner sep=4pt,fill,
label=[font=Huge,text=blue]above:matE X' south] (cX') at
(matEX.south);
fi

endtikzpicture

vfill
enddocument


enter image description here






share|improve this answer















The main complication is that one cannot yet (?) nest tikz matrices. So this proposal follows a slightly different strategy, which is conceptually more or less the same as the one used here:



  1. Build the matrices with some guessed distances.

  2. Measure the matrices.

  3. Compute "optimal" distances from the measured values.

  4. Write the "optimal" distances to the aux file such that they can be used after recompilation.

The example has a lot of annotations that should help to understand what is going on. Notice also that you have to loop over the actual inlays, that is, if you want to add or remove inlays, you may have to modify foreach X in 0,2,3.



documentclassarticle
usepackage[showframe,margin=0in,footskip=0.25in,paperwidth=54cm,paperheight=20cm]geometry
usepackage[english]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagehyperref
usepackagetikz
usetikzlibrarypositioning,backgrounds,fit,calc
tikzsettext 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=footnotesizesffamily,
pics/fillable subject/.style=code=- (-Title.south west)
,
pics/nonfillable subject/.style=code=- (-Title.north east) -- (-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=useValmatrix_width
electives/.style=column sep=-2.25cm,row sep=5mm,
fit sep/.initial=10pt,
fit dist/.initial=20pt,
inlay top sep/.initial=24pt


begindocument
thispagestyleempty % To suppress page number
noindent
begintikzpicture
fill[white,fill=orange] (0,0) rectangle (paperwidth,-2cm) node[midway,align=center,font=Huge] bfseries Some text here\LARGE More text here;
endtikzpicture

ifdefinedmymatdist
%typeoutgotspacemymatdist
else
typeoutPleasespace recompilespace yourspace file!
defmymatdist150pt
fi
ifdefinedmymatbottom
%typeoutgotspacemymatbottom
else
typeoutPleasespace recompilespace yourspace file!
defmymatbottom-150pt
fi


vfill
centering
begintikzpicture[node distance=3.14cm]
% step 1: add the matrices, name them mat0, mat1 etc.
beginscope[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; \
;
endscope
pgfmathsetmacromywidth0pt
foreach X in 0,...,3 %<- if you have more or less matrices, adjust 3
-matrices.north) (LX) Level $X$;
beginscope[on background layer]
% the fit parameters determine the shape of the background rectangles
node[fit=(LX) (matX) (matrices.south-
%xdefmydistmydist
pgfmathsetmacromydistmywidth+2*pgfkeysvalueof/tikz/fit
sep+pgfkeysvalueof/tikz/fit dist
xdefmydistmydist
defmymatbottom0pt
foreach X in 0,2,3 %<run only over those entries that have inlays
path let p1=($(matX.north)-(matX.south)$),
p2=($(matEX.north)-(matEX.south)$),
n1=max(abs(y1)/2+abs(y2)+2*pgfkeysvalueof/tikz/inlay top sep,mymatbottom)
in pgfextraxdefmymatbottomn1
node[anchor=south east,xshift=-2cm,font=LARGEbfseries] (ElX)
at (matEX.north)Electives;
beginscope[on background layer]
node[fit=(matEX) (ElX)] (FEX);
fill[blue!30,rounded corners=30pt] (X*mymatdist-
mymatdist/2+pgfkeysvalueof/tikz/fit dist/4+10pt,0
makeatletter
immediatewrite@mainauxxdefstringmymatdistmydist ptrelax
immediatewrite@mainauxxdefstringmymatbottom-mymatbottomrelax
makeatother

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

vfill
enddocument


enter image description here



And this is a second example with annotations which is also closer to your screen shot.



documentclassarticle
usepackage[showframe,margin=0in,footskip=0.25in,paperwidth=54cm,paperheight=24cm]geometry
usepackage[english]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagehyperref
usepackagetikz
usetikzlibrarypositioning,backgrounds,fit,calc
tikzsettext 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=footnotesizesffamily,
pics/fillable subject/.style=code=- (-Title.south west)
,
pics/nonfillable subject/.style=code=- (-Title.north east) -- (-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=useValmatrix_width
electives/.style=column sep=-2.25cm,row sep=5mm,
fit sep/.initial=10pt,
fit dist/.initial=20pt,
inlay top sep/.initial=24pt


begindocument
thispagestyleempty % To suppress page number
noindent
begintikzpicture
fill[white,fill=orange] (0,0) rectangle (paperwidth,-2cm) node[midway,align=center,font=Huge] bfseries Some text here\LARGE More text here;
endtikzpicture

ifdefinedmymatdist
%typeoutgotspacemymatdist
else
typeoutPleasespace recompilespace yourspace file!
defmymatdist150pt
fi
ifdefinedmymatbottom
%typeoutgotspacemymatbottom
else
typeoutPleasespace recompilespace yourspace file!
defmymatbottom-150pt
fi


vfill
centering
begintikzpicture[node distance=3.14cm]
% step 1: add the matrices, name them mat0, mat1 etc.
beginscope[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; \
;
endscope
pgfmathsetmacromywidth0pt
foreach X in 0,...,3 %<- if you have more or less matrices, adjust 3
-matrices.north) (LX) Level $X$;
beginscope[on background layer]
% the fit parameters determine the shape of the background rectangles
node[fit=(LX) (matX) (matrices.south-
%xdefmydistmydist
pgfmathsetmacromydistmywidth+2*pgfkeysvalueof/tikz/fit
sep+pgfkeysvalueof/tikz/fit dist
xdefmydistmydist
defmymatbottom0pt
foreach X in 0,2,3 %<run only over those entries that have inlays
path let p1=($(matX.north)-(matX.south)$),
p2=($(matEX.north)-(matEX.south)$),
n1=max(abs(y1)/2+abs(y2)+2*pgfkeysvalueof/tikz/inlay top sep,mymatbottom)
in pgfextraxdefmymatbottomn1
node[anchor=south east,xshift=-2cm,font=LARGEbfseries] (ElX)
at (matEX.north)Electives;
beginscope[on background layer]
node[fit=(matEX) (ElX)] (FEX);
fill[blue!30,rounded corners=30pt] (X*mymatdist-
mymatdist/2+pgfkeysvalueof/tikz/fit dist/4+10pt,0
makeatletter
immediatewrite@mainauxxdefstringmymatdistmydist ptrelax
immediatewrite@mainauxxdefstringmymatbottom-mymatbottomrelax
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] (cX) at
(matX.center);
unlessifnumX=1
node[circle,blue,inner sep=4pt,fill,
label=[font=Huge,text=blue]above:matE X' south] (cX') at
(matEX.south);
fi

endtikzpicture

vfill
enddocument


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited 4 mins ago

























answered 2 days ago









marmotmarmot

109k5133252




109k5133252












  • Thanks! Where are the blue shapes?

    – manooooh
    2 days ago











  • Yes of course, I agree with your answer. No problem in compiling twice.

    – manooooh
    2 days ago











  • @manooooh I updated my answer. Notice that it is quite possible that there is a simple trick that allows one to avoid this gymnastics but everything I could come up with (like putting the matrices into a tabular) is of comparable complexity, or even more complex.

    – marmot
    yesterday

















  • Thanks! Where are the blue shapes?

    – manooooh
    2 days ago











  • Yes of course, I agree with your answer. No problem in compiling twice.

    – manooooh
    2 days ago











  • @manooooh I updated my answer. Notice that it is quite possible that there is a simple trick that allows one to avoid this gymnastics but everything I could come up with (like putting the matrices into a tabular) is of comparable complexity, or even more complex.

    – marmot
    yesterday
















Thanks! Where are the blue shapes?

– manooooh
2 days ago





Thanks! Where are the blue shapes?

– manooooh
2 days ago













Yes of course, I agree with your answer. No problem in compiling twice.

– manooooh
2 days ago





Yes of course, I agree with your answer. No problem in compiling twice.

– manooooh
2 days ago













@manooooh I updated my answer. Notice that it is quite possible that there is a simple trick that allows one to avoid this gymnastics but everything I could come up with (like putting the matrices into a tabular) is of comparable complexity, or even more complex.

– marmot
yesterday





@manooooh I updated my answer. Notice that it is quite possible that there is a simple trick that allows one to avoid this gymnastics but everything I could come up with (like putting the matrices into a tabular) is of comparable complexity, or even more complex.

– marmot
yesterday

















draft saved

draft discarded
















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479245%2fhow-to-insert-elective-subjects-section-within-a-diagram%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How should I use the fbox command correctly to avoid producing a Bad Box message?How to put a long piece of text in a box?How to specify height and width of fboxIs there an arrayrulecolor-like command to change the rule color of fbox?What is the command to highlight bad boxes in pdf?Why does fbox sometimes place the box *over* the graphic image?how to put the text in the boxHow to create command for a box where text inside the box can automatically adjust?how can I make an fbox like command with certain color, shape and width of border?how to use fbox in align modeFbox increase the spacing between the box and it content (inner margin)how to change the box height of an equationWhat is the use of the hbox in a newcommand command?

Doxepinum Nexus interni Notae | Tabula navigationis3158DB01142WHOa682390"Structural Analysis of the Histamine H1 Receptor""Transdermal and Topical Drug Administration in the Treatment of Pain""Antidepressants as antipruritic agents: A review"

inputenc: Unicode character … not set up for use with LaTeX The Next CEO of Stack OverflowEntering Unicode characters in LaTeXHow to solve the `Package inputenc Error: Unicode char not set up for use with LaTeX` problem?solve “Unicode char is not set up for use with LaTeX” without special handling of every new interesting UTF-8 characterPackage inputenc Error: Unicode character ² (U+B2)(inputenc) not set up for use with LaTeX. acroI2C[I²C]package inputenc error unicode char (u + 190) not set up for use with latexPackage inputenc Error: Unicode char u8:′ not set up for use with LaTeX. 3′inputenc Error: Unicode char u8: not set up for use with LaTeX with G-BriefPackage Inputenc Error: Unicode char u8: not set up for use with LaTeXPackage inputenc Error: Unicode char ́ (U+301)(inputenc) not set up for use with LaTeX. includePackage inputenc Error: Unicode char ̂ (U+302)(inputenc) not set up for use with LaTeX. … $widehatleft (OA,AA' right )$Package inputenc Error: Unicode char â„¡ (U+2121)(inputenc) not set up for use with LaTeX. printbibliography[heading=bibintoc]Package inputenc Error: Unicode char − (U+2212)(inputenc) not set up for use with LaTeXPackage inputenc Error: Unicode character α (U+3B1) not set up for use with LaTeXPackage inputenc Error: Unicode characterError: ! Package inputenc Error: Unicode char ⊘ (U+2298)(inputenc) not set up for use with LaTeX