2

How can I always align text on top of the subsection to avoid situations, like those in the picture?

Enter image description here

Code example

\documentclass{article}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{multicol}

\title{Test}
\date{May 2024}

\begin{document}

\maketitle

\section{Introduction}
\begin{multicols}{2}
    \subsection{Sub1}
    \lipsum[3]
    \subsection{Sub2}
    \lipsum[1]
\end{multicols}

\end{document}
1
  • You can control it on a case-by-case basis by adding \vfill where you want the gaps to appear. Commented May 30 at 14:03

1 Answer 1

4

enter image description here

add \raggedcolumns

\documentclass{article}
\usepackage{graphicx} 
\usepackage{lipsum}
\usepackage{multicol}

\title{Test}
\date{May 2024}
\raggedcolumns
\begin{document}

\maketitle

\section{Introduction}
\begin{multicols}{2}
    \subsection{Sub1}
    \lipsum[3]
    \subsection{Sub2}
    \lipsum[1]
\end{multicols}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .