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
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
:Also, we need to have a fillable elective subject, called for example
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:
(Both the background color of the shape and the TextField
's may vary. Do not worry about that).
What I need
- The last shape must be in the lower part of the big orange rectangle, without reaching all margins.
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:
- 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:
Thanks!!
tikz-pgf horizontal-alignment vertical-alignment diagrams
add a comment |
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
:Also, we need to have a fillable elective subject, called for example
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:
(Both the background color of the shape and the TextField
's may vary. Do not worry about that).
What I need
- The last shape must be in the lower part of the big orange rectangle, without reaching all margins.
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:
- 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:
Thanks!!
tikz-pgf horizontal-alignment vertical-alignment diagrams
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
add a comment |
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
:Also, we need to have a fillable elective subject, called for example
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:
(Both the background color of the shape and the TextField
's may vary. Do not worry about that).
What I need
- The last shape must be in the lower part of the big orange rectangle, without reaching all margins.
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:
- 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:
Thanks!!
tikz-pgf horizontal-alignment vertical-alignment diagrams
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
:Also, we need to have a fillable elective subject, called for example
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:
(Both the background color of the shape and the TextField
's may vary. Do not worry about that).
What I need
- The last shape must be in the lower part of the big orange rectangle, without reaching all margins.
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:
- 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:
Thanks!!
tikz-pgf horizontal-alignment vertical-alignment diagrams
tikz-pgf horizontal-alignment vertical-alignment diagrams
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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:
- Build the matrices with some guessed distances.
- Measure the matrices.
- Compute "optimal" distances from the measured values.
- 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
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
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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:
- Build the matrices with some guessed distances.
- Measure the matrices.
- Compute "optimal" distances from the measured values.
- 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
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
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
add a comment |
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:
- Build the matrices with some guessed distances.
- Measure the matrices.
- Compute "optimal" distances from the measured values.
- 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
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
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
add a comment |
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:
- Build the matrices with some guessed distances.
- Measure the matrices.
- Compute "optimal" distances from the measured values.
- 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
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
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:
- Build the matrices with some guessed distances.
- Measure the matrices.
- Compute "optimal" distances from the measured values.
- 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
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
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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