Vertical spacing vfill inside tcolorbox











up vote
4
down vote

favorite












Why vfill does not work inside tcolorbox? Here is my MuWE (Minimal unWorking Example)



documentclass{scrartcl}
usepackage[many]{tcolorbox}
newtcolorbox{bilety}
{ enhanced,
space to upper,
height=5cm,
%borderline={0.3mm}{0mm}{black!75, dashed},
segmentation style={black, solid, opacity=0, line width=0pt},
colback = black!5!white,
colframe = black!15!white,
sharpish corners,
}

begin{document}

begin{bilety}
some text
vfill
some other text
end{bilety}

end{document}


-------------------------PDF output is----------------------



enter image description here



But vskip does!



    begin{bilety}
some text
vskip 3cm
some other text
end{bilety}


-------------------------PDF output is----------------------



enter image description here










share|improve this question




















  • 1




    it is the vertical analogue of mbox{ahfill b} which does not stretch the box, boxing sets all glue at its natural size which is 0pt for vfill although since a height is specified you might have hoped the package had used the height specification on the underlying minipage/vbox in which case it would have had an effect.
    – David Carlisle
    Dec 31 '14 at 0:16












  • The text inside the tcolorbox is boxed.
    – egreg
    Dec 31 '14 at 0:19















up vote
4
down vote

favorite












Why vfill does not work inside tcolorbox? Here is my MuWE (Minimal unWorking Example)



documentclass{scrartcl}
usepackage[many]{tcolorbox}
newtcolorbox{bilety}
{ enhanced,
space to upper,
height=5cm,
%borderline={0.3mm}{0mm}{black!75, dashed},
segmentation style={black, solid, opacity=0, line width=0pt},
colback = black!5!white,
colframe = black!15!white,
sharpish corners,
}

begin{document}

begin{bilety}
some text
vfill
some other text
end{bilety}

end{document}


-------------------------PDF output is----------------------



enter image description here



But vskip does!



    begin{bilety}
some text
vskip 3cm
some other text
end{bilety}


-------------------------PDF output is----------------------



enter image description here










share|improve this question




















  • 1




    it is the vertical analogue of mbox{ahfill b} which does not stretch the box, boxing sets all glue at its natural size which is 0pt for vfill although since a height is specified you might have hoped the package had used the height specification on the underlying minipage/vbox in which case it would have had an effect.
    – David Carlisle
    Dec 31 '14 at 0:16












  • The text inside the tcolorbox is boxed.
    – egreg
    Dec 31 '14 at 0:19













up vote
4
down vote

favorite









up vote
4
down vote

favorite











Why vfill does not work inside tcolorbox? Here is my MuWE (Minimal unWorking Example)



documentclass{scrartcl}
usepackage[many]{tcolorbox}
newtcolorbox{bilety}
{ enhanced,
space to upper,
height=5cm,
%borderline={0.3mm}{0mm}{black!75, dashed},
segmentation style={black, solid, opacity=0, line width=0pt},
colback = black!5!white,
colframe = black!15!white,
sharpish corners,
}

begin{document}

begin{bilety}
some text
vfill
some other text
end{bilety}

end{document}


-------------------------PDF output is----------------------



enter image description here



But vskip does!



    begin{bilety}
some text
vskip 3cm
some other text
end{bilety}


-------------------------PDF output is----------------------



enter image description here










share|improve this question















Why vfill does not work inside tcolorbox? Here is my MuWE (Minimal unWorking Example)



documentclass{scrartcl}
usepackage[many]{tcolorbox}
newtcolorbox{bilety}
{ enhanced,
space to upper,
height=5cm,
%borderline={0.3mm}{0mm}{black!75, dashed},
segmentation style={black, solid, opacity=0, line width=0pt},
colback = black!5!white,
colframe = black!15!white,
sharpish corners,
}

begin{document}

begin{bilety}
some text
vfill
some other text
end{bilety}

end{document}


-------------------------PDF output is----------------------



enter image description here



But vskip does!



    begin{bilety}
some text
vskip 3cm
some other text
end{bilety}


-------------------------PDF output is----------------------



enter image description here







vertical-alignment tcolorbox






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 31 '14 at 0:05

























asked Dec 30 '14 at 23:51









sergiokapone

2,337925




2,337925








  • 1




    it is the vertical analogue of mbox{ahfill b} which does not stretch the box, boxing sets all glue at its natural size which is 0pt for vfill although since a height is specified you might have hoped the package had used the height specification on the underlying minipage/vbox in which case it would have had an effect.
    – David Carlisle
    Dec 31 '14 at 0:16












  • The text inside the tcolorbox is boxed.
    – egreg
    Dec 31 '14 at 0:19














  • 1




    it is the vertical analogue of mbox{ahfill b} which does not stretch the box, boxing sets all glue at its natural size which is 0pt for vfill although since a height is specified you might have hoped the package had used the height specification on the underlying minipage/vbox in which case it would have had an effect.
    – David Carlisle
    Dec 31 '14 at 0:16












  • The text inside the tcolorbox is boxed.
    – egreg
    Dec 31 '14 at 0:19








1




1




it is the vertical analogue of mbox{ahfill b} which does not stretch the box, boxing sets all glue at its natural size which is 0pt for vfill although since a height is specified you might have hoped the package had used the height specification on the underlying minipage/vbox in which case it would have had an effect.
– David Carlisle
Dec 31 '14 at 0:16






it is the vertical analogue of mbox{ahfill b} which does not stretch the box, boxing sets all glue at its natural size which is 0pt for vfill although since a height is specified you might have hoped the package had used the height specification on the underlying minipage/vbox in which case it would have had an effect.
– David Carlisle
Dec 31 '14 at 0:16














The text inside the tcolorbox is boxed.
– egreg
Dec 31 '14 at 0:19




The text inside the tcolorbox is boxed.
– egreg
Dec 31 '14 at 0:19










1 Answer
1






active

oldest

votes

















up vote
7
down vote



accepted










In this case, it's a not a bug but a feature. The inner text box is decoupled from the fixed height setting for a number of reasons, e.g. lower box part support and breakability. Therefore, you cannot use vfill, because the inner text box has no fixed height.



But, you can use a minipage with a fixed height inside the tcolorbox. You can put this minipage into the box setting options:



documentclass{scrartcl}
usepackage[many]{tcolorbox}

newtcolorbox{bilety}
{ enhanced,
space to upper,
%height=5cm,
segmentation style={black, solid, opacity=0, line width=0pt},
colback = black!5!white,
colframe = black!15!white,
sharpish corners,
before upper={begin{minipage}[t][4cm]{linewidth}},
after upper={end{minipage}},
}

begin{document}

begin{bilety}
some text
parvfill
some other text
end{bilety}

end{document}


Update (16-Nov-2018):



Alternatively, the option text fill can be used to automatically insert a minipage with adapted fixed height:



documentclass{scrartcl}
usepackage[many]{tcolorbox}

newtcolorbox{bilety}
{ enhanced,
%space to upper,
height=5cm,
%segmentation style={black, solid, opacity=0, line width=0pt},
colback = black!5!white,
colframe = black!15!white,
sharpish corners,
text fill,
}

begin{document}

begin{bilety}
some text
parvfill
some other text
end{bilety}

end{document}


enter image description here






share|improve this answer























  • For people interested, note that when the size is already given in the box, you can set directly the good size to the minipage by using: begin{minipage}[t][tcbtextheight]{1.0linewidth}
    – tobiasBora
    Nov 13 at 11:14













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
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f220094%2fvertical-spacing-vfill-inside-tcolorbox%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
7
down vote



accepted










In this case, it's a not a bug but a feature. The inner text box is decoupled from the fixed height setting for a number of reasons, e.g. lower box part support and breakability. Therefore, you cannot use vfill, because the inner text box has no fixed height.



But, you can use a minipage with a fixed height inside the tcolorbox. You can put this minipage into the box setting options:



documentclass{scrartcl}
usepackage[many]{tcolorbox}

newtcolorbox{bilety}
{ enhanced,
space to upper,
%height=5cm,
segmentation style={black, solid, opacity=0, line width=0pt},
colback = black!5!white,
colframe = black!15!white,
sharpish corners,
before upper={begin{minipage}[t][4cm]{linewidth}},
after upper={end{minipage}},
}

begin{document}

begin{bilety}
some text
parvfill
some other text
end{bilety}

end{document}


Update (16-Nov-2018):



Alternatively, the option text fill can be used to automatically insert a minipage with adapted fixed height:



documentclass{scrartcl}
usepackage[many]{tcolorbox}

newtcolorbox{bilety}
{ enhanced,
%space to upper,
height=5cm,
%segmentation style={black, solid, opacity=0, line width=0pt},
colback = black!5!white,
colframe = black!15!white,
sharpish corners,
text fill,
}

begin{document}

begin{bilety}
some text
parvfill
some other text
end{bilety}

end{document}


enter image description here






share|improve this answer























  • For people interested, note that when the size is already given in the box, you can set directly the good size to the minipage by using: begin{minipage}[t][tcbtextheight]{1.0linewidth}
    – tobiasBora
    Nov 13 at 11:14

















up vote
7
down vote



accepted










In this case, it's a not a bug but a feature. The inner text box is decoupled from the fixed height setting for a number of reasons, e.g. lower box part support and breakability. Therefore, you cannot use vfill, because the inner text box has no fixed height.



But, you can use a minipage with a fixed height inside the tcolorbox. You can put this minipage into the box setting options:



documentclass{scrartcl}
usepackage[many]{tcolorbox}

newtcolorbox{bilety}
{ enhanced,
space to upper,
%height=5cm,
segmentation style={black, solid, opacity=0, line width=0pt},
colback = black!5!white,
colframe = black!15!white,
sharpish corners,
before upper={begin{minipage}[t][4cm]{linewidth}},
after upper={end{minipage}},
}

begin{document}

begin{bilety}
some text
parvfill
some other text
end{bilety}

end{document}


Update (16-Nov-2018):



Alternatively, the option text fill can be used to automatically insert a minipage with adapted fixed height:



documentclass{scrartcl}
usepackage[many]{tcolorbox}

newtcolorbox{bilety}
{ enhanced,
%space to upper,
height=5cm,
%segmentation style={black, solid, opacity=0, line width=0pt},
colback = black!5!white,
colframe = black!15!white,
sharpish corners,
text fill,
}

begin{document}

begin{bilety}
some text
parvfill
some other text
end{bilety}

end{document}


enter image description here






share|improve this answer























  • For people interested, note that when the size is already given in the box, you can set directly the good size to the minipage by using: begin{minipage}[t][tcbtextheight]{1.0linewidth}
    – tobiasBora
    Nov 13 at 11:14















up vote
7
down vote



accepted







up vote
7
down vote



accepted






In this case, it's a not a bug but a feature. The inner text box is decoupled from the fixed height setting for a number of reasons, e.g. lower box part support and breakability. Therefore, you cannot use vfill, because the inner text box has no fixed height.



But, you can use a minipage with a fixed height inside the tcolorbox. You can put this minipage into the box setting options:



documentclass{scrartcl}
usepackage[many]{tcolorbox}

newtcolorbox{bilety}
{ enhanced,
space to upper,
%height=5cm,
segmentation style={black, solid, opacity=0, line width=0pt},
colback = black!5!white,
colframe = black!15!white,
sharpish corners,
before upper={begin{minipage}[t][4cm]{linewidth}},
after upper={end{minipage}},
}

begin{document}

begin{bilety}
some text
parvfill
some other text
end{bilety}

end{document}


Update (16-Nov-2018):



Alternatively, the option text fill can be used to automatically insert a minipage with adapted fixed height:



documentclass{scrartcl}
usepackage[many]{tcolorbox}

newtcolorbox{bilety}
{ enhanced,
%space to upper,
height=5cm,
%segmentation style={black, solid, opacity=0, line width=0pt},
colback = black!5!white,
colframe = black!15!white,
sharpish corners,
text fill,
}

begin{document}

begin{bilety}
some text
parvfill
some other text
end{bilety}

end{document}


enter image description here






share|improve this answer














In this case, it's a not a bug but a feature. The inner text box is decoupled from the fixed height setting for a number of reasons, e.g. lower box part support and breakability. Therefore, you cannot use vfill, because the inner text box has no fixed height.



But, you can use a minipage with a fixed height inside the tcolorbox. You can put this minipage into the box setting options:



documentclass{scrartcl}
usepackage[many]{tcolorbox}

newtcolorbox{bilety}
{ enhanced,
space to upper,
%height=5cm,
segmentation style={black, solid, opacity=0, line width=0pt},
colback = black!5!white,
colframe = black!15!white,
sharpish corners,
before upper={begin{minipage}[t][4cm]{linewidth}},
after upper={end{minipage}},
}

begin{document}

begin{bilety}
some text
parvfill
some other text
end{bilety}

end{document}


Update (16-Nov-2018):



Alternatively, the option text fill can be used to automatically insert a minipage with adapted fixed height:



documentclass{scrartcl}
usepackage[many]{tcolorbox}

newtcolorbox{bilety}
{ enhanced,
%space to upper,
height=5cm,
%segmentation style={black, solid, opacity=0, line width=0pt},
colback = black!5!white,
colframe = black!15!white,
sharpish corners,
text fill,
}

begin{document}

begin{bilety}
some text
parvfill
some other text
end{bilety}

end{document}


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited 3 hours ago

























answered Dec 31 '14 at 10:50









Thomas F. Sturm

19.2k13171




19.2k13171












  • For people interested, note that when the size is already given in the box, you can set directly the good size to the minipage by using: begin{minipage}[t][tcbtextheight]{1.0linewidth}
    – tobiasBora
    Nov 13 at 11:14




















  • For people interested, note that when the size is already given in the box, you can set directly the good size to the minipage by using: begin{minipage}[t][tcbtextheight]{1.0linewidth}
    – tobiasBora
    Nov 13 at 11:14


















For people interested, note that when the size is already given in the box, you can set directly the good size to the minipage by using: begin{minipage}[t][tcbtextheight]{1.0linewidth}
– tobiasBora
Nov 13 at 11:14






For people interested, note that when the size is already given in the box, you can set directly the good size to the minipage by using: begin{minipage}[t][tcbtextheight]{1.0linewidth}
– tobiasBora
Nov 13 at 11:14




















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f220094%2fvertical-spacing-vfill-inside-tcolorbox%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

サソリ

広島県道265号伴広島線

Accessing regular linux commands in Huawei's Dopra Linux