4

I am trying to create a new document class, similar to books, but with two columns and where new chapters always starts in a new page, printing the chapter name inside a box that should occupy two columns. How to do something like this?

2
  • Note: using floats wouldn't work in this case, because I want the box in an specific position.
    – Thiago Harry
    Nov 28, 2011 at 23:02
  • Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question.
    – Werner
    Nov 29, 2011 at 7:31

1 Answer 1

4

The titlesec package provides a good interface for sectioning commands:

enter image description here

\documentclass[twocolumn]{book}
\usepackage{lipsum}% for dummy text
\usepackage{titlesec}

\titleformat{\chapter}[frame]
  {\normalfont\huge\bfseries}{\thechapter.}{1.0em}{\Huge}
\titlespacing*{\chapter}{0pt}{-20pt}{10pt}

\begin{document}
\chapter{First Chapter Title}
\lipsum[1-5]
\end{document}
1
  • Yes, this is what I was looking for. With some changes in this sample code I got the effect I was looking for. Thanks. Nov 29, 2011 at 15:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .