# \titleformat{\chapter} does not seem to trigger when adding a PDF as a new chapter

I have a workflow that involves adding some of the chapters in a report in via the \includepdf command from the package pdfpages. In this process I want some of the PDFs to be the start of a new chapter. And every chapter gets a new page before it with a title which I configure with \titleformat{\chapter}[display]. I use the addtotoc switch to tell latex to add the PDF as a new chapter and add it to the TOC. In the past this has worked just dandy, but on my latest document I find that I'm not getting a new page with chapter title before the PDF chapter. The TOC gets updated, but there's no chapter title page. I have whittled my tex file down to the pretty minimal reproducible doc below. The file example.pdf is a very simple PDF document for testing. You can download it here.

What I find most mystifying is that I have another workflow that uses this same logic... and it works. And I can't figure out the material difference between the example below and the one that works properly.

Any idea?

\documentclass{book}
\usepackage{pdfpages}        % for inserting pdfs
\usepackage{fancyhdr}        % for fancy editing of footers
\usepackage{titlesec}

\usepackage{lipsum}

\pagestyle{fancy}

%% this sets up the title page for each chapter
\titleformat{\chapter}[display]
{\normalfont\Large\filcenter\sffamily}
{\titlerule[1pt] \vspace{1pt} \titlerule \vspace{1pc}
\LARGE\MakeUppercase{\chaptertitlename} \thechapter}
{1pc}
{\titlerule
\vspace{1pc}%
\Huge}
[\newpage] % creates the new page

\begin{document}

\tableofcontents

\chapter{ch 2}
\lipsum{1-5}

\end{document}

• I get the page for chapter 2; of course, since there is no \chapter command before the first inclusion, no separate page is added. Apr 26 '18 at 20:56
• aaaaand I'm an idiot. I realize now that we were handcrafting section pages in the PDFs that emulated the chapter breaks. So I was totally wrong that I had had this working before. Apr 26 '18 at 21:16

As the name addtotoc suggests, this options simply adds an entry to the table of contents, but does not really start a chapter. If you want real chapters, including the title page, you can simply add your pdf after the begin of a chapter.

\documentclass{book}
\usepackage{pdfpages}        % for inserting pdfs
\usepackage{fancyhdr}        % for fancy editing of footers
\usepackage{titlesec}

\usepackage{lipsum}

\pagestyle{fancy}

%% this sets up the title page for each chapter
\titleformat{\chapter}[display]
{\normalfont\Large\filcenter\sffamily}
{\titlerule[1pt] \vspace{1pt} \titlerule \vspace{1pc}
\LARGE\MakeUppercase{\chaptertitlename} \thechapter}
{1pc}
{\titlerule
\vspace{1pc}%
\Huge}
[\newpage] % creates the new page

\begin{document}

\tableofcontents

\chapter{A. Ex 1}
\includepdf[ pages=-,