To add a sub-sub-sub-section (aka a paragraph), I followed the instructions here:
Now, this works great, however, I noticed that the paragraph will not show in the TOC. How can I add it to the TOC?
To complicate things further, even though I do not want the paragraph to be numbered, and so, I write \paragprah*{}, I still want it to show in the table of content. To do that, I tried to follow:
Is there a way I can have a paragraph that is unnumbered + still shows in the TOC?
Here is the code I have, which is a combination of the two links above:
\documentclass[a4,12pt]{article}
\setcounter{secnumdepth}{4}
\usepackage{titlesec}
\titleformat{\paragraph}
{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titlespacing*{\paragraph}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\begin{document}
\tableofcontents
\newpage
\section{Section}
\subsection{Sub section}
\subsubsection{Sub sub section}
\paragraph{Sub sub sub section}
\end{document}


\setcounter{tocdepth}{4}and this? – steve Apr 21 '20 at 10:26\renewcommand{\theparagraph}{}– steve Apr 21 '20 at 10:30\setcounter{secnumdepth}{3}plus\setcounter{tocdepth}{4}, that's probably the best fix (since\renewcommand{\theparagraph}{}might well mess with the spacing in the ToC) – steve Apr 21 '20 at 10:36