70

I am writing a document using the report class in two column mode, but I need a \section to spread across both columns, but how can I set that?

Something like

\documentclass[10pt,danish,a4paper,twoside,twocolumn]{report}
\input{preamble.tex}
\begin{document}

% This section should spread over both columns
\section{Name}

\lipsum[1-3]
\end{document}
egreg
  • 1,121,712
The87Boy
  • 1,563
  • 4
  • 13
  • 15
  • 2
    If this is for a figure only, use \begin{figure*} instead of \begin{figure}. cf https://tex.stackexchange.com/a/30988/105230 – TomDLT Jan 22 '20 at 00:37

1 Answers1

87

There is a switch: \onecolumn:

\documentclass[10pt,a4paper,twoside,twocolumn, english]{report}
\usepackage{lipsum, babel}
%\input{preamble.tex}
\begin{document}
\lipsum

% This section should spread over both columns
\onecolumn
\section{Name}

\lipsum[1-3]
\end{document}

But the section has to start on a new page. Go back to twocolumn with? Yes, \twocolumn.

Keks Dose
  • 30,892
  • 27
    Can I do it without starting a new page? – The87Boy Dec 28 '12 at 18:26
  • 5
    Only if you use the multicol package. You know how to get the manual? Type texdoc multicol on the commandline. Beware: the name of the environment is »multicols«. – Keks Dose Dec 28 '12 at 18:29
  • So if I write the Whole page in multicol, I can change it on one section of a page? Or it is also going to display 2 pages? – The87Boy Dec 28 '12 at 18:57
  • Just used this solution for a paper I'm writing. Very helpful for putting full-page tables in the middle of documents. Thanks! – Ari B. Friedman Oct 28 '13 at 14:54
  • 8
    @AriB.Friedman Just to let you know (maybe you already do), the correct way to have a table spreading accross two columns is using \begin{table*} and figures with \begin{figure*}, with their corresponding ends. – Hans Dec 09 '16 at 01:45
  • @Hans, that feels like an answer rather than a comment? Can you elaborate on why it's better? Thanks, Ari – Ari B. Friedman Dec 11 '16 at 05:11
  • Can I apply this for all document? – alper Sep 07 '20 at 20:25
  • @alper Ask a new question, please: apply what where? Include MWE. – Keks Dose Sep 07 '20 at 20:38
  • @KeksDose the solution was pretty simple adding \onecolumn on top of \begin{document} solved it – alper Sep 08 '20 at 17:18
  • 1
    For listings, use float=t if you want the code snippet to span across two columns (in a two column document). Ref e.g.: \lstinputlisting[caption = test,label = test, float=t]{test_code.py} – vineeshvs Sep 27 '21 at 18:18
  • this helped me today. Thanks. I used \towcolumn as well. – Mikasa Jul 28 '23 at 11:15