1

This is a follow up to the question How do I force a column-break in a multi-column page?. Compiling code from the accepted answer at http://latex.informatik.uni-halle.de/latex-online/latex.php (and at my local machine as well) gives strange output: text in left column is stretched, it seems that the \vfill command has been ignored.

How to fix this behaviour? Here is the picture of the output: enter image description here

Santiago
  • 251
  • \vfill is ignored when it is at the beginning or end of a page (or obviously a column now as well). One can fix it by adding a \null after the \vfill, or using \vspace*{\fill}. – John Kormylo Nov 14 '16 at 04:08
  • @JohnKormylo, your solution fixed my problem. Please post it as an aswer in order to mark the question as solved. – Santiago Nov 14 '16 at 06:54

1 Answers1

2

Modified from referenced solution:

\documentclass{article}
\usepackage[a4paper,margin=2cm]{geometry}
\usepackage{lipsum,multicol}
\usepackage[colorlinks]{hyperref}
\title{Introduction to \LaTeX}
\author{xport}
\begin{document}

\begin{multicols}{2}
\maketitle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Abstract}
\lipsum[1-2]
\vspace*{\fill}
\columnbreak
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tableofcontents
%\vfill
%\columnbreak
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Counter}
\lipsum[1]
\section{Box}
\lipsum[1]
\subsection{Parbox}
\lipsum[1]
\subsection{Rule}
\lipsum[1]
\end{multicols}
\end{document}
John Kormylo
  • 79,712
  • 3
  • 50
  • 120