Tree with two roots
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 |
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 '18 at 15:20
Oh, you used twotikzpicture
s to get that output. That makes more sense :-).
– cfr
Dec 2 '18 at 21:59
add a comment |
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 '18 at 15:20
Warok
asked Dec 2 '18 at 15:07
WarokWarok
1218
1218
1
I change my code to be compilable
– Warok
Dec 2 '18 at 15:20
Oh, you used twotikzpicture
s to get that output. That makes more sense :-).
– cfr
Dec 2 '18 at 21:59
add a comment |
1
I change my code to be compilable
– Warok
Dec 2 '18 at 15:20
Oh, you used twotikzpicture
s 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
tikzpicture
s to get that output. That makes more sense :-).– cfr
Dec 2 '18 at 21:59
Oh, you used two
tikzpicture
s to get that output. That makes more sense :-).– cfr
Dec 2 '18 at 21:59
add a comment |
1 Answer
1
active
oldest
votes
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 |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
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
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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 |
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 |
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 '18 at 15:24
cfrcfr
157k8187383
157k8187383
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.
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 '18 at 15:20
Oh, you used two
tikzpicture
s to get that output. That makes more sense :-).– cfr
Dec 2 '18 at 21:59