How to outline a curriculum/course tree?











up vote
2
down vote

favorite
1












For the desired output curriculum/course tree below, what is the best approach to reproduce the same conceivable (i.e. to recognize the course prerequisites) output using latex without the need to draw it myself manually?



In other words, is it possible to find a way to define my input to be: (a) the courses names, (b) their prerequisites, and (c) their parent level, while latex optimizes the courses/nodes placement and connects each course with its prerequisites?



enter image description here










share|improve this question


















  • 1




    something like this: tex.stackexchange.com/q/203692/15036 ?
    – Thruston
    Nov 14 at 16:52












  • I don't know, but do you think that adding a few right of and below of keys is really more effort than trying to find the right graph drawing algorithm, and to nudge the boxes if you don't like the result?
    – marmot
    Nov 14 at 17:11










  • @marmot For this MWE, you are right. However, for more than 60 courses in 5 levels with different dependencies, I need to find a more robust solution if possible. If the robust solution is not easy to find nor doable, the manual approach is OK for me.
    – Diaa
    Nov 14 at 17:16






  • 1




    Does it helps? tex.stackexchange.com/a/141244/1952
    – Ignasi
    Nov 14 at 18:59















up vote
2
down vote

favorite
1












For the desired output curriculum/course tree below, what is the best approach to reproduce the same conceivable (i.e. to recognize the course prerequisites) output using latex without the need to draw it myself manually?



In other words, is it possible to find a way to define my input to be: (a) the courses names, (b) their prerequisites, and (c) their parent level, while latex optimizes the courses/nodes placement and connects each course with its prerequisites?



enter image description here










share|improve this question


















  • 1




    something like this: tex.stackexchange.com/q/203692/15036 ?
    – Thruston
    Nov 14 at 16:52












  • I don't know, but do you think that adding a few right of and below of keys is really more effort than trying to find the right graph drawing algorithm, and to nudge the boxes if you don't like the result?
    – marmot
    Nov 14 at 17:11










  • @marmot For this MWE, you are right. However, for more than 60 courses in 5 levels with different dependencies, I need to find a more robust solution if possible. If the robust solution is not easy to find nor doable, the manual approach is OK for me.
    – Diaa
    Nov 14 at 17:16






  • 1




    Does it helps? tex.stackexchange.com/a/141244/1952
    – Ignasi
    Nov 14 at 18:59













up vote
2
down vote

favorite
1









up vote
2
down vote

favorite
1






1





For the desired output curriculum/course tree below, what is the best approach to reproduce the same conceivable (i.e. to recognize the course prerequisites) output using latex without the need to draw it myself manually?



In other words, is it possible to find a way to define my input to be: (a) the courses names, (b) their prerequisites, and (c) their parent level, while latex optimizes the courses/nodes placement and connects each course with its prerequisites?



enter image description here










share|improve this question













For the desired output curriculum/course tree below, what is the best approach to reproduce the same conceivable (i.e. to recognize the course prerequisites) output using latex without the need to draw it myself manually?



In other words, is it possible to find a way to define my input to be: (a) the courses names, (b) their prerequisites, and (c) their parent level, while latex optimizes the courses/nodes placement and connects each course with its prerequisites?



enter image description here







tikz-pgf






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 14 at 16:45









Diaa

2,51711644




2,51711644








  • 1




    something like this: tex.stackexchange.com/q/203692/15036 ?
    – Thruston
    Nov 14 at 16:52












  • I don't know, but do you think that adding a few right of and below of keys is really more effort than trying to find the right graph drawing algorithm, and to nudge the boxes if you don't like the result?
    – marmot
    Nov 14 at 17:11










  • @marmot For this MWE, you are right. However, for more than 60 courses in 5 levels with different dependencies, I need to find a more robust solution if possible. If the robust solution is not easy to find nor doable, the manual approach is OK for me.
    – Diaa
    Nov 14 at 17:16






  • 1




    Does it helps? tex.stackexchange.com/a/141244/1952
    – Ignasi
    Nov 14 at 18:59














  • 1




    something like this: tex.stackexchange.com/q/203692/15036 ?
    – Thruston
    Nov 14 at 16:52












  • I don't know, but do you think that adding a few right of and below of keys is really more effort than trying to find the right graph drawing algorithm, and to nudge the boxes if you don't like the result?
    – marmot
    Nov 14 at 17:11










  • @marmot For this MWE, you are right. However, for more than 60 courses in 5 levels with different dependencies, I need to find a more robust solution if possible. If the robust solution is not easy to find nor doable, the manual approach is OK for me.
    – Diaa
    Nov 14 at 17:16






  • 1




    Does it helps? tex.stackexchange.com/a/141244/1952
    – Ignasi
    Nov 14 at 18:59








1




1




something like this: tex.stackexchange.com/q/203692/15036 ?
– Thruston
Nov 14 at 16:52






something like this: tex.stackexchange.com/q/203692/15036 ?
– Thruston
Nov 14 at 16:52














I don't know, but do you think that adding a few right of and below of keys is really more effort than trying to find the right graph drawing algorithm, and to nudge the boxes if you don't like the result?
– marmot
Nov 14 at 17:11




I don't know, but do you think that adding a few right of and below of keys is really more effort than trying to find the right graph drawing algorithm, and to nudge the boxes if you don't like the result?
– marmot
Nov 14 at 17:11












@marmot For this MWE, you are right. However, for more than 60 courses in 5 levels with different dependencies, I need to find a more robust solution if possible. If the robust solution is not easy to find nor doable, the manual approach is OK for me.
– Diaa
Nov 14 at 17:16




@marmot For this MWE, you are right. However, for more than 60 courses in 5 levels with different dependencies, I need to find a more robust solution if possible. If the robust solution is not easy to find nor doable, the manual approach is OK for me.
– Diaa
Nov 14 at 17:16




1




1




Does it helps? tex.stackexchange.com/a/141244/1952
– Ignasi
Nov 14 at 18:59




Does it helps? tex.stackexchange.com/a/141244/1952
– Ignasi
Nov 14 at 18:59










1 Answer
1






active

oldest

votes

















up vote
1
down vote













Not an answer but to tell you how much effort it would be to draw this one by hand. I hope to see another, more automatic answer and thus learn something new.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{positioning,fit}
begin{document}
begin{tikzpicture}[course/.style={draw,minimum width=2cm,minimum
height=8mm,node contents={Course #1},name=n#1},
font=sffamily,node distance=2cm and 1cm]
node[course=1];
node[right=of n1,course=2];
node[right=of n2,course=3];
node[below=of n1,course=5];
node[right=of n5,course=6];
node[right=1.8cm of n6,course=4];
%
node[below=of n5,course=9];
node[right=2.3cm of n9,course=7];
node[right=of n7,course=8];
node[below right=2cm and -0.5cm of n9,course=10];
node[right=1.8cm of n10,course=11];
node[right=of n11,course=12];
%
begin{scope}[thick]
draw (n1) -- (n5) coordinate[midway] (aux1)
(n6.140) |- (aux1) (n2) -- (n6)
(n6.-40) coordinate(aux2) -- (n7.north -| aux2)
(n3.-155) coordinate(aux3) -- (n7.north -| aux3)
(n9.-35) coordinate(aux4) -- (n10.north -| aux4)
(n12.40) |- (n4)
(n7.south) -- ++ (0,-0.4) coordinate(aux5) -| (n10)
(aux5) -| (n12);
%
node[fit=(n1) (n4),inner xsep=8mm,inner ysep=2mm] (fit1){};
draw ([xshift=2mm]fit1.south west) -| (fit1.north west)
node[pos=0.75,left=3mm,font=sffamilybfseries]{Level 1} -- ++(2mm,0);
%
node[fit=(n9) (n12),inner xsep=8mm,inner ysep=2mm] (fit2){};
draw ([xshift=2mm]fit2.south west) -| (fit2.north west)
node[pos=0.75,left=3mm,font=sffamilybfseries]{Level 2} -- ++(2mm,0);
end{scope}
end{tikzpicture}
end{document}


enter image description here






share|improve this answer





















    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',
    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%2f459976%2fhow-to-outline-a-curriculum-course-tree%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








    up vote
    1
    down vote













    Not an answer but to tell you how much effort it would be to draw this one by hand. I hope to see another, more automatic answer and thus learn something new.



    documentclass[tikz,border=3.14mm]{standalone}
    usetikzlibrary{positioning,fit}
    begin{document}
    begin{tikzpicture}[course/.style={draw,minimum width=2cm,minimum
    height=8mm,node contents={Course #1},name=n#1},
    font=sffamily,node distance=2cm and 1cm]
    node[course=1];
    node[right=of n1,course=2];
    node[right=of n2,course=3];
    node[below=of n1,course=5];
    node[right=of n5,course=6];
    node[right=1.8cm of n6,course=4];
    %
    node[below=of n5,course=9];
    node[right=2.3cm of n9,course=7];
    node[right=of n7,course=8];
    node[below right=2cm and -0.5cm of n9,course=10];
    node[right=1.8cm of n10,course=11];
    node[right=of n11,course=12];
    %
    begin{scope}[thick]
    draw (n1) -- (n5) coordinate[midway] (aux1)
    (n6.140) |- (aux1) (n2) -- (n6)
    (n6.-40) coordinate(aux2) -- (n7.north -| aux2)
    (n3.-155) coordinate(aux3) -- (n7.north -| aux3)
    (n9.-35) coordinate(aux4) -- (n10.north -| aux4)
    (n12.40) |- (n4)
    (n7.south) -- ++ (0,-0.4) coordinate(aux5) -| (n10)
    (aux5) -| (n12);
    %
    node[fit=(n1) (n4),inner xsep=8mm,inner ysep=2mm] (fit1){};
    draw ([xshift=2mm]fit1.south west) -| (fit1.north west)
    node[pos=0.75,left=3mm,font=sffamilybfseries]{Level 1} -- ++(2mm,0);
    %
    node[fit=(n9) (n12),inner xsep=8mm,inner ysep=2mm] (fit2){};
    draw ([xshift=2mm]fit2.south west) -| (fit2.north west)
    node[pos=0.75,left=3mm,font=sffamilybfseries]{Level 2} -- ++(2mm,0);
    end{scope}
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer

























      up vote
      1
      down vote













      Not an answer but to tell you how much effort it would be to draw this one by hand. I hope to see another, more automatic answer and thus learn something new.



      documentclass[tikz,border=3.14mm]{standalone}
      usetikzlibrary{positioning,fit}
      begin{document}
      begin{tikzpicture}[course/.style={draw,minimum width=2cm,minimum
      height=8mm,node contents={Course #1},name=n#1},
      font=sffamily,node distance=2cm and 1cm]
      node[course=1];
      node[right=of n1,course=2];
      node[right=of n2,course=3];
      node[below=of n1,course=5];
      node[right=of n5,course=6];
      node[right=1.8cm of n6,course=4];
      %
      node[below=of n5,course=9];
      node[right=2.3cm of n9,course=7];
      node[right=of n7,course=8];
      node[below right=2cm and -0.5cm of n9,course=10];
      node[right=1.8cm of n10,course=11];
      node[right=of n11,course=12];
      %
      begin{scope}[thick]
      draw (n1) -- (n5) coordinate[midway] (aux1)
      (n6.140) |- (aux1) (n2) -- (n6)
      (n6.-40) coordinate(aux2) -- (n7.north -| aux2)
      (n3.-155) coordinate(aux3) -- (n7.north -| aux3)
      (n9.-35) coordinate(aux4) -- (n10.north -| aux4)
      (n12.40) |- (n4)
      (n7.south) -- ++ (0,-0.4) coordinate(aux5) -| (n10)
      (aux5) -| (n12);
      %
      node[fit=(n1) (n4),inner xsep=8mm,inner ysep=2mm] (fit1){};
      draw ([xshift=2mm]fit1.south west) -| (fit1.north west)
      node[pos=0.75,left=3mm,font=sffamilybfseries]{Level 1} -- ++(2mm,0);
      %
      node[fit=(n9) (n12),inner xsep=8mm,inner ysep=2mm] (fit2){};
      draw ([xshift=2mm]fit2.south west) -| (fit2.north west)
      node[pos=0.75,left=3mm,font=sffamilybfseries]{Level 2} -- ++(2mm,0);
      end{scope}
      end{tikzpicture}
      end{document}


      enter image description here






      share|improve this answer























        up vote
        1
        down vote










        up vote
        1
        down vote









        Not an answer but to tell you how much effort it would be to draw this one by hand. I hope to see another, more automatic answer and thus learn something new.



        documentclass[tikz,border=3.14mm]{standalone}
        usetikzlibrary{positioning,fit}
        begin{document}
        begin{tikzpicture}[course/.style={draw,minimum width=2cm,minimum
        height=8mm,node contents={Course #1},name=n#1},
        font=sffamily,node distance=2cm and 1cm]
        node[course=1];
        node[right=of n1,course=2];
        node[right=of n2,course=3];
        node[below=of n1,course=5];
        node[right=of n5,course=6];
        node[right=1.8cm of n6,course=4];
        %
        node[below=of n5,course=9];
        node[right=2.3cm of n9,course=7];
        node[right=of n7,course=8];
        node[below right=2cm and -0.5cm of n9,course=10];
        node[right=1.8cm of n10,course=11];
        node[right=of n11,course=12];
        %
        begin{scope}[thick]
        draw (n1) -- (n5) coordinate[midway] (aux1)
        (n6.140) |- (aux1) (n2) -- (n6)
        (n6.-40) coordinate(aux2) -- (n7.north -| aux2)
        (n3.-155) coordinate(aux3) -- (n7.north -| aux3)
        (n9.-35) coordinate(aux4) -- (n10.north -| aux4)
        (n12.40) |- (n4)
        (n7.south) -- ++ (0,-0.4) coordinate(aux5) -| (n10)
        (aux5) -| (n12);
        %
        node[fit=(n1) (n4),inner xsep=8mm,inner ysep=2mm] (fit1){};
        draw ([xshift=2mm]fit1.south west) -| (fit1.north west)
        node[pos=0.75,left=3mm,font=sffamilybfseries]{Level 1} -- ++(2mm,0);
        %
        node[fit=(n9) (n12),inner xsep=8mm,inner ysep=2mm] (fit2){};
        draw ([xshift=2mm]fit2.south west) -| (fit2.north west)
        node[pos=0.75,left=3mm,font=sffamilybfseries]{Level 2} -- ++(2mm,0);
        end{scope}
        end{tikzpicture}
        end{document}


        enter image description here






        share|improve this answer












        Not an answer but to tell you how much effort it would be to draw this one by hand. I hope to see another, more automatic answer and thus learn something new.



        documentclass[tikz,border=3.14mm]{standalone}
        usetikzlibrary{positioning,fit}
        begin{document}
        begin{tikzpicture}[course/.style={draw,minimum width=2cm,minimum
        height=8mm,node contents={Course #1},name=n#1},
        font=sffamily,node distance=2cm and 1cm]
        node[course=1];
        node[right=of n1,course=2];
        node[right=of n2,course=3];
        node[below=of n1,course=5];
        node[right=of n5,course=6];
        node[right=1.8cm of n6,course=4];
        %
        node[below=of n5,course=9];
        node[right=2.3cm of n9,course=7];
        node[right=of n7,course=8];
        node[below right=2cm and -0.5cm of n9,course=10];
        node[right=1.8cm of n10,course=11];
        node[right=of n11,course=12];
        %
        begin{scope}[thick]
        draw (n1) -- (n5) coordinate[midway] (aux1)
        (n6.140) |- (aux1) (n2) -- (n6)
        (n6.-40) coordinate(aux2) -- (n7.north -| aux2)
        (n3.-155) coordinate(aux3) -- (n7.north -| aux3)
        (n9.-35) coordinate(aux4) -- (n10.north -| aux4)
        (n12.40) |- (n4)
        (n7.south) -- ++ (0,-0.4) coordinate(aux5) -| (n10)
        (aux5) -| (n12);
        %
        node[fit=(n1) (n4),inner xsep=8mm,inner ysep=2mm] (fit1){};
        draw ([xshift=2mm]fit1.south west) -| (fit1.north west)
        node[pos=0.75,left=3mm,font=sffamilybfseries]{Level 1} -- ++(2mm,0);
        %
        node[fit=(n9) (n12),inner xsep=8mm,inner ysep=2mm] (fit2){};
        draw ([xshift=2mm]fit2.south west) -| (fit2.north west)
        node[pos=0.75,left=3mm,font=sffamilybfseries]{Level 2} -- ++(2mm,0);
        end{scope}
        end{tikzpicture}
        end{document}


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 14 at 17:37









        marmot

        76.6k487161




        76.6k487161






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459976%2fhow-to-outline-a-curriculum-course-tree%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to send String Array data to Server using php in android

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Is anime1.com a legal site for watching anime?