Tree with two roots
up vote
2
down vote
favorite
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 output
tikz-trees
add a comment |
up vote
2
down vote
favorite
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 output
tikz-trees
1
I change my code to be compilable
– Warok
Dec 2 at 15:20
Oh, you used twotikzpicture
s to get that output. That makes more sense :-).
– cfr
Dec 2 at 21:59
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
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 output
tikz-trees
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 output
tikz-trees
tikz-trees
edited Dec 2 at 15:20
asked Dec 2 at 15:07
Warok
776
776
1
I change my code to be compilable
– Warok
Dec 2 at 15:20
Oh, you used twotikzpicture
s to get that output. That makes more sense :-).
– cfr
Dec 2 at 21:59
add a comment |
1
I change my code to be compilable
– Warok
Dec 2 at 15:20
Oh, you used twotikzpicture
s to get that output. That makes more sense :-).
– cfr
Dec 2 at 21:59
1
1
I change my code to be compilable
– Warok
Dec 2 at 15:20
I change my code to be compilable
– Warok
Dec 2 at 15:20
Oh, you used two
tikzpicture
s to get that output. That makes more sense :-).– cfr
Dec 2 at 21:59
Oh, you used two
tikzpicture
s to get that output. That makes more sense :-).– cfr
Dec 2 at 21:59
add a comment |
1 Answer
1
active
oldest
votes
up vote
6
down vote
accepted
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}
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
6
down vote
accepted
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}
add a comment |
up vote
6
down vote
accepted
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}
add a comment |
up vote
6
down vote
accepted
up vote
6
down vote
accepted
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}
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}
answered Dec 2 at 15:24
cfr
156k7183377
156k7183377
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
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%2f462820%2ftree-with-two-roots%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');
});
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');
});
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');
});
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
1
I change my code to be compilable
– Warok
Dec 2 at 15:20
Oh, you used two
tikzpicture
s to get that output. That makes more sense :-).– cfr
Dec 2 at 21:59