Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using the book class, is there a way to modify the \chapter command to avoid the "Chapter #" above the chapter name and keeping it numbered? Normally I get, for example

Chapter 2

The flight of the Bumblebee

But I would like only

The flight of the Bumblebee
share|improve this question
    
By keeping the numbering, should this appear in the ToC still? And where else? Please provide a minimal working example (MWE) that we can use as a point of departure. –  Werner Nov 5 '12 at 23:28
    
One option would be to use titlesec package for the changes. For example see: tex.stackexchange.com/questions/11444/… . If you are still having problem, modify the question to be more specific. –  mythealias Nov 5 '12 at 23:53
    
@Werner Yes, the number should appear in the TOC and in the \ref. Gonzalo solution works perfectly. Thank you everybody for the interest and help. –  Emmet Nov 6 '12 at 8:02
add comment

1 Answer

up vote 5 down vote accepted

One possibility using the titlesec package:

\documentclass{book}
\usepackage{titlesec}
\usepackage{lipsum}% just to generate text for the example

\titleformat{\chapter}[display]
  {\normalfont\bfseries}{}{0pt}{\Huge}
\titlespacing*{\chapter}
  {0pt}{20pt}{40pt}

\begin{document}

\chapter{The flight of the Bumblebee}
\lipsum[4]

\end{document}

enter image description here

Without packages, one can redefine \@makechapterhead as implemented in book.cls:

\documentclass{book}
\usepackage{lipsum}% just to generate text for the example

\makeatletter
\def\@makechapterhead#1{%
  \vspace*{20\p@}%
  {\parindent \z@ \raggedright \normalfont
    \interlinepenalty\@M
    \Huge \bfseries #1\par\nobreak
    \vskip 40\p@
  }}
\makeatother

\begin{document}

\chapter{The flight of the Bumblebee}
\lipsum[4]

\end{document}

In the previous example I decreased some vertical space before the title; if one doesn't want this, one can simply (as Mico suggests in his comment) \let \@makechapterhead (controlling formatting for headings for numbered chapters) to be \@makeschapterhead (controlling formatting for headings for numbered chapters):

\documentclass{book}
\usepackage{lipsum}% just to generate text for the example

\makeatletter
\let\@makechapterhead\@makeschapterhead
\makeatother

\begin{document}

\chapter{The flight of the Bumblebee}
\lipsum[4]

\end{document}
share|improve this answer
    
Glad to liked my suggestion. :-) –  Mico Nov 6 '12 at 1:14
    
That was exactly what I was looking for, thank you very much. –  Emmet Nov 6 '12 at 8:04
    
By the way, what is the best way to do it? Since they produce the same result, is there some reason to prefer one approach to the other? –  Emmet Nov 6 '12 at 8:06
    
@Emmet the three are valid approaches; which one to use depends basically on your taste. If you don't feel like adding new packages, the last two approaches are for you; if you don't need any special adjustment for the spacing, the last approach is the quickest way. Using the first approach (using titlesec) you don't need to know the internal definitions. All in all, it all boils down to what approach makes you feel more comfortable. –  Gonzalo Medina Nov 6 '12 at 23:00
    
@GonzaloMedina I see, I think I'll use titlesec, thank you very much. –  Emmet Nov 7 '12 at 13:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.