22

I am writing a book in twocolumn format. Section headers appear in their respective column, and for most of the book, that is fine for me.

But for a specific chapter of the book, I would prefer the section header to span both columns. Only the section header, not the subsection headers, and only in that specific chapter of the book.

Is there a way to achieve this?

DevSolar
  • 7,857

2 Answers2

18

if it starts on a new page use the optional argument of \twocolumn

\documentclass[twocolumn]{article}
\usepackage{lipsum}
\begin{document}
\twocolumn[\section{I can find a tool to convert PDF to 
  EPS in my neither bathroom nor kitchen}]

\lipsum[1-2]

\section{bar}
\lipsum[1-5]

\end{document}
  • Excellent! This is what I've been looking for (but obviously not hard enough). – DevSolar Jul 22 '11 at 08:38
  • @Dev: Are you sure that each section in your document starts on a new page? :-) – Display Name Jul 22 '11 at 09:00
  • @xport: No, but all of them that I need to stretch across columns. ;-) Besides, I've been doing some testing of your multicol suggestion, and it somewhat messes up my column layout. Herbert's suggestion worked perfectly right out-of-the-box. Sorry. ;-) – DevSolar Jul 22 '11 at 09:04
6

Herbert's answer with \twocolumn[...] makes each section starts on a new page. If you don't like this behavior, then use multicol package that is very flexible.

enter image description here

\documentclass{article}
\usepackage[a3paper,margin=2cm]{geometry}
\usepackage{lipsum,multicol}
\usepackage[colorlinks]{hyperref}
\title{Introduction to \LaTeX}
\author{xport}
\begin{document}
\maketitle
\tableofcontents
\section{I can find a tool to convert PDF to EPS in my neither bathroom nor kitchen. Normal mode.}
\begin{multicols}{2}
\lipsum[1]
\lipsum[2-3]
\end{multicols}

\section{Jesus is the absolute expression of perfection. With column break.}
\begin{multicols}{2}
\lipsum[1]
\columnbreak
\lipsum[2-3]
\end{multicols}

\section{Jesus is the absolute expression of perfection. Filling from left to right column.}
\begin{multicols*}{2}
\lipsum[1]
\lipsum[2-4]
\end{multicols*}

\lipsum[1]
\end{document}

Notes:

  1. Use \raggedcolumns globally in the preamble if you don't want the bottom baselines of all columns to be aligned. The default is \flushcolumns, so TEX will normally try to make both the top and bottom baselines of all columns align.
Display Name
  • 46,933