Page LayoutStretch vertical Space in 'minipage' Environment

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
arobase
Posts: 33
Joined: Sat Apr 14, 2012 7:46 pm

Stretch vertical Space in 'minipage' Environment

Post by arobase »

The {minipage} environment seems to ignore \vfill. Workaround?

Code: Select all

\documentclass{memoir}
%\usepackage{lmodern}
%\usepackage[margin=2in]{geometry}
\usepackage[english]{babel}

\begin{document}
\thispagestyle{empty}

\begin{minipage}{0.5 \linewidth}

A

\vfill

B

\end{minipage}

 \end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Stretch vertical Space in 'minipage' Environment

Post by Stefan Kottwitz »

\vfill works in a minipage, if a height is specified. In contrast to a normal page, a minipage doesn't have a predefined height. You can use an optional argument for this, such as:

Code: Select all

\begin{minipage}[t][\textheight]{0.5 \linewidth}
Stefan
LaTeX.org admin
Post Reply