I’m using titlesec to define a custom subsubsection heading, by adapting the answer to this question.
I would like \mysubsubheading to coexist with the existing \subsubsection, as an alternative style. But now when I use \subsubheading, the subsubsection numbering no longer appears as part of the formatting:
How do I define a new subsubsection style which doesn’t interfere with the existing one? I don’t need the two subsubsection styles to be usable within the same subsection simultaneously; rather, within a given subsection, I want to be able to choose betweeen using \subsubsection and \mysubsubsection.
\documentclass{article}
\usepackage{fontspec}
\usepackage{titlesec}
\newcounter{mysubsubsection}
\titleclass{\mysubsubsection}{straight}[\subsection]
\titleformat{\mysubsubsection}
{\normalfont\bfseries}{WP \themysubsubsection:~}{0em}{}
\titlespacing*{\mysubsubsection}{0pt}{*3.25}{*1.5}
\counterwithin{subsection}{mysubsubsection}
\renewcommand{\themysubsubsection}{\arabic{mysubsubsection}}
\begin{document}
\subsection{subsection}
\subsubsection{subsubsection}
\mysubsubsection{My subsubsection}
\end{document}



