Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

\documentclass{article}

\begin{document}

\begin{minipage}{0.7\textwidth}
  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
  reality.\vfill

  Mathematics, rightly viewed, possesses not only truth, but supreme
  beauty - a beauty cold and austere, like that of
  sculpture.
\end{minipage}

\end{document}

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.

share|improve this question
add comment

1 Answer

up vote 9 down vote accepted

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.

\begin{minipage}[t][.7\textheight]{0.7\textwidth}
share|improve this answer
    
Is there any other way rather than forcing the height? My argument text is of rather variable length. On a second thought I can measure the height once, then put the height in another one. –  Masroor Sep 27 '13 at 13:42
1  
@MMA It's like a rubber band it only stretches if you stretch it. This is unrelated to minipage, it is the same on the main page (as that is a box of forced height (\textheight) –  David Carlisle Sep 27 '13 at 13:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.