6

I am using the multicol package to make a 2 columns based document but I want in a place to have just fusion these two columns, and then go back to the 2 columns but I can't figure out how to achieve this.

11

Here's a generalized version of Tom Bombadil's \multicolinterrupt macro: The current value of \col@number is saved before ending the multicols environment, and after typesetting the "interruption" text a new multicols environment with the same number of columns as the last one is started.

\documentclass[parskip]{scrartcl}
\usepackage[margin=15mm]{geometry}
\usepackage{lipsum}
\usepackage{multicol}
\usepackage{xcolor}

\newcounter{tempcolnum}

\makeatletter
\newcommand{\multicolinterrupt}[1]{% Stuff to span both rows
\setcounter{tempcolnum}{\col@number}
\end{multicols}
#1%
\begin{multicols}{\value{tempcolnum}}
}
\makeatother

\begin{document}

\begin{multicols}{3}
\lipsum[1-2]
\multicolinterrupt{\textcolor{blue}{\lipsum[3-4]}}
\lipsum[5-6]
\end{multicols}

\end{document}
  • Nice, I was wondering if the current column number was somehow accessible, but was, to be honest, too lazy to look it up :) – Tom Bombadil Jun 9 '12 at 10:56
10

Probably like this?

\documentclass[parskip]{scrartcl}
\usepackage[margin=15mm]{geometry}
\usepackage{lipsum}
\usepackage{multicol}
\usepackage{xcolor}

\newcommand{\multicolinterrupt}[1]{% Stuff to span both rows
\end{multicols}
#1
\begin{multicols}{2}
}

\begin{document}

\begin{multicols}{2}
\lipsum[1-2]
\multicolinterrupt{\textcolor{blue}{\lipsum[3-4]}}
\lipsum[5-6]
\end{multicols}

\end{document}

enter image description here

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.