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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
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