I added a new subsubparagraph section level using the titlesec package, with help from How to add an extra level of sections with headings below \subsubsection and https://tex.stackexchange.com/a/94404/98753.
The in-text titles are fine but the new label is added to the TOC with a page number. I can remove it by adding an asterisk to the call: \subsubparagraph*{New label}
. But is there a way to build this into the titleformat instead?
A MWE:
\documentclass{article}
\usepackage[raggedright]{titlesec}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\titleformat{\paragraph}[hang]
{\bfseries\small}{\theparagraph}{1em}{}
\titlespacing*{\paragraph}{0pt}{3.25ex plus 1ex minus .2ex}{0em}
\titleformat{\subparagraph}[hang]
{\bfseries\small}{\thesubparagraph}{1em}{}
\titlespacing{\subparagraph}{32pt}{0.5em}{0em}
\titleclass{\subsubparagraph}{straight}[\subparagraph]
\newcounter{subsubparagraph}
\renewcommand{\thesubsubparagraph}{\arabic{subsubparagraph}}
\titleformat{\subsubparagraph}[runin]
{\normalfont\normalsize\bfseries}{\thesubsubparagraph}{1em}{}
\titlespacing*{\subsubparagraph}{32pt}{3.25ex plus 1ex minus .2ex}{1em}
\begin{document}
\tableofcontents
\section{Section}
\subsection{Subsection}
\subsubsection{Subsubsection}
\paragraph{Paragraph}
\subparagraph{Subparagraph 1}
\subparagraph{Subparagraph 2}
\subsubparagraph{New label}
Finally, some ordinary text. I don't want a whole Lorem ipsum paragraph, so I'll just manually add a couple of lines.
\subsubsection{Subsubsection 2}
\end{document}