How to set the horizontal separation of group of rectangles
In the following diagram:
documentclass[12pt]{article}
usepackage{tikz}
usepackage[active,tightpage]{preview}
usetikzlibrary{shapes,arrows.meta,calc,fit,backgrounds,shapes.multipart,positioning}
tikzset{box/.style={draw, rectangle, rounded corners, thick, node
distance=7em,
text width=6em, text centered, minimum height=3.5em}}
%tikzset{line/.style={draw, thick, -{Latex[length=2mm,width=1mm]}}}
tikzset{every node/.style={font=footnotesize}}
PreviewEnvironment{tikzpicture}
%=======================================
% Adjust the boarder of the flowchart
%=======================================
setlengthPreviewBorder{4pt}%
begin{document}
%************************************************************
%************************************************************
% Define block styles
%************************************************************
%************************************************************
tikzset{
block/.style={rectangle split, draw, rectangle split parts=2,text width=14em, text centered, rounded corners, minimum height=4em},
grnblock/.style={rectangle, draw, fill=green!20, text width=10em, text centered, rounded corners, minimum height=4em},
whtblock/.style={rectangle, draw, fill=white!20, text width=14em, text centered, minimum height=4em},
line/.style={draw, {latex[length=3mm,width=2.25mm]}-{latex[length=3mm,width=2.25mm]}},
cloud/.style={draw, ellipse,fill=white!20, node distance=3cm, minimum height=4em},
% container/.style={draw, rectangle,dashed,inner sep=0.28cm, rounded corners,fill=yellow!20,minimum height=4cm}}
container1/.style={draw, rectangle,inner sep=0.48cm,fill=blue!10,minimum height=4cm},
container2/.style={draw, rectangle,inner sep=0.28cm,fill=green!10,minimum height=4em}}
%************************************************************
%************************************************************
begin{tikzpicture}[node distance = 1.25cm, auto,every text node part/.style={align=center}]
%
%===============================================
% Reader
%===============================================
node [whtblock,font=fontsize{12}{0}selectfont] (LBT) {LBT \[0.5em]Reader Anti-Collision Protocol};
node [whtblock, below=of LBT, node distance=2.5cm,font=fontsize{12}{0}selectfont] (FSA) {FSA \[0.5em]Anti-Collision Protocol};
node [whtblock, below=of FSA, node distance=2.5cm,font=fontsize{12}{0}selectfont] (PHY) {PHY Layer};
%*****************
% TAG
%***************
node [whtblock, right=of PHY, node distance=13cm,font=fontsize{12}{0}selectfont] (PHYtag) {PHY Layer\[0.5em](Energy Harvester)};
node [whtblock, above=of PHYtag, node distance=13cm,font=fontsize{12}{0}selectfont] (FSAtag) {FSA \[0.5em]Anti-Collision Protocol};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CONTAINERS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{scope}[on background layer]
coordinate (aux1) at ([yshift=3mm]LBT.north);
node [container1,fit=(aux1) (FSA)(PHY)] (Reader) {};
node at (Reader.north) [fill=white,draw,font=fontsize{12}{0}selectfont] {textbf{Reader}};
%-----------------------------------------------------------
coordinate (aux2) at ([yshift=3mm]FSAtag.north);
node [container1,fit=(aux2) (PHYtag)(FSAtag)] (TAG) {};
node at (TAG.north) [fill=white,draw,font=fontsize{12}{0}selectfont] {textbf{Tag}};
end{scope}
%************************************************************
%************************************************************
% Draw edges
%************************************************************
%************************************************************
draw [line,darkgray,very thick] (LBT.south) -- (FSA.north);
draw [line,darkgray,very thick] (FSA.south) -- (PHY.north);
draw [line,darkgray,very thick] (FSAtag.south) -- (PHYtag.north);
draw [-latex,darkgray,ultra thick] ([yshift=6pt]PHY.east) -- node [above] {Power-Up \[0.5em] Link} ([yshift=6pt]PHYtag.west);
draw [-latex,darkgray,ultra thick] ([yshift=-6pt]PHYtag.west) -- node [below] {Backscattered \[0.5em] Link} ([yshift=-6pt]PHY.east);
end{tikzpicture}
end{document}

The text of the horizontal arrows between the Reader's and Tag's group of rectangles is overlapped with the box containers.
I would like to separate the two groups (Reader and Tag) to fit the text of the arrows in the blank space between the two groups.
Regards
tikz-pgf diagrams arrows backgrounds
add a comment |
In the following diagram:
documentclass[12pt]{article}
usepackage{tikz}
usepackage[active,tightpage]{preview}
usetikzlibrary{shapes,arrows.meta,calc,fit,backgrounds,shapes.multipart,positioning}
tikzset{box/.style={draw, rectangle, rounded corners, thick, node
distance=7em,
text width=6em, text centered, minimum height=3.5em}}
%tikzset{line/.style={draw, thick, -{Latex[length=2mm,width=1mm]}}}
tikzset{every node/.style={font=footnotesize}}
PreviewEnvironment{tikzpicture}
%=======================================
% Adjust the boarder of the flowchart
%=======================================
setlengthPreviewBorder{4pt}%
begin{document}
%************************************************************
%************************************************************
% Define block styles
%************************************************************
%************************************************************
tikzset{
block/.style={rectangle split, draw, rectangle split parts=2,text width=14em, text centered, rounded corners, minimum height=4em},
grnblock/.style={rectangle, draw, fill=green!20, text width=10em, text centered, rounded corners, minimum height=4em},
whtblock/.style={rectangle, draw, fill=white!20, text width=14em, text centered, minimum height=4em},
line/.style={draw, {latex[length=3mm,width=2.25mm]}-{latex[length=3mm,width=2.25mm]}},
cloud/.style={draw, ellipse,fill=white!20, node distance=3cm, minimum height=4em},
% container/.style={draw, rectangle,dashed,inner sep=0.28cm, rounded corners,fill=yellow!20,minimum height=4cm}}
container1/.style={draw, rectangle,inner sep=0.48cm,fill=blue!10,minimum height=4cm},
container2/.style={draw, rectangle,inner sep=0.28cm,fill=green!10,minimum height=4em}}
%************************************************************
%************************************************************
begin{tikzpicture}[node distance = 1.25cm, auto,every text node part/.style={align=center}]
%
%===============================================
% Reader
%===============================================
node [whtblock,font=fontsize{12}{0}selectfont] (LBT) {LBT \[0.5em]Reader Anti-Collision Protocol};
node [whtblock, below=of LBT, node distance=2.5cm,font=fontsize{12}{0}selectfont] (FSA) {FSA \[0.5em]Anti-Collision Protocol};
node [whtblock, below=of FSA, node distance=2.5cm,font=fontsize{12}{0}selectfont] (PHY) {PHY Layer};
%*****************
% TAG
%***************
node [whtblock, right=of PHY, node distance=13cm,font=fontsize{12}{0}selectfont] (PHYtag) {PHY Layer\[0.5em](Energy Harvester)};
node [whtblock, above=of PHYtag, node distance=13cm,font=fontsize{12}{0}selectfont] (FSAtag) {FSA \[0.5em]Anti-Collision Protocol};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CONTAINERS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{scope}[on background layer]
coordinate (aux1) at ([yshift=3mm]LBT.north);
node [container1,fit=(aux1) (FSA)(PHY)] (Reader) {};
node at (Reader.north) [fill=white,draw,font=fontsize{12}{0}selectfont] {textbf{Reader}};
%-----------------------------------------------------------
coordinate (aux2) at ([yshift=3mm]FSAtag.north);
node [container1,fit=(aux2) (PHYtag)(FSAtag)] (TAG) {};
node at (TAG.north) [fill=white,draw,font=fontsize{12}{0}selectfont] {textbf{Tag}};
end{scope}
%************************************************************
%************************************************************
% Draw edges
%************************************************************
%************************************************************
draw [line,darkgray,very thick] (LBT.south) -- (FSA.north);
draw [line,darkgray,very thick] (FSA.south) -- (PHY.north);
draw [line,darkgray,very thick] (FSAtag.south) -- (PHYtag.north);
draw [-latex,darkgray,ultra thick] ([yshift=6pt]PHY.east) -- node [above] {Power-Up \[0.5em] Link} ([yshift=6pt]PHYtag.west);
draw [-latex,darkgray,ultra thick] ([yshift=-6pt]PHYtag.west) -- node [below] {Backscattered \[0.5em] Link} ([yshift=-6pt]PHY.east);
end{tikzpicture}
end{document}

The text of the horizontal arrows between the Reader's and Tag's group of rectangles is overlapped with the box containers.
I would like to separate the two groups (Reader and Tag) to fit the text of the arrows in the blank space between the two groups.
Regards
tikz-pgf diagrams arrows backgrounds
add a comment |
In the following diagram:
documentclass[12pt]{article}
usepackage{tikz}
usepackage[active,tightpage]{preview}
usetikzlibrary{shapes,arrows.meta,calc,fit,backgrounds,shapes.multipart,positioning}
tikzset{box/.style={draw, rectangle, rounded corners, thick, node
distance=7em,
text width=6em, text centered, minimum height=3.5em}}
%tikzset{line/.style={draw, thick, -{Latex[length=2mm,width=1mm]}}}
tikzset{every node/.style={font=footnotesize}}
PreviewEnvironment{tikzpicture}
%=======================================
% Adjust the boarder of the flowchart
%=======================================
setlengthPreviewBorder{4pt}%
begin{document}
%************************************************************
%************************************************************
% Define block styles
%************************************************************
%************************************************************
tikzset{
block/.style={rectangle split, draw, rectangle split parts=2,text width=14em, text centered, rounded corners, minimum height=4em},
grnblock/.style={rectangle, draw, fill=green!20, text width=10em, text centered, rounded corners, minimum height=4em},
whtblock/.style={rectangle, draw, fill=white!20, text width=14em, text centered, minimum height=4em},
line/.style={draw, {latex[length=3mm,width=2.25mm]}-{latex[length=3mm,width=2.25mm]}},
cloud/.style={draw, ellipse,fill=white!20, node distance=3cm, minimum height=4em},
% container/.style={draw, rectangle,dashed,inner sep=0.28cm, rounded corners,fill=yellow!20,minimum height=4cm}}
container1/.style={draw, rectangle,inner sep=0.48cm,fill=blue!10,minimum height=4cm},
container2/.style={draw, rectangle,inner sep=0.28cm,fill=green!10,minimum height=4em}}
%************************************************************
%************************************************************
begin{tikzpicture}[node distance = 1.25cm, auto,every text node part/.style={align=center}]
%
%===============================================
% Reader
%===============================================
node [whtblock,font=fontsize{12}{0}selectfont] (LBT) {LBT \[0.5em]Reader Anti-Collision Protocol};
node [whtblock, below=of LBT, node distance=2.5cm,font=fontsize{12}{0}selectfont] (FSA) {FSA \[0.5em]Anti-Collision Protocol};
node [whtblock, below=of FSA, node distance=2.5cm,font=fontsize{12}{0}selectfont] (PHY) {PHY Layer};
%*****************
% TAG
%***************
node [whtblock, right=of PHY, node distance=13cm,font=fontsize{12}{0}selectfont] (PHYtag) {PHY Layer\[0.5em](Energy Harvester)};
node [whtblock, above=of PHYtag, node distance=13cm,font=fontsize{12}{0}selectfont] (FSAtag) {FSA \[0.5em]Anti-Collision Protocol};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CONTAINERS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{scope}[on background layer]
coordinate (aux1) at ([yshift=3mm]LBT.north);
node [container1,fit=(aux1) (FSA)(PHY)] (Reader) {};
node at (Reader.north) [fill=white,draw,font=fontsize{12}{0}selectfont] {textbf{Reader}};
%-----------------------------------------------------------
coordinate (aux2) at ([yshift=3mm]FSAtag.north);
node [container1,fit=(aux2) (PHYtag)(FSAtag)] (TAG) {};
node at (TAG.north) [fill=white,draw,font=fontsize{12}{0}selectfont] {textbf{Tag}};
end{scope}
%************************************************************
%************************************************************
% Draw edges
%************************************************************
%************************************************************
draw [line,darkgray,very thick] (LBT.south) -- (FSA.north);
draw [line,darkgray,very thick] (FSA.south) -- (PHY.north);
draw [line,darkgray,very thick] (FSAtag.south) -- (PHYtag.north);
draw [-latex,darkgray,ultra thick] ([yshift=6pt]PHY.east) -- node [above] {Power-Up \[0.5em] Link} ([yshift=6pt]PHYtag.west);
draw [-latex,darkgray,ultra thick] ([yshift=-6pt]PHYtag.west) -- node [below] {Backscattered \[0.5em] Link} ([yshift=-6pt]PHY.east);
end{tikzpicture}
end{document}

The text of the horizontal arrows between the Reader's and Tag's group of rectangles is overlapped with the box containers.
I would like to separate the two groups (Reader and Tag) to fit the text of the arrows in the blank space between the two groups.
Regards
tikz-pgf diagrams arrows backgrounds
In the following diagram:
documentclass[12pt]{article}
usepackage{tikz}
usepackage[active,tightpage]{preview}
usetikzlibrary{shapes,arrows.meta,calc,fit,backgrounds,shapes.multipart,positioning}
tikzset{box/.style={draw, rectangle, rounded corners, thick, node
distance=7em,
text width=6em, text centered, minimum height=3.5em}}
%tikzset{line/.style={draw, thick, -{Latex[length=2mm,width=1mm]}}}
tikzset{every node/.style={font=footnotesize}}
PreviewEnvironment{tikzpicture}
%=======================================
% Adjust the boarder of the flowchart
%=======================================
setlengthPreviewBorder{4pt}%
begin{document}
%************************************************************
%************************************************************
% Define block styles
%************************************************************
%************************************************************
tikzset{
block/.style={rectangle split, draw, rectangle split parts=2,text width=14em, text centered, rounded corners, minimum height=4em},
grnblock/.style={rectangle, draw, fill=green!20, text width=10em, text centered, rounded corners, minimum height=4em},
whtblock/.style={rectangle, draw, fill=white!20, text width=14em, text centered, minimum height=4em},
line/.style={draw, {latex[length=3mm,width=2.25mm]}-{latex[length=3mm,width=2.25mm]}},
cloud/.style={draw, ellipse,fill=white!20, node distance=3cm, minimum height=4em},
% container/.style={draw, rectangle,dashed,inner sep=0.28cm, rounded corners,fill=yellow!20,minimum height=4cm}}
container1/.style={draw, rectangle,inner sep=0.48cm,fill=blue!10,minimum height=4cm},
container2/.style={draw, rectangle,inner sep=0.28cm,fill=green!10,minimum height=4em}}
%************************************************************
%************************************************************
begin{tikzpicture}[node distance = 1.25cm, auto,every text node part/.style={align=center}]
%
%===============================================
% Reader
%===============================================
node [whtblock,font=fontsize{12}{0}selectfont] (LBT) {LBT \[0.5em]Reader Anti-Collision Protocol};
node [whtblock, below=of LBT, node distance=2.5cm,font=fontsize{12}{0}selectfont] (FSA) {FSA \[0.5em]Anti-Collision Protocol};
node [whtblock, below=of FSA, node distance=2.5cm,font=fontsize{12}{0}selectfont] (PHY) {PHY Layer};
%*****************
% TAG
%***************
node [whtblock, right=of PHY, node distance=13cm,font=fontsize{12}{0}selectfont] (PHYtag) {PHY Layer\[0.5em](Energy Harvester)};
node [whtblock, above=of PHYtag, node distance=13cm,font=fontsize{12}{0}selectfont] (FSAtag) {FSA \[0.5em]Anti-Collision Protocol};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CONTAINERS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{scope}[on background layer]
coordinate (aux1) at ([yshift=3mm]LBT.north);
node [container1,fit=(aux1) (FSA)(PHY)] (Reader) {};
node at (Reader.north) [fill=white,draw,font=fontsize{12}{0}selectfont] {textbf{Reader}};
%-----------------------------------------------------------
coordinate (aux2) at ([yshift=3mm]FSAtag.north);
node [container1,fit=(aux2) (PHYtag)(FSAtag)] (TAG) {};
node at (TAG.north) [fill=white,draw,font=fontsize{12}{0}selectfont] {textbf{Tag}};
end{scope}
%************************************************************
%************************************************************
% Draw edges
%************************************************************
%************************************************************
draw [line,darkgray,very thick] (LBT.south) -- (FSA.north);
draw [line,darkgray,very thick] (FSA.south) -- (PHY.north);
draw [line,darkgray,very thick] (FSAtag.south) -- (PHYtag.north);
draw [-latex,darkgray,ultra thick] ([yshift=6pt]PHY.east) -- node [above] {Power-Up \[0.5em] Link} ([yshift=6pt]PHYtag.west);
draw [-latex,darkgray,ultra thick] ([yshift=-6pt]PHYtag.west) -- node [below] {Backscattered \[0.5em] Link} ([yshift=-6pt]PHY.east);
end{tikzpicture}
end{document}

The text of the horizontal arrows between the Reader's and Tag's group of rectangles is overlapped with the box containers.
I would like to separate the two groups (Reader and Tag) to fit the text of the arrows in the blank space between the two groups.
Regards
tikz-pgf diagrams arrows backgrounds
tikz-pgf diagrams arrows backgrounds
asked 56 mins ago
user1993416user1993416
283110
283110
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Added a shift={(3cm,0)} in the node PHYtag:
documentclass[12pt]{article}
usepackage{tikz}
usepackage[active,tightpage]{preview}
usetikzlibrary{shapes,arrows.meta,calc,fit,backgrounds,shapes.multipart,positioning}
tikzset{box/.style={draw, rectangle, rounded corners, thick, node
distance=7em,
text width=6em, text centered, minimum height=3.5em}}
%tikzset{line/.style={draw, thick, -{Latex[length=2mm,width=1mm]}}}
tikzset{every node/.style={font=footnotesize}}
PreviewEnvironment{tikzpicture}
%=======================================
% Adjust the boarder of the flowchart
%=======================================
setlengthPreviewBorder{4pt}%
begin{document}
%************************************************************
%************************************************************
% Define block styles
%************************************************************
%************************************************************
tikzset{
block/.style={rectangle split, draw, rectangle split parts=2,text width=14em, text centered, rounded corners, minimum height=4em},
grnblock/.style={rectangle, draw, fill=green!20, text width=10em, text centered, rounded corners, minimum height=4em},
whtblock/.style={rectangle, draw, fill=white!20, text width=14em, text centered, minimum height=4em},
line/.style={draw, {latex[length=3mm,width=2.25mm]}-{latex[length=3mm,width=2.25mm]}},
cloud/.style={draw, ellipse,fill=white!20, node distance=3cm, minimum height=4em},
% container/.style={draw, rectangle,dashed,inner sep=0.28cm, rounded corners,fill=yellow!20,minimum height=4cm}}
container1/.style={draw, rectangle,inner sep=0.48cm,fill=blue!10,minimum height=4cm},
container2/.style={draw, rectangle,inner sep=0.28cm,fill=green!10,minimum height=4em}}
%************************************************************
%************************************************************
begin{tikzpicture}[node distance = 1.25cm, auto,every text node part/.style={align=center}]
%
%===============================================
% Reader
%===============================================
node [whtblock,font=fontsize{12}{0}selectfont] (LBT) {LBT \[0.5em]Reader Anti-Collision Protocol};
node [whtblock, below=of LBT, node distance=2.5cm,font=fontsize{12}{0}selectfont] (FSA) {FSA \[0.5em]Anti-Collision Protocol};
node [whtblock, below=of FSA, node distance=2.5cm,font=fontsize{12}{0}selectfont] (PHY) {PHY Layer};
%*****************
% TAG
%***************
node [whtblock, right=of PHY, node distance=13cm,font=fontsize{12}{0}selectfont,shift={(3cm,0)}] (PHYtag) {PHY Layer\[0.5em](Energy Harvester)};
node [whtblock, above=of PHYtag, node distance=13cm,font=fontsize{12}{0}selectfont] (FSAtag) {FSA \[0.5em]Anti-Collision Protocol};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CONTAINERS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{scope}[on background layer]
coordinate (aux1) at ([yshift=3mm]LBT.north);
node [container1,fit=(aux1) (FSA)(PHY)] (Reader) {};
node at (Reader.north) [fill=white,draw,font=fontsize{12}{0}selectfont] {textbf{Reader}};
%-----------------------------------------------------------
coordinate (aux2) at ([yshift=3mm]FSAtag.north);
node [container1,fit=(aux2) (PHYtag)(FSAtag)] (TAG) {};
node at (TAG.north) [fill=white,draw,font=fontsize{12}{0}selectfont] {textbf{Tag}};
end{scope}
%************************************************************
%************************************************************
% Draw edges
%************************************************************
%************************************************************
draw [line,darkgray,very thick] (LBT.south) -- (FSA.north);
draw [line,darkgray,very thick] (FSA.south) -- (PHY.north);
draw [line,darkgray,very thick] (FSAtag.south) -- (PHYtag.north);
draw [-latex,darkgray,ultra thick] ([yshift=6pt]PHY.east) -- node [above] {Power-Up \[0.5em] Link} ([yshift=6pt]PHYtag.west);
draw [-latex,darkgray,ultra thick] ([yshift=-6pt]PHYtag.west) -- node [below] {Backscattered \[0.5em] Link} ([yshift=-6pt]PHY.east);
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%2f477597%2fhow-to-set-the-horizontal-separation-of-group-of-rectangles%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
Added a shift={(3cm,0)} in the node PHYtag:
documentclass[12pt]{article}
usepackage{tikz}
usepackage[active,tightpage]{preview}
usetikzlibrary{shapes,arrows.meta,calc,fit,backgrounds,shapes.multipart,positioning}
tikzset{box/.style={draw, rectangle, rounded corners, thick, node
distance=7em,
text width=6em, text centered, minimum height=3.5em}}
%tikzset{line/.style={draw, thick, -{Latex[length=2mm,width=1mm]}}}
tikzset{every node/.style={font=footnotesize}}
PreviewEnvironment{tikzpicture}
%=======================================
% Adjust the boarder of the flowchart
%=======================================
setlengthPreviewBorder{4pt}%
begin{document}
%************************************************************
%************************************************************
% Define block styles
%************************************************************
%************************************************************
tikzset{
block/.style={rectangle split, draw, rectangle split parts=2,text width=14em, text centered, rounded corners, minimum height=4em},
grnblock/.style={rectangle, draw, fill=green!20, text width=10em, text centered, rounded corners, minimum height=4em},
whtblock/.style={rectangle, draw, fill=white!20, text width=14em, text centered, minimum height=4em},
line/.style={draw, {latex[length=3mm,width=2.25mm]}-{latex[length=3mm,width=2.25mm]}},
cloud/.style={draw, ellipse,fill=white!20, node distance=3cm, minimum height=4em},
% container/.style={draw, rectangle,dashed,inner sep=0.28cm, rounded corners,fill=yellow!20,minimum height=4cm}}
container1/.style={draw, rectangle,inner sep=0.48cm,fill=blue!10,minimum height=4cm},
container2/.style={draw, rectangle,inner sep=0.28cm,fill=green!10,minimum height=4em}}
%************************************************************
%************************************************************
begin{tikzpicture}[node distance = 1.25cm, auto,every text node part/.style={align=center}]
%
%===============================================
% Reader
%===============================================
node [whtblock,font=fontsize{12}{0}selectfont] (LBT) {LBT \[0.5em]Reader Anti-Collision Protocol};
node [whtblock, below=of LBT, node distance=2.5cm,font=fontsize{12}{0}selectfont] (FSA) {FSA \[0.5em]Anti-Collision Protocol};
node [whtblock, below=of FSA, node distance=2.5cm,font=fontsize{12}{0}selectfont] (PHY) {PHY Layer};
%*****************
% TAG
%***************
node [whtblock, right=of PHY, node distance=13cm,font=fontsize{12}{0}selectfont,shift={(3cm,0)}] (PHYtag) {PHY Layer\[0.5em](Energy Harvester)};
node [whtblock, above=of PHYtag, node distance=13cm,font=fontsize{12}{0}selectfont] (FSAtag) {FSA \[0.5em]Anti-Collision Protocol};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CONTAINERS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{scope}[on background layer]
coordinate (aux1) at ([yshift=3mm]LBT.north);
node [container1,fit=(aux1) (FSA)(PHY)] (Reader) {};
node at (Reader.north) [fill=white,draw,font=fontsize{12}{0}selectfont] {textbf{Reader}};
%-----------------------------------------------------------
coordinate (aux2) at ([yshift=3mm]FSAtag.north);
node [container1,fit=(aux2) (PHYtag)(FSAtag)] (TAG) {};
node at (TAG.north) [fill=white,draw,font=fontsize{12}{0}selectfont] {textbf{Tag}};
end{scope}
%************************************************************
%************************************************************
% Draw edges
%************************************************************
%************************************************************
draw [line,darkgray,very thick] (LBT.south) -- (FSA.north);
draw [line,darkgray,very thick] (FSA.south) -- (PHY.north);
draw [line,darkgray,very thick] (FSAtag.south) -- (PHYtag.north);
draw [-latex,darkgray,ultra thick] ([yshift=6pt]PHY.east) -- node [above] {Power-Up \[0.5em] Link} ([yshift=6pt]PHYtag.west);
draw [-latex,darkgray,ultra thick] ([yshift=-6pt]PHYtag.west) -- node [below] {Backscattered \[0.5em] Link} ([yshift=-6pt]PHY.east);
end{tikzpicture}
end{document}

add a comment |
Added a shift={(3cm,0)} in the node PHYtag:
documentclass[12pt]{article}
usepackage{tikz}
usepackage[active,tightpage]{preview}
usetikzlibrary{shapes,arrows.meta,calc,fit,backgrounds,shapes.multipart,positioning}
tikzset{box/.style={draw, rectangle, rounded corners, thick, node
distance=7em,
text width=6em, text centered, minimum height=3.5em}}
%tikzset{line/.style={draw, thick, -{Latex[length=2mm,width=1mm]}}}
tikzset{every node/.style={font=footnotesize}}
PreviewEnvironment{tikzpicture}
%=======================================
% Adjust the boarder of the flowchart
%=======================================
setlengthPreviewBorder{4pt}%
begin{document}
%************************************************************
%************************************************************
% Define block styles
%************************************************************
%************************************************************
tikzset{
block/.style={rectangle split, draw, rectangle split parts=2,text width=14em, text centered, rounded corners, minimum height=4em},
grnblock/.style={rectangle, draw, fill=green!20, text width=10em, text centered, rounded corners, minimum height=4em},
whtblock/.style={rectangle, draw, fill=white!20, text width=14em, text centered, minimum height=4em},
line/.style={draw, {latex[length=3mm,width=2.25mm]}-{latex[length=3mm,width=2.25mm]}},
cloud/.style={draw, ellipse,fill=white!20, node distance=3cm, minimum height=4em},
% container/.style={draw, rectangle,dashed,inner sep=0.28cm, rounded corners,fill=yellow!20,minimum height=4cm}}
container1/.style={draw, rectangle,inner sep=0.48cm,fill=blue!10,minimum height=4cm},
container2/.style={draw, rectangle,inner sep=0.28cm,fill=green!10,minimum height=4em}}
%************************************************************
%************************************************************
begin{tikzpicture}[node distance = 1.25cm, auto,every text node part/.style={align=center}]
%
%===============================================
% Reader
%===============================================
node [whtblock,font=fontsize{12}{0}selectfont] (LBT) {LBT \[0.5em]Reader Anti-Collision Protocol};
node [whtblock, below=of LBT, node distance=2.5cm,font=fontsize{12}{0}selectfont] (FSA) {FSA \[0.5em]Anti-Collision Protocol};
node [whtblock, below=of FSA, node distance=2.5cm,font=fontsize{12}{0}selectfont] (PHY) {PHY Layer};
%*****************
% TAG
%***************
node [whtblock, right=of PHY, node distance=13cm,font=fontsize{12}{0}selectfont,shift={(3cm,0)}] (PHYtag) {PHY Layer\[0.5em](Energy Harvester)};
node [whtblock, above=of PHYtag, node distance=13cm,font=fontsize{12}{0}selectfont] (FSAtag) {FSA \[0.5em]Anti-Collision Protocol};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CONTAINERS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{scope}[on background layer]
coordinate (aux1) at ([yshift=3mm]LBT.north);
node [container1,fit=(aux1) (FSA)(PHY)] (Reader) {};
node at (Reader.north) [fill=white,draw,font=fontsize{12}{0}selectfont] {textbf{Reader}};
%-----------------------------------------------------------
coordinate (aux2) at ([yshift=3mm]FSAtag.north);
node [container1,fit=(aux2) (PHYtag)(FSAtag)] (TAG) {};
node at (TAG.north) [fill=white,draw,font=fontsize{12}{0}selectfont] {textbf{Tag}};
end{scope}
%************************************************************
%************************************************************
% Draw edges
%************************************************************
%************************************************************
draw [line,darkgray,very thick] (LBT.south) -- (FSA.north);
draw [line,darkgray,very thick] (FSA.south) -- (PHY.north);
draw [line,darkgray,very thick] (FSAtag.south) -- (PHYtag.north);
draw [-latex,darkgray,ultra thick] ([yshift=6pt]PHY.east) -- node [above] {Power-Up \[0.5em] Link} ([yshift=6pt]PHYtag.west);
draw [-latex,darkgray,ultra thick] ([yshift=-6pt]PHYtag.west) -- node [below] {Backscattered \[0.5em] Link} ([yshift=-6pt]PHY.east);
end{tikzpicture}
end{document}

add a comment |
Added a shift={(3cm,0)} in the node PHYtag:
documentclass[12pt]{article}
usepackage{tikz}
usepackage[active,tightpage]{preview}
usetikzlibrary{shapes,arrows.meta,calc,fit,backgrounds,shapes.multipart,positioning}
tikzset{box/.style={draw, rectangle, rounded corners, thick, node
distance=7em,
text width=6em, text centered, minimum height=3.5em}}
%tikzset{line/.style={draw, thick, -{Latex[length=2mm,width=1mm]}}}
tikzset{every node/.style={font=footnotesize}}
PreviewEnvironment{tikzpicture}
%=======================================
% Adjust the boarder of the flowchart
%=======================================
setlengthPreviewBorder{4pt}%
begin{document}
%************************************************************
%************************************************************
% Define block styles
%************************************************************
%************************************************************
tikzset{
block/.style={rectangle split, draw, rectangle split parts=2,text width=14em, text centered, rounded corners, minimum height=4em},
grnblock/.style={rectangle, draw, fill=green!20, text width=10em, text centered, rounded corners, minimum height=4em},
whtblock/.style={rectangle, draw, fill=white!20, text width=14em, text centered, minimum height=4em},
line/.style={draw, {latex[length=3mm,width=2.25mm]}-{latex[length=3mm,width=2.25mm]}},
cloud/.style={draw, ellipse,fill=white!20, node distance=3cm, minimum height=4em},
% container/.style={draw, rectangle,dashed,inner sep=0.28cm, rounded corners,fill=yellow!20,minimum height=4cm}}
container1/.style={draw, rectangle,inner sep=0.48cm,fill=blue!10,minimum height=4cm},
container2/.style={draw, rectangle,inner sep=0.28cm,fill=green!10,minimum height=4em}}
%************************************************************
%************************************************************
begin{tikzpicture}[node distance = 1.25cm, auto,every text node part/.style={align=center}]
%
%===============================================
% Reader
%===============================================
node [whtblock,font=fontsize{12}{0}selectfont] (LBT) {LBT \[0.5em]Reader Anti-Collision Protocol};
node [whtblock, below=of LBT, node distance=2.5cm,font=fontsize{12}{0}selectfont] (FSA) {FSA \[0.5em]Anti-Collision Protocol};
node [whtblock, below=of FSA, node distance=2.5cm,font=fontsize{12}{0}selectfont] (PHY) {PHY Layer};
%*****************
% TAG
%***************
node [whtblock, right=of PHY, node distance=13cm,font=fontsize{12}{0}selectfont,shift={(3cm,0)}] (PHYtag) {PHY Layer\[0.5em](Energy Harvester)};
node [whtblock, above=of PHYtag, node distance=13cm,font=fontsize{12}{0}selectfont] (FSAtag) {FSA \[0.5em]Anti-Collision Protocol};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CONTAINERS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{scope}[on background layer]
coordinate (aux1) at ([yshift=3mm]LBT.north);
node [container1,fit=(aux1) (FSA)(PHY)] (Reader) {};
node at (Reader.north) [fill=white,draw,font=fontsize{12}{0}selectfont] {textbf{Reader}};
%-----------------------------------------------------------
coordinate (aux2) at ([yshift=3mm]FSAtag.north);
node [container1,fit=(aux2) (PHYtag)(FSAtag)] (TAG) {};
node at (TAG.north) [fill=white,draw,font=fontsize{12}{0}selectfont] {textbf{Tag}};
end{scope}
%************************************************************
%************************************************************
% Draw edges
%************************************************************
%************************************************************
draw [line,darkgray,very thick] (LBT.south) -- (FSA.north);
draw [line,darkgray,very thick] (FSA.south) -- (PHY.north);
draw [line,darkgray,very thick] (FSAtag.south) -- (PHYtag.north);
draw [-latex,darkgray,ultra thick] ([yshift=6pt]PHY.east) -- node [above] {Power-Up \[0.5em] Link} ([yshift=6pt]PHYtag.west);
draw [-latex,darkgray,ultra thick] ([yshift=-6pt]PHYtag.west) -- node [below] {Backscattered \[0.5em] Link} ([yshift=-6pt]PHY.east);
end{tikzpicture}
end{document}

Added a shift={(3cm,0)} in the node PHYtag:
documentclass[12pt]{article}
usepackage{tikz}
usepackage[active,tightpage]{preview}
usetikzlibrary{shapes,arrows.meta,calc,fit,backgrounds,shapes.multipart,positioning}
tikzset{box/.style={draw, rectangle, rounded corners, thick, node
distance=7em,
text width=6em, text centered, minimum height=3.5em}}
%tikzset{line/.style={draw, thick, -{Latex[length=2mm,width=1mm]}}}
tikzset{every node/.style={font=footnotesize}}
PreviewEnvironment{tikzpicture}
%=======================================
% Adjust the boarder of the flowchart
%=======================================
setlengthPreviewBorder{4pt}%
begin{document}
%************************************************************
%************************************************************
% Define block styles
%************************************************************
%************************************************************
tikzset{
block/.style={rectangle split, draw, rectangle split parts=2,text width=14em, text centered, rounded corners, minimum height=4em},
grnblock/.style={rectangle, draw, fill=green!20, text width=10em, text centered, rounded corners, minimum height=4em},
whtblock/.style={rectangle, draw, fill=white!20, text width=14em, text centered, minimum height=4em},
line/.style={draw, {latex[length=3mm,width=2.25mm]}-{latex[length=3mm,width=2.25mm]}},
cloud/.style={draw, ellipse,fill=white!20, node distance=3cm, minimum height=4em},
% container/.style={draw, rectangle,dashed,inner sep=0.28cm, rounded corners,fill=yellow!20,minimum height=4cm}}
container1/.style={draw, rectangle,inner sep=0.48cm,fill=blue!10,minimum height=4cm},
container2/.style={draw, rectangle,inner sep=0.28cm,fill=green!10,minimum height=4em}}
%************************************************************
%************************************************************
begin{tikzpicture}[node distance = 1.25cm, auto,every text node part/.style={align=center}]
%
%===============================================
% Reader
%===============================================
node [whtblock,font=fontsize{12}{0}selectfont] (LBT) {LBT \[0.5em]Reader Anti-Collision Protocol};
node [whtblock, below=of LBT, node distance=2.5cm,font=fontsize{12}{0}selectfont] (FSA) {FSA \[0.5em]Anti-Collision Protocol};
node [whtblock, below=of FSA, node distance=2.5cm,font=fontsize{12}{0}selectfont] (PHY) {PHY Layer};
%*****************
% TAG
%***************
node [whtblock, right=of PHY, node distance=13cm,font=fontsize{12}{0}selectfont,shift={(3cm,0)}] (PHYtag) {PHY Layer\[0.5em](Energy Harvester)};
node [whtblock, above=of PHYtag, node distance=13cm,font=fontsize{12}{0}selectfont] (FSAtag) {FSA \[0.5em]Anti-Collision Protocol};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CONTAINERS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{scope}[on background layer]
coordinate (aux1) at ([yshift=3mm]LBT.north);
node [container1,fit=(aux1) (FSA)(PHY)] (Reader) {};
node at (Reader.north) [fill=white,draw,font=fontsize{12}{0}selectfont] {textbf{Reader}};
%-----------------------------------------------------------
coordinate (aux2) at ([yshift=3mm]FSAtag.north);
node [container1,fit=(aux2) (PHYtag)(FSAtag)] (TAG) {};
node at (TAG.north) [fill=white,draw,font=fontsize{12}{0}selectfont] {textbf{Tag}};
end{scope}
%************************************************************
%************************************************************
% Draw edges
%************************************************************
%************************************************************
draw [line,darkgray,very thick] (LBT.south) -- (FSA.north);
draw [line,darkgray,very thick] (FSA.south) -- (PHY.north);
draw [line,darkgray,very thick] (FSAtag.south) -- (PHYtag.north);
draw [-latex,darkgray,ultra thick] ([yshift=6pt]PHY.east) -- node [above] {Power-Up \[0.5em] Link} ([yshift=6pt]PHYtag.west);
draw [-latex,darkgray,ultra thick] ([yshift=-6pt]PHYtag.west) -- node [below] {Backscattered \[0.5em] Link} ([yshift=-6pt]PHY.east);
end{tikzpicture}
end{document}

answered 49 mins ago
koleygrkoleygr
11.5k11038
11.5k11038
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%2f477597%2fhow-to-set-the-horizontal-separation-of-group-of-rectangles%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