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:
I would like to obtain instead:
Best Answer
The chapter head is set in
report.cls
by the macro\@makechapterhead
:We can create a "duplicate" of it, only with the creation of
Chapter X
removed. Let's call this duplicate\fake@makechapterhead
: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: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:The issuing of a
\clearpage\refstepcounter{chapter}
allows for two things:Steps the
chapter
counter to have a correct reference for sub-content in chapterWorld
;Correct mark in the document if you're using
hyperref
for placing a internal document hyperlink.