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.

How can I remove the "chapter" title for one chapter only?

E.g. if I want to remove the "chapter" title for chapter 2 only, using

\documentclass{report}

\begin{document}

\chapter{Hello}
\chapter{World}
\chapter{!}

\end{document}

I get:

enter image description here

I would like to obtain instead:

enter image description here

share|improve this question
2  
Use \chapter*{World} to not have the title, and \stepcounter{chapter} to keep the chapter numbering consistent. –  ChrisS Aug 3 at 4:06
1  
@ChrisS - One should probably use \refstepcounter rather than \stepcounter, as all kinds of cross-referencing mechanisms rely on counters being stepped via \refstepcounter. –  Mico Aug 3 at 4:14
    
@Mico \refstepcounter would be necessary only if one wants to set a label for the (inexistent) number. Otherwise \stepcounter is as good. On the other hand it' difficult to understand why chapter two shouldn't receive its number. –  egreg Aug 3 at 9:12

1 Answer 1

up vote 6 down vote accepted

The chapter head is set in report.cls by the macro \@makechapterhead:

\def\@makechapterhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
        \huge\bfseries \@chapapp\space \thechapter
        \par\nobreak
        \vskip 20\p@
    \fi
    \interlinepenalty\@M
    \Huge \bfseries #1\par\nobreak
    \vskip 40\p@
  }}

We can create a "duplicate" of it, only with the creation of Chapter X removed. Let's call this duplicate \fake@makechapterhead:

\def\fake@makechapterhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
        \huge\bfseries \strut%\@chapapp\space \thechapter
        \par\nobreak
        \vskip 20\p@
    \fi
    \interlinepenalty\@M
    \Huge \bfseries #1\par\nobreak
    \vskip 40\p@
  }}

The commented part has been replaced by \strut (in order to have an appropriate baseline correctly set.

Now we add some house-keeping and user-interface macros and you can use \newchapterhead to create the "fake" chapter head, and \restorechapterhead to restore the original setting:

\documentclass{report}

\makeatletter
\let\old@makechapterhead\@makechapterhead
% Taken from http://mirrors.ctan.org/macros/latex/unpacked/report.cls
\def\fake@makechapterhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
        \huge\bfseries \strut%\@chapapp\space \thechapter
        \par\nobreak
        \vskip 20\p@
    \fi
    \interlinepenalty\@M
    \Huge \bfseries #1\par\nobreak
    \vskip 40\p@
  }}
\newcommand{\newchapterhead}{\let\@makechapterhead\fake@makechapterhead}
\newcommand{\restorechapterhead}{\let\@makechapterhead\old@makechapterhead}
\makeatother

\begin{document}

\chapter{Hello}

\newchapterhead
\chapter{World}

\restorechapterhead
\chapter{!}

\end{document}

The above procedure keeps the same vertical location for the chapter title by merely removing the phrase Chapter X from being printed.


An alternative approach might be to use the \chapter* setting of a chapter. This doesn't provide the same vertical position on the chapter-page for the title, but may also be what you're after:

\documentclass{report}
\begin{document}

\chapter{Hello}

\clearpage\refstepcounter{chapter}%
\chapter*{World}

\chapter{!}

\end{document}

The issuing of a \clearpage\refstepcounter{chapter} allows for two things:

  1. Steps the chapter counter to have a correct reference for sub-content in chapter World;

  2. Correct mark in the document if you're using hyperref for placing a internal document hyperlink.

share|improve this answer

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.