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.
Asked
Active
Viewed 5,065 times
2 Answers
11
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}

Tom Bombadil
- 40,123
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}
lockstep
- 250,273
-
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 09 '12 at 10:56