[Tex/LaTex] Why does \vfill not work inside minipage


Perhaps the answer is trivial, and I am facing the scenario as part of a larger macro. I faced a situation where I found that \vfill does not work inside minipage environment.

The extracted code from the bigger picture can be minimized to the following.



  As far as the laws of mathematics refer to reality, they are not
  certain; and as far as they are certain, they do not refer to

  Mathematics, rightly viewed, possesses not only truth, but supreme
  beauty - a beauty cold and austere, like that of


The \vfill above behaves as if it is not there.

Perhaps the design is such that minipages shall remain as mini pages and will not fill up the whole page. But I would like to know the answer.

And while we are on the issue, is there a way I can make \vfill work in a situation like the above. Use of minipage in my macro is (almost) unavoidable.

Best Answer

It is the vertical analogue of

\mbox{a\hfill b}

compare with

\makebox[5cm]{a\hfill b}

stretchable glue stretches if needed but has a natural length. \vfill is \vspace{0pt plus 1fill} so has a natural length of zero.

If you used the optional argument to specify a forced height for your minipage, the \vfill would stretch to fill the specified space.