2

I'm writing a document and i want two column section to write a text. I use multicol package, but if the text of the first column is shorter than the second, the first text will align to the bottom of the second text.

How can i have the first text on the top?

I want the line1 of sec 1 align with line1 of sec2

\documentclass[12pt,a4paper]{article}
\title{Title}
\author{CE}
\usepackage{multicol}

\begin{document}
\maketitle

\begin{flushleft}
\begin{multicols}{2}

\section{sec1} 
line1 \\

\columnbreak

\section{sec 2}
line 1 \\
line 2 \\
line 3 \\
line 4

\end{multicols}
\end{flushleft}
\end{document}

enter image description here

  • 1
    Hi, welcome. Please add an entire compileable code that reproduces your problem. – AndréC Oct 31 '19 at 20:58
  • @AndréC I add the code – Zetlark Oct 31 '19 at 21:25
2

Just specify this with the command \raggedcolumns

screenshot

\documentclass[12pt,a4paper]{article}
\title{Title}
\author{CE}
\usepackage{multicol}

\begin{document}
\maketitle

\begin{flushleft}
\begin{multicols}{2}\raggedcolumns% <--- add these 
\section{sec1}


line1 

\columnbreak

\section{sec 2}
line 1 

line 2

line 3

line 4

\end{multicols}
\end{flushleft}
\end{document}
| improve this answer | |
  • It works, thank you !! – Zetlark Oct 31 '19 at 22:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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