Tree with two roots












2














I want to put the root certs, under ca root, (but not in the same tree).
Here is my mwe



documentclass{article}
usepackage{xcolor}
usepackage{tikz}
setlength{parindent}{0pt}
usetikzlibrary{calc}
usetikzlibrary{backgrounds}
usetikzlibrary{chains}
usetikzlibrary{trees}

begin{document}
tikzstyle{every node}=[draw=black,thick,anchor=west]
tikzstyle{selected}=[dashed,fill=red!30]
tikzstyle{optional}=[dashed,fill=blue!50]
begin{tikzpicture}[%
grow via three points={one child at (0.5,-0.7) and
two children at (0.5,-0.7) and (0.5,-1.4)},
show background rectangle,
background rectangle/.style={fill=gray!10},
edge from parent path={(tikzparentnode.south) |- (tikzchildnode.west)}]
node {ca}
child { node {root-ca}
child { node {01.pem}}
child { node {02.pem}}
child { node {db}
child { node {...}}}
child [missing] {}
child { node {private}
child { node {root-ca.key}}}
}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child { node {root-ca.crt}}
child { node {root-ca.csr}}
child { node {signing-ca}
child { node [selected]{01.pem}}
child { node{02.pem}}
child { node {db}
child { node {...}}}
child [missing] {}
child { node {private}
child { node {signing-ca.key}}}
}
child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {}
child { node {root-ca.crt}}
child { node {root-ca.csr}};
end{tikzpicture}
begin{tikzpicture}[%
grow via three points={one child at (0.5,-0.7) and
two children at (0.5,-0.7) and (0.5,-1.4)},
show background rectangle,
background rectangle/.style={fill=gray!10},
edge from parent path={(tikzparentnode.south) |- (tikzchildnode.west)}]
node {certs}
child { node {simple.org.crt}}
child { node {simple.org.csr}}
child { node [optional]{simple.org.key}};
end{tikzpicture}
end{document}


And here the outputenter image description here










share|improve this question




















  • 1




    I change my code to be compilable
    – Warok
    Dec 2 '18 at 15:20










  • Oh, you used two tikzpictures to get that output. That makes more sense :-).
    – cfr
    Dec 2 '18 at 21:59
















2














I want to put the root certs, under ca root, (but not in the same tree).
Here is my mwe



documentclass{article}
usepackage{xcolor}
usepackage{tikz}
setlength{parindent}{0pt}
usetikzlibrary{calc}
usetikzlibrary{backgrounds}
usetikzlibrary{chains}
usetikzlibrary{trees}

begin{document}
tikzstyle{every node}=[draw=black,thick,anchor=west]
tikzstyle{selected}=[dashed,fill=red!30]
tikzstyle{optional}=[dashed,fill=blue!50]
begin{tikzpicture}[%
grow via three points={one child at (0.5,-0.7) and
two children at (0.5,-0.7) and (0.5,-1.4)},
show background rectangle,
background rectangle/.style={fill=gray!10},
edge from parent path={(tikzparentnode.south) |- (tikzchildnode.west)}]
node {ca}
child { node {root-ca}
child { node {01.pem}}
child { node {02.pem}}
child { node {db}
child { node {...}}}
child [missing] {}
child { node {private}
child { node {root-ca.key}}}
}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child { node {root-ca.crt}}
child { node {root-ca.csr}}
child { node {signing-ca}
child { node [selected]{01.pem}}
child { node{02.pem}}
child { node {db}
child { node {...}}}
child [missing] {}
child { node {private}
child { node {signing-ca.key}}}
}
child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {}
child { node {root-ca.crt}}
child { node {root-ca.csr}};
end{tikzpicture}
begin{tikzpicture}[%
grow via three points={one child at (0.5,-0.7) and
two children at (0.5,-0.7) and (0.5,-1.4)},
show background rectangle,
background rectangle/.style={fill=gray!10},
edge from parent path={(tikzparentnode.south) |- (tikzchildnode.west)}]
node {certs}
child { node {simple.org.crt}}
child { node {simple.org.csr}}
child { node [optional]{simple.org.key}};
end{tikzpicture}
end{document}


And here the outputenter image description here










share|improve this question




















  • 1




    I change my code to be compilable
    – Warok
    Dec 2 '18 at 15:20










  • Oh, you used two tikzpictures to get that output. That makes more sense :-).
    – cfr
    Dec 2 '18 at 21:59














2












2








2


1





I want to put the root certs, under ca root, (but not in the same tree).
Here is my mwe



documentclass{article}
usepackage{xcolor}
usepackage{tikz}
setlength{parindent}{0pt}
usetikzlibrary{calc}
usetikzlibrary{backgrounds}
usetikzlibrary{chains}
usetikzlibrary{trees}

begin{document}
tikzstyle{every node}=[draw=black,thick,anchor=west]
tikzstyle{selected}=[dashed,fill=red!30]
tikzstyle{optional}=[dashed,fill=blue!50]
begin{tikzpicture}[%
grow via three points={one child at (0.5,-0.7) and
two children at (0.5,-0.7) and (0.5,-1.4)},
show background rectangle,
background rectangle/.style={fill=gray!10},
edge from parent path={(tikzparentnode.south) |- (tikzchildnode.west)}]
node {ca}
child { node {root-ca}
child { node {01.pem}}
child { node {02.pem}}
child { node {db}
child { node {...}}}
child [missing] {}
child { node {private}
child { node {root-ca.key}}}
}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child { node {root-ca.crt}}
child { node {root-ca.csr}}
child { node {signing-ca}
child { node [selected]{01.pem}}
child { node{02.pem}}
child { node {db}
child { node {...}}}
child [missing] {}
child { node {private}
child { node {signing-ca.key}}}
}
child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {}
child { node {root-ca.crt}}
child { node {root-ca.csr}};
end{tikzpicture}
begin{tikzpicture}[%
grow via three points={one child at (0.5,-0.7) and
two children at (0.5,-0.7) and (0.5,-1.4)},
show background rectangle,
background rectangle/.style={fill=gray!10},
edge from parent path={(tikzparentnode.south) |- (tikzchildnode.west)}]
node {certs}
child { node {simple.org.crt}}
child { node {simple.org.csr}}
child { node [optional]{simple.org.key}};
end{tikzpicture}
end{document}


And here the outputenter image description here










share|improve this question















I want to put the root certs, under ca root, (but not in the same tree).
Here is my mwe



documentclass{article}
usepackage{xcolor}
usepackage{tikz}
setlength{parindent}{0pt}
usetikzlibrary{calc}
usetikzlibrary{backgrounds}
usetikzlibrary{chains}
usetikzlibrary{trees}

begin{document}
tikzstyle{every node}=[draw=black,thick,anchor=west]
tikzstyle{selected}=[dashed,fill=red!30]
tikzstyle{optional}=[dashed,fill=blue!50]
begin{tikzpicture}[%
grow via three points={one child at (0.5,-0.7) and
two children at (0.5,-0.7) and (0.5,-1.4)},
show background rectangle,
background rectangle/.style={fill=gray!10},
edge from parent path={(tikzparentnode.south) |- (tikzchildnode.west)}]
node {ca}
child { node {root-ca}
child { node {01.pem}}
child { node {02.pem}}
child { node {db}
child { node {...}}}
child [missing] {}
child { node {private}
child { node {root-ca.key}}}
}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child { node {root-ca.crt}}
child { node {root-ca.csr}}
child { node {signing-ca}
child { node [selected]{01.pem}}
child { node{02.pem}}
child { node {db}
child { node {...}}}
child [missing] {}
child { node {private}
child { node {signing-ca.key}}}
}
child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {}
child { node {root-ca.crt}}
child { node {root-ca.csr}};
end{tikzpicture}
begin{tikzpicture}[%
grow via three points={one child at (0.5,-0.7) and
two children at (0.5,-0.7) and (0.5,-1.4)},
show background rectangle,
background rectangle/.style={fill=gray!10},
edge from parent path={(tikzparentnode.south) |- (tikzchildnode.west)}]
node {certs}
child { node {simple.org.crt}}
child { node {simple.org.csr}}
child { node [optional]{simple.org.key}};
end{tikzpicture}
end{document}


And here the outputenter image description here







tikz-trees






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 2 '18 at 15:20

























asked Dec 2 '18 at 15:07









Warok

947




947








  • 1




    I change my code to be compilable
    – Warok
    Dec 2 '18 at 15:20










  • Oh, you used two tikzpictures to get that output. That makes more sense :-).
    – cfr
    Dec 2 '18 at 21:59














  • 1




    I change my code to be compilable
    – Warok
    Dec 2 '18 at 15:20










  • Oh, you used two tikzpictures to get that output. That makes more sense :-).
    – cfr
    Dec 2 '18 at 21:59








1




1




I change my code to be compilable
– Warok
Dec 2 '18 at 15:20




I change my code to be compilable
– Warok
Dec 2 '18 at 15:20












Oh, you used two tikzpictures to get that output. That makes more sense :-).
– cfr
Dec 2 '18 at 21:59




Oh, you used two tikzpictures to get that output. That makes more sense :-).
– cfr
Dec 2 '18 at 21:59










1 Answer
1






active

oldest

votes


















6














I can't reproduce your output and don't know how mycolor is defined, but you can use the positioning library:



documentclass{standalone}

usepackage{tikz}
usetikzlibrary{trees,backgrounds,positioning}
begin{document}

tikzset{every node/.style={draw=black,thick,anchor=west},
selected/.style={dashed,fill=red!30},
optional/.style={dashed,fill=gray!50},}
begin{tikzpicture}[%
grow via three points={one child at (0.5,-0.7) and
two children at (0.5,-0.7) and (0.5,-1.4)},
show background rectangle,
background rectangle/.style={fill=gray!10},
edge from parent path={(tikzparentnode.south) |- (tikzchildnode.west)}]
node (ca) {ca}
child { node {root-ca}
child { node {01.pem}}
child { node {02.pem}}
child { node {db}
child { node {...}}}
child [missing] {}
child { node {private}
child { node {root-ca.key}}}
}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child { node {root-ca.crt}}
child { node {root-ca.csr}}
child { node {signing-ca}
child { node [selected]{01.pem}}
child { node{02.pem}}
child { node {db}
child { node {...}}}
child [missing] {}
child { node {private}
child { node {signing-ca.key}}}
}
child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {}
child { node {root-ca.crt}}
child { node {root-ca.csr}};

node [below=of ca.center |- current bounding box.south] {certs}
child { node {simple.org.crt}}
child { node {simple.org.csr}}
child { node [optional]{simple.org.key}};
end{tikzpicture}
end{document}


tree below tree






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',
    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%2f462820%2ftree-with-two-roots%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









    6














    I can't reproduce your output and don't know how mycolor is defined, but you can use the positioning library:



    documentclass{standalone}

    usepackage{tikz}
    usetikzlibrary{trees,backgrounds,positioning}
    begin{document}

    tikzset{every node/.style={draw=black,thick,anchor=west},
    selected/.style={dashed,fill=red!30},
    optional/.style={dashed,fill=gray!50},}
    begin{tikzpicture}[%
    grow via three points={one child at (0.5,-0.7) and
    two children at (0.5,-0.7) and (0.5,-1.4)},
    show background rectangle,
    background rectangle/.style={fill=gray!10},
    edge from parent path={(tikzparentnode.south) |- (tikzchildnode.west)}]
    node (ca) {ca}
    child { node {root-ca}
    child { node {01.pem}}
    child { node {02.pem}}
    child { node {db}
    child { node {...}}}
    child [missing] {}
    child { node {private}
    child { node {root-ca.key}}}
    }
    child [missing] {}
    child [missing] {}
    child [missing] {}
    child [missing] {}
    child [missing] {}
    child [missing] {}
    child { node {root-ca.crt}}
    child { node {root-ca.csr}}
    child { node {signing-ca}
    child { node [selected]{01.pem}}
    child { node{02.pem}}
    child { node {db}
    child { node {...}}}
    child [missing] {}
    child { node {private}
    child { node {signing-ca.key}}}
    }
    child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {}
    child { node {root-ca.crt}}
    child { node {root-ca.csr}};

    node [below=of ca.center |- current bounding box.south] {certs}
    child { node {simple.org.crt}}
    child { node {simple.org.csr}}
    child { node [optional]{simple.org.key}};
    end{tikzpicture}
    end{document}


    tree below tree






    share|improve this answer


























      6














      I can't reproduce your output and don't know how mycolor is defined, but you can use the positioning library:



      documentclass{standalone}

      usepackage{tikz}
      usetikzlibrary{trees,backgrounds,positioning}
      begin{document}

      tikzset{every node/.style={draw=black,thick,anchor=west},
      selected/.style={dashed,fill=red!30},
      optional/.style={dashed,fill=gray!50},}
      begin{tikzpicture}[%
      grow via three points={one child at (0.5,-0.7) and
      two children at (0.5,-0.7) and (0.5,-1.4)},
      show background rectangle,
      background rectangle/.style={fill=gray!10},
      edge from parent path={(tikzparentnode.south) |- (tikzchildnode.west)}]
      node (ca) {ca}
      child { node {root-ca}
      child { node {01.pem}}
      child { node {02.pem}}
      child { node {db}
      child { node {...}}}
      child [missing] {}
      child { node {private}
      child { node {root-ca.key}}}
      }
      child [missing] {}
      child [missing] {}
      child [missing] {}
      child [missing] {}
      child [missing] {}
      child [missing] {}
      child { node {root-ca.crt}}
      child { node {root-ca.csr}}
      child { node {signing-ca}
      child { node [selected]{01.pem}}
      child { node{02.pem}}
      child { node {db}
      child { node {...}}}
      child [missing] {}
      child { node {private}
      child { node {signing-ca.key}}}
      }
      child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {}
      child { node {root-ca.crt}}
      child { node {root-ca.csr}};

      node [below=of ca.center |- current bounding box.south] {certs}
      child { node {simple.org.crt}}
      child { node {simple.org.csr}}
      child { node [optional]{simple.org.key}};
      end{tikzpicture}
      end{document}


      tree below tree






      share|improve this answer
























        6












        6








        6






        I can't reproduce your output and don't know how mycolor is defined, but you can use the positioning library:



        documentclass{standalone}

        usepackage{tikz}
        usetikzlibrary{trees,backgrounds,positioning}
        begin{document}

        tikzset{every node/.style={draw=black,thick,anchor=west},
        selected/.style={dashed,fill=red!30},
        optional/.style={dashed,fill=gray!50},}
        begin{tikzpicture}[%
        grow via three points={one child at (0.5,-0.7) and
        two children at (0.5,-0.7) and (0.5,-1.4)},
        show background rectangle,
        background rectangle/.style={fill=gray!10},
        edge from parent path={(tikzparentnode.south) |- (tikzchildnode.west)}]
        node (ca) {ca}
        child { node {root-ca}
        child { node {01.pem}}
        child { node {02.pem}}
        child { node {db}
        child { node {...}}}
        child [missing] {}
        child { node {private}
        child { node {root-ca.key}}}
        }
        child [missing] {}
        child [missing] {}
        child [missing] {}
        child [missing] {}
        child [missing] {}
        child [missing] {}
        child { node {root-ca.crt}}
        child { node {root-ca.csr}}
        child { node {signing-ca}
        child { node [selected]{01.pem}}
        child { node{02.pem}}
        child { node {db}
        child { node {...}}}
        child [missing] {}
        child { node {private}
        child { node {signing-ca.key}}}
        }
        child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {}
        child { node {root-ca.crt}}
        child { node {root-ca.csr}};

        node [below=of ca.center |- current bounding box.south] {certs}
        child { node {simple.org.crt}}
        child { node {simple.org.csr}}
        child { node [optional]{simple.org.key}};
        end{tikzpicture}
        end{document}


        tree below tree






        share|improve this answer












        I can't reproduce your output and don't know how mycolor is defined, but you can use the positioning library:



        documentclass{standalone}

        usepackage{tikz}
        usetikzlibrary{trees,backgrounds,positioning}
        begin{document}

        tikzset{every node/.style={draw=black,thick,anchor=west},
        selected/.style={dashed,fill=red!30},
        optional/.style={dashed,fill=gray!50},}
        begin{tikzpicture}[%
        grow via three points={one child at (0.5,-0.7) and
        two children at (0.5,-0.7) and (0.5,-1.4)},
        show background rectangle,
        background rectangle/.style={fill=gray!10},
        edge from parent path={(tikzparentnode.south) |- (tikzchildnode.west)}]
        node (ca) {ca}
        child { node {root-ca}
        child { node {01.pem}}
        child { node {02.pem}}
        child { node {db}
        child { node {...}}}
        child [missing] {}
        child { node {private}
        child { node {root-ca.key}}}
        }
        child [missing] {}
        child [missing] {}
        child [missing] {}
        child [missing] {}
        child [missing] {}
        child [missing] {}
        child { node {root-ca.crt}}
        child { node {root-ca.csr}}
        child { node {signing-ca}
        child { node [selected]{01.pem}}
        child { node{02.pem}}
        child { node {db}
        child { node {...}}}
        child [missing] {}
        child { node {private}
        child { node {signing-ca.key}}}
        }
        child [missing] {} child [missing] {} child [missing] {} child [missing] {} child [missing] {}
        child { node {root-ca.crt}}
        child { node {root-ca.csr}};

        node [below=of ca.center |- current bounding box.south] {certs}
        child { node {simple.org.crt}}
        child { node {simple.org.csr}}
        child { node [optional]{simple.org.key}};
        end{tikzpicture}
        end{document}


        tree below tree







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 2 '18 at 15:24









        cfr

        156k7185380




        156k7185380






























            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2f462820%2ftree-with-two-roots%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 change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents