I want to define an environment, that uses \vskip to put some space before and after. Usually it will be used in the normal text, but sometimes I want to push to the bottom of a page with \vfill. When the environment is placed at the bottom of a page due to the current text on a page without \vfill the \vskip afterwards is ignored - but not when using \vfill.
Is there a way to get the same behaviour in both cases (ignoring the \vskip)?
Even without an environment this happens as the following MWE shows.
\documentclass{article} \begin{document} test \vfill % \vskip\baselineskip is added and causes a blank line at the bottom of the page % without that \vfill no space (glue) is inserted at the end (see below) test \vskip\baselineskip \end{document} After a little search on this side I found the command \showoutput to see what's going on in the document. I tried to find out what is the reason for that difference and achieve what I want ... without any success. Here's the relevant part (I think) of \showoutput for that example. The difference is just a single line with or without \vfill.
...\hbox(6.15+0.11)x345.0, glue set 313.84fil, direction TLT ....\localpar .....\localinterlinepenalty=0 .....\localbrokenpenalty=0 .....\localleftbox=null .....\localrightbox=null ....\hbox(0.0+0.0)x15.0, direction TLT ....\TU/lmr/m/n/10 t ....\TU/lmr/m/n/10 e ....\TU/lmr/m/n/10 s ....\TU/lmr/m/n/10 t ....\penalty 10000 ....\glue(\parfillskip) 0.0 plus 1.0fil ....\glue(\rightskip) 0.0 ...\glue 0.0 plus 1.0fill % That's the \vfill I guess ...\glue(\parskip) 0.0 plus 1.0 ...\glue(\parskip) 0.0 ...\glue(\baselineskip) 5.74 ...\hbox(6.15+0.11)x345.0, glue set 313.84fil, direction TLT ....\localpar .....\localinterlinepenalty=0 .....\localbrokenpenalty=0 .....\localleftbox=null .....\localrightbox=null ....\hbox(0.0+0.0)x15.0, direction TLT ....\TU/lmr/m/n/10 t ....\TU/lmr/m/n/10 e ....\TU/lmr/m/n/10 s ....\TU/lmr/m/n/10 t ....\penalty 10000 ....\glue(\parfillskip) 0.0 plus 1.0fil ....\glue(\rightskip) 0.0 ...\glue 12.0 % That's the \vskip I guess (it disappears without the \vfill) ...\glue -0.11 ...\glue 0.0 plus 1.0fil ...\glue 0.0 ...\glue 0.0 plus 0.0001fil By the way, the same happens for \vspace or \addvspace instead of \vskip.

\usepackge{showframe}shows no difference,\vfilldoesn't expand until the page is done (full), which includes the blank line at the bottpm of the page. You can add a\pagebreakso that the blank line is now at the top of the next page. (and will be absorbed)