How to determine nodes to reduce their length automatically using `tikzpicture` environmentChecking whether or not a node has been previously definedHow to draw a diagram of custom subject correlativitiesHow to insert elective subjects section within a diagramHow to modify nodes in TikZ to automatically add a line on their top?How to reduce the space between nodes?How to reduce the render of tikzpictureTikZ/ERD: node (=Entity) label on the insideHow to reduce length of and edge between two nodes without affecting a custom line marker?How to reduce the fill in many nodes for tikzTikZ: Using current length inside scope environmentHow to move tikzpicture with named nodes?How to create an ER diagram using tikzpicture environmentHow to draw this rectangle using tikzpicture environment

How can an organ that provides biological immortality be unable to regenerate?

If I cast enlarge/reduce on an arrow, what weapon could it count as?

Does Shadow Sorcerer's Eyes of the Dark work on all magical darkness or just his/hers?

What is the reasoning behind standardization (dividing by standard deviation)?

Why is participating in the European Parliamentary elections used as a threat?

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

label a part of commutative diagram

What is the difference between something being completely legal and being completely decriminalized?

How do you justify more code being written by following clean code practices?

UK Tourist Visa- Enquiry

How can I create URL shortcuts/redirects for task/diff IDs in Phabricator?

Is there any common country to visit for uk and schengen visa?

How do researchers send unsolicited emails asking for feedback on their works?

Don't understand why (5 | -2) > 0 is False where (5 or -2) > 0 is True

Print last inputted byte

Print a physical multiplication table

Someone scrambled my calling sign- who am I?

Hackerrank All Women's Codesprint 2019: Name the Product

Are hand made posters acceptable in Academia?

Have any astronauts/cosmonauts died in space?

Is "inadequate referencing" a euphemism for plagiarism?

When should a starting writer get his own webpage?

How can I query the supported timezones in Apex?

Would storms on an ocean world harm the marine life?



How to determine nodes to reduce their length automatically using `tikzpicture` environment


Checking whether or not a node has been previously definedHow to draw a diagram of custom subject correlativitiesHow to insert elective subjects section within a diagramHow to modify nodes in TikZ to automatically add a line on their top?How to reduce the space between nodes?How to reduce the render of tikzpictureTikZ/ERD: node (=Entity) label on the insideHow to reduce length of and edge between two nodes without affecting a custom line marker?How to reduce the fill in many nodes for tikzTikZ: Using current length inside scope environmentHow to move tikzpicture with named nodes?How to create an ER diagram using tikzpicture environmentHow to draw this rectangle using tikzpicture environment













0















This is and addendum of a previous question: How to insert elective subjects section within a diagram.



What I want



I would like to reduce the length of those nodes that only have a single column of a matrix environment of the Tikz package but keeping the same space between nodes. If possible, also do it automatically (it is not necessary at all, just know what the necessary commands are):



What I want



What I have done



MWE:



All the following source code belongs to marmot in the incredible accepted answer of the attached question. I only modified the nodes and things like that.



documentclassarticle
usepackage[margin=0in,footskip=0in,paperwidth=95cm,paperheight=29cm]geometry
usepackage[english]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagehyperref

usepackagetikz
usetikzlibrarypositioning,backgrounds,fit,calc
tikzset
text field/.style=text height=1.5ex,align=center,rounded corners,
nonfillable title field/.style=text height=2ex,text depth=0.3em,anchor=south,text
width=5cm,align=center,font=footnotesizesffamily,
fillable title field/.style=text height=3.14ex,text depth=0em,anchor=south,text
width=5cm,align=center,font=footnotesizesffamily,
pics/fillable subject/.style=code=- (-Title.south west)
,
pics/nonfillable subject/.style=code=- (-Title.south west)
,
pics/fillable elective subject/.style=code=- (-Title.north east) -- (-Title.south east) -,
pics/nonfillable elective 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,
electives/.style=column sep=-7.25cm,row sep=5mm,
fit sep/.initial=4pt, % change width of node (big rectangle shape)
fit dist/.initial=3cm, % change node distance (big rectangle shape)
inlay top sep/.initial=24pt,
matrix top sep/.initial=24pt,
% From https://tex.stackexchange.com/a/478723/152550

makeatletter% from https://tex.stackexchange.com/a/85531/121799
longdefifnodedefined#1#2#3%
@ifundefinedpgf@sh@ns@#1#3#2%

makeatother

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
ifdefinedmyheight
else
defmyheight0
typeoutPleasespace recompilespace yourspace file!
fi
ifdefinedLstMatShifts
else
defLstMatShifts0pt,0pt,0pt,0pt,0pt
fi
%typeoutheight:myheight
%typeoutshifts(in):LstMatShifts

vfill
centering
beginForm
begintikzpicture
% step 1: add the matrices, name them mat0, mat1 etc.
beginscope[local bounding box=matrices]
matrix[manoooh] (mat0) at (0*mymatdist,LstMatShifts[0])
& pic[local bounding box=A] (A) nonfillable subject=Subject A; & \
& pic (B) nonfillable subject=Subject B; & \
;
matrix[manoooh] (mat1) at (1*mymatdist,LstMatShifts[1])
& pic (C) nonfillable subject=Subject C; & \
& pic (D) nonfillable subject=Subject D; & \
& pic (E) nonfillable subject=Subject E; & \
& pic (F) nonfillable subject=Subject F; & \
& pic (G) nonfillable subject=Subject G; & \
& pic (H) nonfillable subject=Subject H; & \
& pic (I) nonfillable subject=Subject I; & \
& pic[draw=red] (J) nonfillable subject=Subject J; & \
;
matrix[manoooh] (mat2) at (2*mymatdist,LstMatShifts[2])
& pic[draw=red] (K) nonfillable subject=Subject K; & \
& pic (L) nonfillable subject=Subject L; & \
& pic (M) nonfillable subject=Subject A; & \
& pic (N) nonfillable subject=Subject N; & \
& pic (O) nonfillable subject=Subject O; & \
& pic (P) nonfillable subject=Subject P; & \
& pic (Q) nonfillable subject=Subject Q; & \
& pic (R) nonfillable subject=Subject R; & \
;
matrix[manoooh] (mat3) at (3*mymatdist,LstMatShifts[3])
& pic[draw=red] (S) nonfillable subject=Subject S; & \
& pic (T) nonfillable subject=Subject T; & \
& pic (U) nonfillable subject=Subject U; & \
& pic (V) nonfillable subject=Subject V; & \
& pic (W) nonfillable subject=Subject W; & \
& pic (X) nonfillable subject=Subject X; & \
& pic (Y) nonfillable subject=Subject Y; & \
& pic (Z) nonfillable subject=Subject Z; & \
;
matrix[manooohE,column sep=8pt] (matE3) at (3*mymatdist,mymatbottom)
pic (L3E1) nonfillable elective subject=Subject; &
pic (L3E2) nonfillable elective subject=Subject; \
;
matrix[manoooh] (mat4) at (4*mymatdist,LstMatShifts[4])
& pic[draw=red] (AA) nonfillable subject=Subject AA; & \
pic (AB) nonfillable subject=Subject AB; & & pic (AC) nonfillable subject=Subject AC; \
& pic (AD) nonfillable subject=Subject AD; & \
& pic (AE) nonfillable subject=Subject AE; & \
& pic (AF) nonfillable subject=Subject AF; & \
& pic (AG) nonfillable subject=Subject AG; & \
;
matrix[manooohE] (matE4) at (4*mymatdist,mymatbottom)
pic (L4E1) nonfillable elective subject=Subject; \
;
matrix[manoooh] (mat5) at (5*mymatdist,LstMatShifts[5])
& pic (AH) nonfillable subject=Subject AH; & \
& pic (AI) nonfillable subject=Subject AI; & \
& pic[draw=red] (AJ) nonfillable subject=Subject AJ; & \
& pic (AK) nonfillable subject=Subject AK; & \
;
matrix[manooohE] (matE5) at (5*mymatdist,mymatbottom)
& pic (L5E1) nonfillable elective subject=Subject; & \
& pic (L5E2) nonfillable elective subject=Subject; & \
& pic (L5E3) nonfillable elective subject=Subject; & \
& pic (L5E4) nonfillable elective subject=Subject; & \
& pic (L5E5) nonfillable elective subject=Subject; & \
;
endscope
pgfmathsetmacromywidth0
foreach X in 0,...,5 %<- if you have more or less matrices, adjust 3
matX.south),inner ysep=5mm,
minimum width=mymatdist-pgfkeysvalueof/tikz/fit dist/2,
fill=orange!30,rounded corners=50pt](FX);
endscope
%typeoutheight1:myheight %
%
pgfmathsetmacromydistmywidth+2*pgfkeysvalueof/tikz/fit
sep+pgfkeysvalueof/tikz/fit dist
xdefmydistmydist
defmymatbottom0pt
foreach X in 0,...,5 %
ifnodedefinedmatEX-FEX.south);
endscope
%typeoutshifts(end):LstMatShifts
makeatletter
immediatewrite@mainauxxdefstringmymatdistmydist ptrelax
immediatewrite@mainauxxdefstringmymatbottom-mymatbottomrelax
immediatewrite@mainauxxdefstringmyheightmyheightrelax
immediatewrite@mainauxxdefstringLstMatShiftsLstMatShiftsrelax
makeatother

% now add the arrows
foreach X in C,D,E,F,G,H,I,J
draw[very thick,blue,-latex] (A-Title) to[out=0,in=180] (X-Title);
draw[very thick,red,-latex] (B-Title) to[out=0,in=180] (X-Title);

foreach X in L,O
draw[very thick,orange,-latex] (C-Title) to[out=0,in=180] (X-Title);

foreach X in K,N,O,Z
draw[very thick,green,-latex] (D-Title) to[out=0,in=180] (X-Title);

endtikzpicture
endForm

vfill

enddocument


What I have done



Thanks!!









share


























    0















    This is and addendum of a previous question: How to insert elective subjects section within a diagram.



    What I want



    I would like to reduce the length of those nodes that only have a single column of a matrix environment of the Tikz package but keeping the same space between nodes. If possible, also do it automatically (it is not necessary at all, just know what the necessary commands are):



    What I want



    What I have done



    MWE:



    All the following source code belongs to marmot in the incredible accepted answer of the attached question. I only modified the nodes and things like that.



    documentclassarticle
    usepackage[margin=0in,footskip=0in,paperwidth=95cm,paperheight=29cm]geometry
    usepackage[english]babel
    usepackage[utf8]inputenc
    usepackage[T1]fontenc
    usepackagehyperref

    usepackagetikz
    usetikzlibrarypositioning,backgrounds,fit,calc
    tikzset
    text field/.style=text height=1.5ex,align=center,rounded corners,
    nonfillable title field/.style=text height=2ex,text depth=0.3em,anchor=south,text
    width=5cm,align=center,font=footnotesizesffamily,
    fillable title field/.style=text height=3.14ex,text depth=0em,anchor=south,text
    width=5cm,align=center,font=footnotesizesffamily,
    pics/fillable subject/.style=code=- (-Title.south west)
    ,
    pics/nonfillable subject/.style=code=- (-Title.south west)
    ,
    pics/fillable elective subject/.style=code=- (-Title.north east) -- (-Title.south east) -,
    pics/nonfillable elective 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,
    electives/.style=column sep=-7.25cm,row sep=5mm,
    fit sep/.initial=4pt, % change width of node (big rectangle shape)
    fit dist/.initial=3cm, % change node distance (big rectangle shape)
    inlay top sep/.initial=24pt,
    matrix top sep/.initial=24pt,
    % From https://tex.stackexchange.com/a/478723/152550

    makeatletter% from https://tex.stackexchange.com/a/85531/121799
    longdefifnodedefined#1#2#3%
    @ifundefinedpgf@sh@ns@#1#3#2%

    makeatother

    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
    ifdefinedmyheight
    else
    defmyheight0
    typeoutPleasespace recompilespace yourspace file!
    fi
    ifdefinedLstMatShifts
    else
    defLstMatShifts0pt,0pt,0pt,0pt,0pt
    fi
    %typeoutheight:myheight
    %typeoutshifts(in):LstMatShifts

    vfill
    centering
    beginForm
    begintikzpicture
    % step 1: add the matrices, name them mat0, mat1 etc.
    beginscope[local bounding box=matrices]
    matrix[manoooh] (mat0) at (0*mymatdist,LstMatShifts[0])
    & pic[local bounding box=A] (A) nonfillable subject=Subject A; & \
    & pic (B) nonfillable subject=Subject B; & \
    ;
    matrix[manoooh] (mat1) at (1*mymatdist,LstMatShifts[1])
    & pic (C) nonfillable subject=Subject C; & \
    & pic (D) nonfillable subject=Subject D; & \
    & pic (E) nonfillable subject=Subject E; & \
    & pic (F) nonfillable subject=Subject F; & \
    & pic (G) nonfillable subject=Subject G; & \
    & pic (H) nonfillable subject=Subject H; & \
    & pic (I) nonfillable subject=Subject I; & \
    & pic[draw=red] (J) nonfillable subject=Subject J; & \
    ;
    matrix[manoooh] (mat2) at (2*mymatdist,LstMatShifts[2])
    & pic[draw=red] (K) nonfillable subject=Subject K; & \
    & pic (L) nonfillable subject=Subject L; & \
    & pic (M) nonfillable subject=Subject A; & \
    & pic (N) nonfillable subject=Subject N; & \
    & pic (O) nonfillable subject=Subject O; & \
    & pic (P) nonfillable subject=Subject P; & \
    & pic (Q) nonfillable subject=Subject Q; & \
    & pic (R) nonfillable subject=Subject R; & \
    ;
    matrix[manoooh] (mat3) at (3*mymatdist,LstMatShifts[3])
    & pic[draw=red] (S) nonfillable subject=Subject S; & \
    & pic (T) nonfillable subject=Subject T; & \
    & pic (U) nonfillable subject=Subject U; & \
    & pic (V) nonfillable subject=Subject V; & \
    & pic (W) nonfillable subject=Subject W; & \
    & pic (X) nonfillable subject=Subject X; & \
    & pic (Y) nonfillable subject=Subject Y; & \
    & pic (Z) nonfillable subject=Subject Z; & \
    ;
    matrix[manooohE,column sep=8pt] (matE3) at (3*mymatdist,mymatbottom)
    pic (L3E1) nonfillable elective subject=Subject; &
    pic (L3E2) nonfillable elective subject=Subject; \
    ;
    matrix[manoooh] (mat4) at (4*mymatdist,LstMatShifts[4])
    & pic[draw=red] (AA) nonfillable subject=Subject AA; & \
    pic (AB) nonfillable subject=Subject AB; & & pic (AC) nonfillable subject=Subject AC; \
    & pic (AD) nonfillable subject=Subject AD; & \
    & pic (AE) nonfillable subject=Subject AE; & \
    & pic (AF) nonfillable subject=Subject AF; & \
    & pic (AG) nonfillable subject=Subject AG; & \
    ;
    matrix[manooohE] (matE4) at (4*mymatdist,mymatbottom)
    pic (L4E1) nonfillable elective subject=Subject; \
    ;
    matrix[manoooh] (mat5) at (5*mymatdist,LstMatShifts[5])
    & pic (AH) nonfillable subject=Subject AH; & \
    & pic (AI) nonfillable subject=Subject AI; & \
    & pic[draw=red] (AJ) nonfillable subject=Subject AJ; & \
    & pic (AK) nonfillable subject=Subject AK; & \
    ;
    matrix[manooohE] (matE5) at (5*mymatdist,mymatbottom)
    & pic (L5E1) nonfillable elective subject=Subject; & \
    & pic (L5E2) nonfillable elective subject=Subject; & \
    & pic (L5E3) nonfillable elective subject=Subject; & \
    & pic (L5E4) nonfillable elective subject=Subject; & \
    & pic (L5E5) nonfillable elective subject=Subject; & \
    ;
    endscope
    pgfmathsetmacromywidth0
    foreach X in 0,...,5 %<- if you have more or less matrices, adjust 3
    matX.south),inner ysep=5mm,
    minimum width=mymatdist-pgfkeysvalueof/tikz/fit dist/2,
    fill=orange!30,rounded corners=50pt](FX);
    endscope
    %typeoutheight1:myheight %
    %
    pgfmathsetmacromydistmywidth+2*pgfkeysvalueof/tikz/fit
    sep+pgfkeysvalueof/tikz/fit dist
    xdefmydistmydist
    defmymatbottom0pt
    foreach X in 0,...,5 %
    ifnodedefinedmatEX-FEX.south);
    endscope
    %typeoutshifts(end):LstMatShifts
    makeatletter
    immediatewrite@mainauxxdefstringmymatdistmydist ptrelax
    immediatewrite@mainauxxdefstringmymatbottom-mymatbottomrelax
    immediatewrite@mainauxxdefstringmyheightmyheightrelax
    immediatewrite@mainauxxdefstringLstMatShiftsLstMatShiftsrelax
    makeatother

    % now add the arrows
    foreach X in C,D,E,F,G,H,I,J
    draw[very thick,blue,-latex] (A-Title) to[out=0,in=180] (X-Title);
    draw[very thick,red,-latex] (B-Title) to[out=0,in=180] (X-Title);

    foreach X in L,O
    draw[very thick,orange,-latex] (C-Title) to[out=0,in=180] (X-Title);

    foreach X in K,N,O,Z
    draw[very thick,green,-latex] (D-Title) to[out=0,in=180] (X-Title);

    endtikzpicture
    endForm

    vfill

    enddocument


    What I have done



    Thanks!!









    share
























      0












      0








      0








      This is and addendum of a previous question: How to insert elective subjects section within a diagram.



      What I want



      I would like to reduce the length of those nodes that only have a single column of a matrix environment of the Tikz package but keeping the same space between nodes. If possible, also do it automatically (it is not necessary at all, just know what the necessary commands are):



      What I want



      What I have done



      MWE:



      All the following source code belongs to marmot in the incredible accepted answer of the attached question. I only modified the nodes and things like that.



      documentclassarticle
      usepackage[margin=0in,footskip=0in,paperwidth=95cm,paperheight=29cm]geometry
      usepackage[english]babel
      usepackage[utf8]inputenc
      usepackage[T1]fontenc
      usepackagehyperref

      usepackagetikz
      usetikzlibrarypositioning,backgrounds,fit,calc
      tikzset
      text field/.style=text height=1.5ex,align=center,rounded corners,
      nonfillable title field/.style=text height=2ex,text depth=0.3em,anchor=south,text
      width=5cm,align=center,font=footnotesizesffamily,
      fillable title field/.style=text height=3.14ex,text depth=0em,anchor=south,text
      width=5cm,align=center,font=footnotesizesffamily,
      pics/fillable subject/.style=code=- (-Title.south west)
      ,
      pics/nonfillable subject/.style=code=- (-Title.south west)
      ,
      pics/fillable elective subject/.style=code=- (-Title.north east) -- (-Title.south east) -,
      pics/nonfillable elective 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,
      electives/.style=column sep=-7.25cm,row sep=5mm,
      fit sep/.initial=4pt, % change width of node (big rectangle shape)
      fit dist/.initial=3cm, % change node distance (big rectangle shape)
      inlay top sep/.initial=24pt,
      matrix top sep/.initial=24pt,
      % From https://tex.stackexchange.com/a/478723/152550

      makeatletter% from https://tex.stackexchange.com/a/85531/121799
      longdefifnodedefined#1#2#3%
      @ifundefinedpgf@sh@ns@#1#3#2%

      makeatother

      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
      ifdefinedmyheight
      else
      defmyheight0
      typeoutPleasespace recompilespace yourspace file!
      fi
      ifdefinedLstMatShifts
      else
      defLstMatShifts0pt,0pt,0pt,0pt,0pt
      fi
      %typeoutheight:myheight
      %typeoutshifts(in):LstMatShifts

      vfill
      centering
      beginForm
      begintikzpicture
      % step 1: add the matrices, name them mat0, mat1 etc.
      beginscope[local bounding box=matrices]
      matrix[manoooh] (mat0) at (0*mymatdist,LstMatShifts[0])
      & pic[local bounding box=A] (A) nonfillable subject=Subject A; & \
      & pic (B) nonfillable subject=Subject B; & \
      ;
      matrix[manoooh] (mat1) at (1*mymatdist,LstMatShifts[1])
      & pic (C) nonfillable subject=Subject C; & \
      & pic (D) nonfillable subject=Subject D; & \
      & pic (E) nonfillable subject=Subject E; & \
      & pic (F) nonfillable subject=Subject F; & \
      & pic (G) nonfillable subject=Subject G; & \
      & pic (H) nonfillable subject=Subject H; & \
      & pic (I) nonfillable subject=Subject I; & \
      & pic[draw=red] (J) nonfillable subject=Subject J; & \
      ;
      matrix[manoooh] (mat2) at (2*mymatdist,LstMatShifts[2])
      & pic[draw=red] (K) nonfillable subject=Subject K; & \
      & pic (L) nonfillable subject=Subject L; & \
      & pic (M) nonfillable subject=Subject A; & \
      & pic (N) nonfillable subject=Subject N; & \
      & pic (O) nonfillable subject=Subject O; & \
      & pic (P) nonfillable subject=Subject P; & \
      & pic (Q) nonfillable subject=Subject Q; & \
      & pic (R) nonfillable subject=Subject R; & \
      ;
      matrix[manoooh] (mat3) at (3*mymatdist,LstMatShifts[3])
      & pic[draw=red] (S) nonfillable subject=Subject S; & \
      & pic (T) nonfillable subject=Subject T; & \
      & pic (U) nonfillable subject=Subject U; & \
      & pic (V) nonfillable subject=Subject V; & \
      & pic (W) nonfillable subject=Subject W; & \
      & pic (X) nonfillable subject=Subject X; & \
      & pic (Y) nonfillable subject=Subject Y; & \
      & pic (Z) nonfillable subject=Subject Z; & \
      ;
      matrix[manooohE,column sep=8pt] (matE3) at (3*mymatdist,mymatbottom)
      pic (L3E1) nonfillable elective subject=Subject; &
      pic (L3E2) nonfillable elective subject=Subject; \
      ;
      matrix[manoooh] (mat4) at (4*mymatdist,LstMatShifts[4])
      & pic[draw=red] (AA) nonfillable subject=Subject AA; & \
      pic (AB) nonfillable subject=Subject AB; & & pic (AC) nonfillable subject=Subject AC; \
      & pic (AD) nonfillable subject=Subject AD; & \
      & pic (AE) nonfillable subject=Subject AE; & \
      & pic (AF) nonfillable subject=Subject AF; & \
      & pic (AG) nonfillable subject=Subject AG; & \
      ;
      matrix[manooohE] (matE4) at (4*mymatdist,mymatbottom)
      pic (L4E1) nonfillable elective subject=Subject; \
      ;
      matrix[manoooh] (mat5) at (5*mymatdist,LstMatShifts[5])
      & pic (AH) nonfillable subject=Subject AH; & \
      & pic (AI) nonfillable subject=Subject AI; & \
      & pic[draw=red] (AJ) nonfillable subject=Subject AJ; & \
      & pic (AK) nonfillable subject=Subject AK; & \
      ;
      matrix[manooohE] (matE5) at (5*mymatdist,mymatbottom)
      & pic (L5E1) nonfillable elective subject=Subject; & \
      & pic (L5E2) nonfillable elective subject=Subject; & \
      & pic (L5E3) nonfillable elective subject=Subject; & \
      & pic (L5E4) nonfillable elective subject=Subject; & \
      & pic (L5E5) nonfillable elective subject=Subject; & \
      ;
      endscope
      pgfmathsetmacromywidth0
      foreach X in 0,...,5 %<- if you have more or less matrices, adjust 3
      matX.south),inner ysep=5mm,
      minimum width=mymatdist-pgfkeysvalueof/tikz/fit dist/2,
      fill=orange!30,rounded corners=50pt](FX);
      endscope
      %typeoutheight1:myheight %
      %
      pgfmathsetmacromydistmywidth+2*pgfkeysvalueof/tikz/fit
      sep+pgfkeysvalueof/tikz/fit dist
      xdefmydistmydist
      defmymatbottom0pt
      foreach X in 0,...,5 %
      ifnodedefinedmatEX-FEX.south);
      endscope
      %typeoutshifts(end):LstMatShifts
      makeatletter
      immediatewrite@mainauxxdefstringmymatdistmydist ptrelax
      immediatewrite@mainauxxdefstringmymatbottom-mymatbottomrelax
      immediatewrite@mainauxxdefstringmyheightmyheightrelax
      immediatewrite@mainauxxdefstringLstMatShiftsLstMatShiftsrelax
      makeatother

      % now add the arrows
      foreach X in C,D,E,F,G,H,I,J
      draw[very thick,blue,-latex] (A-Title) to[out=0,in=180] (X-Title);
      draw[very thick,red,-latex] (B-Title) to[out=0,in=180] (X-Title);

      foreach X in L,O
      draw[very thick,orange,-latex] (C-Title) to[out=0,in=180] (X-Title);

      foreach X in K,N,O,Z
      draw[very thick,green,-latex] (D-Title) to[out=0,in=180] (X-Title);

      endtikzpicture
      endForm

      vfill

      enddocument


      What I have done



      Thanks!!









      share














      This is and addendum of a previous question: How to insert elective subjects section within a diagram.



      What I want



      I would like to reduce the length of those nodes that only have a single column of a matrix environment of the Tikz package but keeping the same space between nodes. If possible, also do it automatically (it is not necessary at all, just know what the necessary commands are):



      What I want



      What I have done



      MWE:



      All the following source code belongs to marmot in the incredible accepted answer of the attached question. I only modified the nodes and things like that.



      documentclassarticle
      usepackage[margin=0in,footskip=0in,paperwidth=95cm,paperheight=29cm]geometry
      usepackage[english]babel
      usepackage[utf8]inputenc
      usepackage[T1]fontenc
      usepackagehyperref

      usepackagetikz
      usetikzlibrarypositioning,backgrounds,fit,calc
      tikzset
      text field/.style=text height=1.5ex,align=center,rounded corners,
      nonfillable title field/.style=text height=2ex,text depth=0.3em,anchor=south,text
      width=5cm,align=center,font=footnotesizesffamily,
      fillable title field/.style=text height=3.14ex,text depth=0em,anchor=south,text
      width=5cm,align=center,font=footnotesizesffamily,
      pics/fillable subject/.style=code=- (-Title.south west)
      ,
      pics/nonfillable subject/.style=code=- (-Title.south west)
      ,
      pics/fillable elective subject/.style=code=- (-Title.north east) -- (-Title.south east) -,
      pics/nonfillable elective 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,
      electives/.style=column sep=-7.25cm,row sep=5mm,
      fit sep/.initial=4pt, % change width of node (big rectangle shape)
      fit dist/.initial=3cm, % change node distance (big rectangle shape)
      inlay top sep/.initial=24pt,
      matrix top sep/.initial=24pt,
      % From https://tex.stackexchange.com/a/478723/152550

      makeatletter% from https://tex.stackexchange.com/a/85531/121799
      longdefifnodedefined#1#2#3%
      @ifundefinedpgf@sh@ns@#1#3#2%

      makeatother

      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
      ifdefinedmyheight
      else
      defmyheight0
      typeoutPleasespace recompilespace yourspace file!
      fi
      ifdefinedLstMatShifts
      else
      defLstMatShifts0pt,0pt,0pt,0pt,0pt
      fi
      %typeoutheight:myheight
      %typeoutshifts(in):LstMatShifts

      vfill
      centering
      beginForm
      begintikzpicture
      % step 1: add the matrices, name them mat0, mat1 etc.
      beginscope[local bounding box=matrices]
      matrix[manoooh] (mat0) at (0*mymatdist,LstMatShifts[0])
      & pic[local bounding box=A] (A) nonfillable subject=Subject A; & \
      & pic (B) nonfillable subject=Subject B; & \
      ;
      matrix[manoooh] (mat1) at (1*mymatdist,LstMatShifts[1])
      & pic (C) nonfillable subject=Subject C; & \
      & pic (D) nonfillable subject=Subject D; & \
      & pic (E) nonfillable subject=Subject E; & \
      & pic (F) nonfillable subject=Subject F; & \
      & pic (G) nonfillable subject=Subject G; & \
      & pic (H) nonfillable subject=Subject H; & \
      & pic (I) nonfillable subject=Subject I; & \
      & pic[draw=red] (J) nonfillable subject=Subject J; & \
      ;
      matrix[manoooh] (mat2) at (2*mymatdist,LstMatShifts[2])
      & pic[draw=red] (K) nonfillable subject=Subject K; & \
      & pic (L) nonfillable subject=Subject L; & \
      & pic (M) nonfillable subject=Subject A; & \
      & pic (N) nonfillable subject=Subject N; & \
      & pic (O) nonfillable subject=Subject O; & \
      & pic (P) nonfillable subject=Subject P; & \
      & pic (Q) nonfillable subject=Subject Q; & \
      & pic (R) nonfillable subject=Subject R; & \
      ;
      matrix[manoooh] (mat3) at (3*mymatdist,LstMatShifts[3])
      & pic[draw=red] (S) nonfillable subject=Subject S; & \
      & pic (T) nonfillable subject=Subject T; & \
      & pic (U) nonfillable subject=Subject U; & \
      & pic (V) nonfillable subject=Subject V; & \
      & pic (W) nonfillable subject=Subject W; & \
      & pic (X) nonfillable subject=Subject X; & \
      & pic (Y) nonfillable subject=Subject Y; & \
      & pic (Z) nonfillable subject=Subject Z; & \
      ;
      matrix[manooohE,column sep=8pt] (matE3) at (3*mymatdist,mymatbottom)
      pic (L3E1) nonfillable elective subject=Subject; &
      pic (L3E2) nonfillable elective subject=Subject; \
      ;
      matrix[manoooh] (mat4) at (4*mymatdist,LstMatShifts[4])
      & pic[draw=red] (AA) nonfillable subject=Subject AA; & \
      pic (AB) nonfillable subject=Subject AB; & & pic (AC) nonfillable subject=Subject AC; \
      & pic (AD) nonfillable subject=Subject AD; & \
      & pic (AE) nonfillable subject=Subject AE; & \
      & pic (AF) nonfillable subject=Subject AF; & \
      & pic (AG) nonfillable subject=Subject AG; & \
      ;
      matrix[manooohE] (matE4) at (4*mymatdist,mymatbottom)
      pic (L4E1) nonfillable elective subject=Subject; \
      ;
      matrix[manoooh] (mat5) at (5*mymatdist,LstMatShifts[5])
      & pic (AH) nonfillable subject=Subject AH; & \
      & pic (AI) nonfillable subject=Subject AI; & \
      & pic[draw=red] (AJ) nonfillable subject=Subject AJ; & \
      & pic (AK) nonfillable subject=Subject AK; & \
      ;
      matrix[manooohE] (matE5) at (5*mymatdist,mymatbottom)
      & pic (L5E1) nonfillable elective subject=Subject; & \
      & pic (L5E2) nonfillable elective subject=Subject; & \
      & pic (L5E3) nonfillable elective subject=Subject; & \
      & pic (L5E4) nonfillable elective subject=Subject; & \
      & pic (L5E5) nonfillable elective subject=Subject; & \
      ;
      endscope
      pgfmathsetmacromywidth0
      foreach X in 0,...,5 %<- if you have more or less matrices, adjust 3
      matX.south),inner ysep=5mm,
      minimum width=mymatdist-pgfkeysvalueof/tikz/fit dist/2,
      fill=orange!30,rounded corners=50pt](FX);
      endscope
      %typeoutheight1:myheight %
      %
      pgfmathsetmacromydistmywidth+2*pgfkeysvalueof/tikz/fit
      sep+pgfkeysvalueof/tikz/fit dist
      xdefmydistmydist
      defmymatbottom0pt
      foreach X in 0,...,5 %
      ifnodedefinedmatEX-FEX.south);
      endscope
      %typeoutshifts(end):LstMatShifts
      makeatletter
      immediatewrite@mainauxxdefstringmymatdistmydist ptrelax
      immediatewrite@mainauxxdefstringmymatbottom-mymatbottomrelax
      immediatewrite@mainauxxdefstringmyheightmyheightrelax
      immediatewrite@mainauxxdefstringLstMatShiftsLstMatShiftsrelax
      makeatother

      % now add the arrows
      foreach X in C,D,E,F,G,H,I,J
      draw[very thick,blue,-latex] (A-Title) to[out=0,in=180] (X-Title);
      draw[very thick,red,-latex] (B-Title) to[out=0,in=180] (X-Title);

      foreach X in L,O
      draw[very thick,orange,-latex] (C-Title) to[out=0,in=180] (X-Title);

      foreach X in K,N,O,Z
      draw[very thick,green,-latex] (D-Title) to[out=0,in=180] (X-Title);

      endtikzpicture
      endForm

      vfill

      enddocument


      What I have done



      Thanks!!







      tikz-pgf horizontal-alignment





      share












      share










      share



      share










      asked 2 mins ago









      manoooohmanooooh

      1,0171516




      1,0171516




















          0






          active

          oldest

          votes











          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%2f480186%2fhow-to-determine-nodes-to-reduce-their-length-automatically-using-tikzpicture%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          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%2f480186%2fhow-to-determine-nodes-to-reduce-their-length-automatically-using-tikzpicture%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

          Isabella Eugénie Boyer Biographie | Références | Menu de navigationmodifiermodifier le codeComparator to Compute the Relative Value of a U.S. Dollar Amount – 1774 to Present.

          Lioubotyn Sommaire Géographie | Histoire | Population | Notes et références | Liens externes | Menu de navigationlubotin.kharkov.uamodifier« Recensements et estimations de la population depuis 1897 »« Office des statistiques d'Ukraine : population au 1er janvier 2010, 2011 et 2012 »« Office des statistiques d'Ukraine : population au 1er janvier 2011, 2012 et 2013 »Informations officiellesCartes topographiquesCarte routièrem

          Mpande kaSenzangakhona Biographie | Références | Menu de navigationmodifierMpande kaSenzangakhonavoir la liste des auteursm