Part sans serif font

fonts

I am using titlesec to change the font of chapter section etc. to Helvetica. I am struggling to do the same with part

This is the code I am using for chapter and section:

\titleformat{\chapter}
    {\normalfont\sffamily\huge\bfseries}
    {\thechapter. }{0em}{\setstretch{1}}
 \titleformat{\section}
    {\normalfont\sffamily\large\bfseries}
    {\thesection}{1em}{}

How do I set a \titleformat to mimic the standard look provded by the book class?

I only need to change the font to \normalfont\sffamily

Here is how it looks now:

enter image description here

Best Answer

You need the display format (Sec. 3 of the titlesec documentation). Looking into book.cls you see that the label "Part" is typeset in \huge, while the part's title comes in \Huge.

\documentclass{book}

\usepackage{newtxtext}
\usepackage{titlesec}

\titleformat{\part}[display]
    {\centering\normalfont\sffamily\huge\bfseries}
    {\partname~\Roman{part}}{2ex}{\Huge}

\begin{document}

\part{Blah}

\end{document}

enter image description here

Related Question