13

In the appendix of my thesis (using scrreprt) I want to start a new chapter containing a lot of large figures. For formating reasons I don't want the automatic heading, created when using \chapter{bla}. However I do want the chapter to appear in the TOC and also I want the page header to show the chapter correctly.

So my question is, is there a way to start a new chapter without the automatic heading? I don't want all chapters to be without heading, only this one.

2
  • Does the following meet your need? \chapter[My Contents Title]{}
    – Alan
    Commented Sep 7, 2014 at 13:19
  • Unfortunaly not, because number of the chapter is still printed, e.g. "A." in my case. But thanks for the idea.
    – Haatschii
    Commented Sep 7, 2014 at 14:27

3 Answers 3

13

The chapter head is typeset by \@makechapterhead, which is a macro with one argument, while the TOC entry and the heading are direct responsibiity of \@chapter and independent of \@makechapterhead. If we temporarily redefine it to simply gobble its argument, we're done.

\documentclass{report}

\makeatletter
\newcommand{\unchapter}[1]{%
  \begingroup
  \let\@makechapterhead\@gobble % make \@makechapterhead do nothing
  \chapter{#1}
  \endgroup
}
\makeatother

\pagestyle{headings}

\begin{document}
\tableofcontents

\chapter{Regular}

Text

\unchapter{No chapter head}

Text\newpage
text: check the heading

\chapter{This is regular again}

\end{document}
6
  • 1
    You golden god saving us from thesis formatting hell bless you
    – angs
    Commented May 29, 2020 at 0:35
  • I also need to have a chapter entered into the toc without the heading printed on the Chapter starting page. But I use \chapter*{}... so as to not print the number of the chapter beside the titles in the toc ... and then I use \addcontentsline{toc}{chapter}{\normalfont\textit{bla}}. This solution causes the chapter to have a number printed in the toc ... Is there a way to modify this solution to suit my needs ?
    – RichWalt
    Commented Mar 11, 2022 at 16:51
  • @RichWalt \addcontentsline{toc}{chapter}{text} will not add chapter numbers.
    – egreg
    Commented Mar 11, 2022 at 17:28
  • @egreg ... and I do not want a chapter number either. :-) Howerver, this solution is adding one. I'm trying to modify it so as to NOT have a chapter number.
    – RichWalt
    Commented Mar 11, 2022 at 17:46
  • @RichWalt Please ask a new question with the details of what you want to achieve.
    – egreg
    Commented Mar 11, 2022 at 17:47
2

An old exchange...

but I have a great solution so I give it.

\makeatletter
\newcommand{\mychapter}[1]{%
  \begingroup
    \chapter*{#1}
    \addcontentsline{toc}{chapter}{#1}
     \markboth{#1}{}
  \endgroup
}
\makeatother

And, of course, replace \chapter by \mychapter in your latex file.

1
  • 5
    Welcome to TeX.SX! Are you sure this is a great solution? You will still create the heading with this (\chapter*) which is not what the OP has asked for.
    – TeXnician
    Commented Dec 12, 2018 at 8:21
2

This is a nice combination of both:

\makeatletter
\newcommand{\unchapter}[1]{%
  \begingroup
  \let\@makeschapterhead\@gobble % make \@makechapterhead do nothing
  \chapter*{#1}
  \addcontentsline{toc}{chapter}{#1}
  \markboth{#1}{}
  \endgroup
}
\makeatother

Makes the header disappear and a contentsline in the table of contents without a number.

1
  • Welcome to TeX.SE! Did you saw the -1 for the second answer and the comment below?
    – Mensch
    Commented Nov 29, 2021 at 20:53

You must log in to answer this question.

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