Trapezoid box width changes beyond bounds











up vote
4
down vote

favorite












I have made a flowchart in Tikz, where for the trapezoid (in/output) box I used the following command:



usepackage{tikz}
usetikzlibrary{shapes.geometric, arrows}
tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=blue!30]


The problem here is, I think, the text width parameter, because if I remove that the output box (see pictures) is fine, but the lines on the input are not wide enough. I call the output trapezoid as follows:



node (out1) [io, below of=pro3, yshift=-0.5cm, xshift=0.5] {Output result};


Resulting in an overly wide trapezoid, well beyond the required minimum of 3cm.



Changing the command to



node (out1) [io, below of=pro3, yshift=-0.5cm, xshift=0.5] {Output result\~};


i.e. adding a linebreak and a non-breaking space sets the width of the trapezoid correctly, but that now has a pointless empty line, which makes the text no longer vertically centred in the box.



How can I get this second trapezoid to be of the correct (3cm) width, without forcing an empty line into it?



MCVE:



documentclass[twoside]{report}
usepackage{mathrsfs,amsmath}
%%%%%%%%%% TIKZ OPTIONS %%%%%%%%%%%%%%
usepackage{tikz}
usetikzlibrary{shapes.geometric, arrows}
tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, text width=3cm, draw=black, fill=red!30]
tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=blue!30]
tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30]
tikzstyle{decision} = [diamond, minimum width=3cm, minimum height=1cm, text centered,draw=black, text width=2cm, fill=green!30]
tikzstyle{arrow} = [thick,->,>=stealth]
newcommand{vect}[1]{mathbf{#1}}
newcommand{matr}[1]{mathbf{#1}}
begin{document}

begin{tikzpicture}
node (in1) [io] {Input:\ $dt,nt,nx$ (scalars);\ $vect{x},vect{p}$ (vectors);\ $matr{p}$ (data)};
node (out1) [io, below of=in1, yshift=-0.5cm, xshift=0.5] {Output result};
end{tikzpicture}

begin{tikzpicture}
node (in1) [io] {Input:\ $dt,nt,nx$ (scalars);\ $vect{x},vect{p}$ (vectors);\ $matr{p}$ (data)};
node (out1) [io, below of=in1, yshift=-0.5cm, xshift=0.5] {Output result\~};
end{tikzpicture}

end{document}


I copied most of the code of this tutorial and tried to adapt it to my needs.



enter image description here



I am using TeXStudio 2.12.4 on Windows 7 with PdfLaTeX.



This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2018.3.14)









share|improve this question









New contributor




Adriaan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Are you looking for trapezium stretches=true?
    – marmot
    14 hours ago















up vote
4
down vote

favorite












I have made a flowchart in Tikz, where for the trapezoid (in/output) box I used the following command:



usepackage{tikz}
usetikzlibrary{shapes.geometric, arrows}
tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=blue!30]


The problem here is, I think, the text width parameter, because if I remove that the output box (see pictures) is fine, but the lines on the input are not wide enough. I call the output trapezoid as follows:



node (out1) [io, below of=pro3, yshift=-0.5cm, xshift=0.5] {Output result};


Resulting in an overly wide trapezoid, well beyond the required minimum of 3cm.



Changing the command to



node (out1) [io, below of=pro3, yshift=-0.5cm, xshift=0.5] {Output result\~};


i.e. adding a linebreak and a non-breaking space sets the width of the trapezoid correctly, but that now has a pointless empty line, which makes the text no longer vertically centred in the box.



How can I get this second trapezoid to be of the correct (3cm) width, without forcing an empty line into it?



MCVE:



documentclass[twoside]{report}
usepackage{mathrsfs,amsmath}
%%%%%%%%%% TIKZ OPTIONS %%%%%%%%%%%%%%
usepackage{tikz}
usetikzlibrary{shapes.geometric, arrows}
tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, text width=3cm, draw=black, fill=red!30]
tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=blue!30]
tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30]
tikzstyle{decision} = [diamond, minimum width=3cm, minimum height=1cm, text centered,draw=black, text width=2cm, fill=green!30]
tikzstyle{arrow} = [thick,->,>=stealth]
newcommand{vect}[1]{mathbf{#1}}
newcommand{matr}[1]{mathbf{#1}}
begin{document}

begin{tikzpicture}
node (in1) [io] {Input:\ $dt,nt,nx$ (scalars);\ $vect{x},vect{p}$ (vectors);\ $matr{p}$ (data)};
node (out1) [io, below of=in1, yshift=-0.5cm, xshift=0.5] {Output result};
end{tikzpicture}

begin{tikzpicture}
node (in1) [io] {Input:\ $dt,nt,nx$ (scalars);\ $vect{x},vect{p}$ (vectors);\ $matr{p}$ (data)};
node (out1) [io, below of=in1, yshift=-0.5cm, xshift=0.5] {Output result\~};
end{tikzpicture}

end{document}


I copied most of the code of this tutorial and tried to adapt it to my needs.



enter image description here



I am using TeXStudio 2.12.4 on Windows 7 with PdfLaTeX.



This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2018.3.14)









share|improve this question









New contributor




Adriaan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Are you looking for trapezium stretches=true?
    – marmot
    14 hours ago













up vote
4
down vote

favorite









up vote
4
down vote

favorite











I have made a flowchart in Tikz, where for the trapezoid (in/output) box I used the following command:



usepackage{tikz}
usetikzlibrary{shapes.geometric, arrows}
tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=blue!30]


The problem here is, I think, the text width parameter, because if I remove that the output box (see pictures) is fine, but the lines on the input are not wide enough. I call the output trapezoid as follows:



node (out1) [io, below of=pro3, yshift=-0.5cm, xshift=0.5] {Output result};


Resulting in an overly wide trapezoid, well beyond the required minimum of 3cm.



Changing the command to



node (out1) [io, below of=pro3, yshift=-0.5cm, xshift=0.5] {Output result\~};


i.e. adding a linebreak and a non-breaking space sets the width of the trapezoid correctly, but that now has a pointless empty line, which makes the text no longer vertically centred in the box.



How can I get this second trapezoid to be of the correct (3cm) width, without forcing an empty line into it?



MCVE:



documentclass[twoside]{report}
usepackage{mathrsfs,amsmath}
%%%%%%%%%% TIKZ OPTIONS %%%%%%%%%%%%%%
usepackage{tikz}
usetikzlibrary{shapes.geometric, arrows}
tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, text width=3cm, draw=black, fill=red!30]
tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=blue!30]
tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30]
tikzstyle{decision} = [diamond, minimum width=3cm, minimum height=1cm, text centered,draw=black, text width=2cm, fill=green!30]
tikzstyle{arrow} = [thick,->,>=stealth]
newcommand{vect}[1]{mathbf{#1}}
newcommand{matr}[1]{mathbf{#1}}
begin{document}

begin{tikzpicture}
node (in1) [io] {Input:\ $dt,nt,nx$ (scalars);\ $vect{x},vect{p}$ (vectors);\ $matr{p}$ (data)};
node (out1) [io, below of=in1, yshift=-0.5cm, xshift=0.5] {Output result};
end{tikzpicture}

begin{tikzpicture}
node (in1) [io] {Input:\ $dt,nt,nx$ (scalars);\ $vect{x},vect{p}$ (vectors);\ $matr{p}$ (data)};
node (out1) [io, below of=in1, yshift=-0.5cm, xshift=0.5] {Output result\~};
end{tikzpicture}

end{document}


I copied most of the code of this tutorial and tried to adapt it to my needs.



enter image description here



I am using TeXStudio 2.12.4 on Windows 7 with PdfLaTeX.



This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2018.3.14)









share|improve this question









New contributor




Adriaan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I have made a flowchart in Tikz, where for the trapezoid (in/output) box I used the following command:



usepackage{tikz}
usetikzlibrary{shapes.geometric, arrows}
tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=blue!30]


The problem here is, I think, the text width parameter, because if I remove that the output box (see pictures) is fine, but the lines on the input are not wide enough. I call the output trapezoid as follows:



node (out1) [io, below of=pro3, yshift=-0.5cm, xshift=0.5] {Output result};


Resulting in an overly wide trapezoid, well beyond the required minimum of 3cm.



Changing the command to



node (out1) [io, below of=pro3, yshift=-0.5cm, xshift=0.5] {Output result\~};


i.e. adding a linebreak and a non-breaking space sets the width of the trapezoid correctly, but that now has a pointless empty line, which makes the text no longer vertically centred in the box.



How can I get this second trapezoid to be of the correct (3cm) width, without forcing an empty line into it?



MCVE:



documentclass[twoside]{report}
usepackage{mathrsfs,amsmath}
%%%%%%%%%% TIKZ OPTIONS %%%%%%%%%%%%%%
usepackage{tikz}
usetikzlibrary{shapes.geometric, arrows}
tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, text width=3cm, draw=black, fill=red!30]
tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=blue!30]
tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30]
tikzstyle{decision} = [diamond, minimum width=3cm, minimum height=1cm, text centered,draw=black, text width=2cm, fill=green!30]
tikzstyle{arrow} = [thick,->,>=stealth]
newcommand{vect}[1]{mathbf{#1}}
newcommand{matr}[1]{mathbf{#1}}
begin{document}

begin{tikzpicture}
node (in1) [io] {Input:\ $dt,nt,nx$ (scalars);\ $vect{x},vect{p}$ (vectors);\ $matr{p}$ (data)};
node (out1) [io, below of=in1, yshift=-0.5cm, xshift=0.5] {Output result};
end{tikzpicture}

begin{tikzpicture}
node (in1) [io] {Input:\ $dt,nt,nx$ (scalars);\ $vect{x},vect{p}$ (vectors);\ $matr{p}$ (data)};
node (out1) [io, below of=in1, yshift=-0.5cm, xshift=0.5] {Output result\~};
end{tikzpicture}

end{document}


I copied most of the code of this tutorial and tried to adapt it to my needs.



enter image description here



I am using TeXStudio 2.12.4 on Windows 7 with PdfLaTeX.



This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2018.3.14)






tikz-pgf pdftex miktex tikz-styles






share|improve this question









New contributor




Adriaan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Adriaan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 12 hours ago





















New contributor




Adriaan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 14 hours ago









Adriaan

1235




1235




New contributor




Adriaan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Adriaan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Adriaan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Are you looking for trapezium stretches=true?
    – marmot
    14 hours ago


















  • Are you looking for trapezium stretches=true?
    – marmot
    14 hours ago
















Are you looking for trapezium stretches=true?
– marmot
14 hours ago




Are you looking for trapezium stretches=true?
– marmot
14 hours ago










1 Answer
1






active

oldest

votes

















up vote
6
down vote



accepted










Just add trapezium stretches=true (and use tikzset instead of tikzstyle).



documentclass[twoside]{report}
usepackage{mathrsfs,amsmath}
%%%%%%%%%% TIKZ OPTIONS %%%%%%%%%%%%%%
usepackage{tikz}
usetikzlibrary{shapes.geometric, arrows}
tikzset{startstop/.style={rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, text width=3cm, draw=black, fill=red!30},
io/.style={trapezium, trapezium left angle=70, trapezium right angle=110,
minimum width=3cm, minimum height=1cm, text centered, text width=3cm,
draw=black, fill=blue!30,trapezium stretches=true}, %<- added
process/.style={rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30},
decision/.style={diamond, minimum width=3cm, minimum height=1cm, text
centered,draw=black, text width=2cm, fill=green!30},
arrow/.style={thick,->,>=stealth}}
newcommand{vect}[1]{mathbf{#1}}
newcommand{matr}[1]{mathbf{#1}}
begin{document}

begin{tikzpicture}
node (in1) [io] {Input:\ $dt,nt,nx$ (scalars);\ $vect{x},vect{p}$ (vectors);\ $matr{p}$ (data)};
node (out1) [io, below of=in1, yshift=-0.5cm, xshift=0.5] {Output result};
end{tikzpicture}

begin{tikzpicture}
node (in1) [io] {Input:\ $dt,nt,nx$ (scalars);\ $vect{x},vect{p}$ (vectors);\ $matr{p}$ (data)};
node (out1) [io, below of=in1, yshift=-0.5cm, xshift=0.5] {Output result\~};
end{tikzpicture}

end{document}


enter image description here






share|improve this answer





















  • Thanks! That helped. Out of curiosity, why does this help, and why can't I set streches in the tikzstyle, whereas it works in tikzset? Basically I just followed this tutorial and adapted that to my needs
    – Adriaan
    13 hours ago






  • 1




    @Adriaan You can use tikzstyle, i.e. tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=blue!30,trapezium stretches=true] works. However, it is recommended to switch to tikzset.
    – marmot
    13 hours ago











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Adriaan is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461269%2ftrapezoid-box-width-changes-beyond-bounds%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
6
down vote



accepted










Just add trapezium stretches=true (and use tikzset instead of tikzstyle).



documentclass[twoside]{report}
usepackage{mathrsfs,amsmath}
%%%%%%%%%% TIKZ OPTIONS %%%%%%%%%%%%%%
usepackage{tikz}
usetikzlibrary{shapes.geometric, arrows}
tikzset{startstop/.style={rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, text width=3cm, draw=black, fill=red!30},
io/.style={trapezium, trapezium left angle=70, trapezium right angle=110,
minimum width=3cm, minimum height=1cm, text centered, text width=3cm,
draw=black, fill=blue!30,trapezium stretches=true}, %<- added
process/.style={rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30},
decision/.style={diamond, minimum width=3cm, minimum height=1cm, text
centered,draw=black, text width=2cm, fill=green!30},
arrow/.style={thick,->,>=stealth}}
newcommand{vect}[1]{mathbf{#1}}
newcommand{matr}[1]{mathbf{#1}}
begin{document}

begin{tikzpicture}
node (in1) [io] {Input:\ $dt,nt,nx$ (scalars);\ $vect{x},vect{p}$ (vectors);\ $matr{p}$ (data)};
node (out1) [io, below of=in1, yshift=-0.5cm, xshift=0.5] {Output result};
end{tikzpicture}

begin{tikzpicture}
node (in1) [io] {Input:\ $dt,nt,nx$ (scalars);\ $vect{x},vect{p}$ (vectors);\ $matr{p}$ (data)};
node (out1) [io, below of=in1, yshift=-0.5cm, xshift=0.5] {Output result\~};
end{tikzpicture}

end{document}


enter image description here






share|improve this answer





















  • Thanks! That helped. Out of curiosity, why does this help, and why can't I set streches in the tikzstyle, whereas it works in tikzset? Basically I just followed this tutorial and adapted that to my needs
    – Adriaan
    13 hours ago






  • 1




    @Adriaan You can use tikzstyle, i.e. tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=blue!30,trapezium stretches=true] works. However, it is recommended to switch to tikzset.
    – marmot
    13 hours ago















up vote
6
down vote



accepted










Just add trapezium stretches=true (and use tikzset instead of tikzstyle).



documentclass[twoside]{report}
usepackage{mathrsfs,amsmath}
%%%%%%%%%% TIKZ OPTIONS %%%%%%%%%%%%%%
usepackage{tikz}
usetikzlibrary{shapes.geometric, arrows}
tikzset{startstop/.style={rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, text width=3cm, draw=black, fill=red!30},
io/.style={trapezium, trapezium left angle=70, trapezium right angle=110,
minimum width=3cm, minimum height=1cm, text centered, text width=3cm,
draw=black, fill=blue!30,trapezium stretches=true}, %<- added
process/.style={rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30},
decision/.style={diamond, minimum width=3cm, minimum height=1cm, text
centered,draw=black, text width=2cm, fill=green!30},
arrow/.style={thick,->,>=stealth}}
newcommand{vect}[1]{mathbf{#1}}
newcommand{matr}[1]{mathbf{#1}}
begin{document}

begin{tikzpicture}
node (in1) [io] {Input:\ $dt,nt,nx$ (scalars);\ $vect{x},vect{p}$ (vectors);\ $matr{p}$ (data)};
node (out1) [io, below of=in1, yshift=-0.5cm, xshift=0.5] {Output result};
end{tikzpicture}

begin{tikzpicture}
node (in1) [io] {Input:\ $dt,nt,nx$ (scalars);\ $vect{x},vect{p}$ (vectors);\ $matr{p}$ (data)};
node (out1) [io, below of=in1, yshift=-0.5cm, xshift=0.5] {Output result\~};
end{tikzpicture}

end{document}


enter image description here






share|improve this answer





















  • Thanks! That helped. Out of curiosity, why does this help, and why can't I set streches in the tikzstyle, whereas it works in tikzset? Basically I just followed this tutorial and adapted that to my needs
    – Adriaan
    13 hours ago






  • 1




    @Adriaan You can use tikzstyle, i.e. tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=blue!30,trapezium stretches=true] works. However, it is recommended to switch to tikzset.
    – marmot
    13 hours ago













up vote
6
down vote



accepted







up vote
6
down vote



accepted






Just add trapezium stretches=true (and use tikzset instead of tikzstyle).



documentclass[twoside]{report}
usepackage{mathrsfs,amsmath}
%%%%%%%%%% TIKZ OPTIONS %%%%%%%%%%%%%%
usepackage{tikz}
usetikzlibrary{shapes.geometric, arrows}
tikzset{startstop/.style={rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, text width=3cm, draw=black, fill=red!30},
io/.style={trapezium, trapezium left angle=70, trapezium right angle=110,
minimum width=3cm, minimum height=1cm, text centered, text width=3cm,
draw=black, fill=blue!30,trapezium stretches=true}, %<- added
process/.style={rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30},
decision/.style={diamond, minimum width=3cm, minimum height=1cm, text
centered,draw=black, text width=2cm, fill=green!30},
arrow/.style={thick,->,>=stealth}}
newcommand{vect}[1]{mathbf{#1}}
newcommand{matr}[1]{mathbf{#1}}
begin{document}

begin{tikzpicture}
node (in1) [io] {Input:\ $dt,nt,nx$ (scalars);\ $vect{x},vect{p}$ (vectors);\ $matr{p}$ (data)};
node (out1) [io, below of=in1, yshift=-0.5cm, xshift=0.5] {Output result};
end{tikzpicture}

begin{tikzpicture}
node (in1) [io] {Input:\ $dt,nt,nx$ (scalars);\ $vect{x},vect{p}$ (vectors);\ $matr{p}$ (data)};
node (out1) [io, below of=in1, yshift=-0.5cm, xshift=0.5] {Output result\~};
end{tikzpicture}

end{document}


enter image description here






share|improve this answer












Just add trapezium stretches=true (and use tikzset instead of tikzstyle).



documentclass[twoside]{report}
usepackage{mathrsfs,amsmath}
%%%%%%%%%% TIKZ OPTIONS %%%%%%%%%%%%%%
usepackage{tikz}
usetikzlibrary{shapes.geometric, arrows}
tikzset{startstop/.style={rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, text width=3cm, draw=black, fill=red!30},
io/.style={trapezium, trapezium left angle=70, trapezium right angle=110,
minimum width=3cm, minimum height=1cm, text centered, text width=3cm,
draw=black, fill=blue!30,trapezium stretches=true}, %<- added
process/.style={rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30},
decision/.style={diamond, minimum width=3cm, minimum height=1cm, text
centered,draw=black, text width=2cm, fill=green!30},
arrow/.style={thick,->,>=stealth}}
newcommand{vect}[1]{mathbf{#1}}
newcommand{matr}[1]{mathbf{#1}}
begin{document}

begin{tikzpicture}
node (in1) [io] {Input:\ $dt,nt,nx$ (scalars);\ $vect{x},vect{p}$ (vectors);\ $matr{p}$ (data)};
node (out1) [io, below of=in1, yshift=-0.5cm, xshift=0.5] {Output result};
end{tikzpicture}

begin{tikzpicture}
node (in1) [io] {Input:\ $dt,nt,nx$ (scalars);\ $vect{x},vect{p}$ (vectors);\ $matr{p}$ (data)};
node (out1) [io, below of=in1, yshift=-0.5cm, xshift=0.5] {Output result\~};
end{tikzpicture}

end{document}


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered 13 hours ago









marmot

77.1k487162




77.1k487162












  • Thanks! That helped. Out of curiosity, why does this help, and why can't I set streches in the tikzstyle, whereas it works in tikzset? Basically I just followed this tutorial and adapted that to my needs
    – Adriaan
    13 hours ago






  • 1




    @Adriaan You can use tikzstyle, i.e. tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=blue!30,trapezium stretches=true] works. However, it is recommended to switch to tikzset.
    – marmot
    13 hours ago


















  • Thanks! That helped. Out of curiosity, why does this help, and why can't I set streches in the tikzstyle, whereas it works in tikzset? Basically I just followed this tutorial and adapted that to my needs
    – Adriaan
    13 hours ago






  • 1




    @Adriaan You can use tikzstyle, i.e. tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=blue!30,trapezium stretches=true] works. However, it is recommended to switch to tikzset.
    – marmot
    13 hours ago
















Thanks! That helped. Out of curiosity, why does this help, and why can't I set streches in the tikzstyle, whereas it works in tikzset? Basically I just followed this tutorial and adapted that to my needs
– Adriaan
13 hours ago




Thanks! That helped. Out of curiosity, why does this help, and why can't I set streches in the tikzstyle, whereas it works in tikzset? Basically I just followed this tutorial and adapted that to my needs
– Adriaan
13 hours ago




1




1




@Adriaan You can use tikzstyle, i.e. tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=blue!30,trapezium stretches=true] works. However, it is recommended to switch to tikzset.
– marmot
13 hours ago




@Adriaan You can use tikzstyle, i.e. tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=blue!30,trapezium stretches=true] works. However, it is recommended to switch to tikzset.
– marmot
13 hours ago










Adriaan is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















Adriaan is a new contributor. Be nice, and check out our Code of Conduct.













Adriaan is a new contributor. Be nice, and check out our Code of Conduct.












Adriaan is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461269%2ftrapezoid-box-width-changes-beyond-bounds%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

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

 ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕