# Italic style for subsection title, not for the number

I'm trying to give to the subsection title an italic style, but I don't want that this style is applied also to the subsection number. Is it possible?

I'm trying in this way:

\documentclass{book}
\usepackage{titlesec}
\titleformat*{\subsection}{\normalsize\itshape}
\begin{document}

\tableofcontents

\chapter{Test}
\section{Test2}
\subsection{Test3}

\end{document}


but what I have is this:

The unstarred version of \titleformat has more options, and can do what you want:

\titleformat{\subsection}{\normalsize\itshape}{\upshape\thetitle\quad}{}{}


Here the \upshape\thetitle\quad part changes the font back to upright for the number only.

If you define multiple section types (i.e. also subsubsection) to have italic titles, it may be easier to specify that all ((sub)sub)sections should have their numbering upright with the following:

\titlelabel{\upshape\thetitle\quad}

• You shouldn't add \quad to the second mandatory argument, but set the third argument to 1em. – Bernard May 18 '17 at 20:52
\documentclass{book}
\usepackage{titlesec}
\titleformat{\subsection}[hang]{\normalsize\itshape}{\textup{\thesubsection}}{1em}{}[]
\begin{document}

\tableofcontents

\chapter{Test}
\section{Test2}
\subsection{Test3}

\end{document}