6

I'm trying to create a 3 column book layout. So far the only way I've figured out to get 3 columns is to use the venerable multicol package, which works nicely.

\chapter{Something Kant Said}
\begin{multicols*}{3}
\kant
\end{multicols}

What I'd like to do is style my \chapters so that multicols automatically begins and ends in the right place. Does latex have such a facility?

Zendel
  • 203

1 Answers1

4

Here's one way to do it:

\documentclass{book}
\usepackage{etoolbox}
\usepackage{multicol}
\usepackage{kantlipsum}
\newif\iffirst
\makeatletter
\appto{\mainmatter}
{\firsttrue
\preto{\chapter}{\iffirst\firstfalse\else\end{multicols*}\fi}
\preto{\enddocument}{\end{multicols*}}
\apptocmd{\@makechapterhead}{\begin{multicols*}{3}}{}{}
\apptocmd{\@makeschapterhead}{\begin{multicols*}{3}}{}{}
}
\makeatother
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\chapter{A chapter}
\kant
\chapter{A chapter}
\kant
\chapter{A chapter}
\kant
\end{document}
Alan Munn
  • 218,180
  • Thanks, this is very helpful, however it breaks \titleformat... see below... – Zendel Sep 09 '18 at 17:34
  • 1
    @Zendel Well you didn't give a minimal example document, so without that it's hard to tell what you were doing. Since modifying things using titlesec adds an extra layer of difficulty, I would suggest asking a new question linking to this one, but including a complete sample document that shows what you're trying to do. – Alan Munn Sep 09 '18 at 17:36
  • Thanks for this feedback. I've posted a new question here:

    https://tex.stackexchange.com/questions/450249/automatically-add-beginmulticolsn-to-chapters-styled-with-titleformat

    – Zendel Sep 10 '18 at 13:42