According to the titlesec
documentation (section 3.5):
You can assign a page style to levels of class top and page, as well as the default chapter with the following command: \assignpagestyle{command}{pagestyle}
It then states (section 3.9) that
There are three classes: page is like the book \part, in a single page, top is like \chapter ...
However using \assignpagestyle
with \part
doesn't seem to work:
\documentclass{book}
\usepackage[pagestyles]{titlesec}
\assignpagestyle{\part}{empty} % Doesn't work
\assignpagestyle{\chapter}{empty} % Works
\begin{document}
\part{Bar}
\chapter{Foo}
\end{document}
I know I can change the \part
and \chapter
pagestyles doing the following in the preamble
\usepackage{etoolbox}
\patchcmd{\part}{plain}{empty}{}{}
\patchcmd{\chapter}{plain}{empty}{}{}
but since I'm using the titlesec
package for my headers I wanted to simply use the \assignpagestyle
command.
\part
is usually defined in a non-standard way and it must be assigned somehow to thepage
class before making use of many features, including\titlespacing
(with\titleformat
, for example). The manual should make this point clearer.