By following the instructions given here and have modified them according to my need as follows:
\titleclass{\subsubsubsection}{straight}[\subsection]
\newcounter{subsubsubsection}[subsubsection]
\renewcommand\thesubsubsubsection{\thesubsubsection.\arabic{subsubsubsection}}
\newcounter{paragraph}[subsubsubsection]
\renewcommand\theparagraph{\thesubsubsubsection.\arabic{paragraph}} % optional; useful if paragraphs are to be numbered
\renewcommand\thesubparagraph{\theparagraph.\arabic{subparagraph}}
\titleformat{\subsubsubsection}
{\normalfont\normalsize\bfseries}{\thesubsubsubsection}{1em}{}
\titlespacing*{\subsubsubsection}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\makeatletter
\renewcommand\paragraph{@startsection{paragraph}{5}{\z@}%
{3.25ex @plus1ex @minus.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{@startsection{subparagraph}{6}{\parindent}%
{3.25ex @plus1ex @minus .2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\def\toclevel@subsubsubsection{4}
\def\toclevel@paragraph{5}
\def\toclevel@paragraph{6}
\def\l@subsubsubsection{@dottedtocline{4}{7em}{4em}}
\def\l@paragraph{@dottedtocline{5}{10em}{5em}}
\def\l@subparagraph{@dottedtocline{6}{14em}{6em}}
\makeatother
\setcounter{secnumdepth}{7}
\setcounter{tocdepth}{4}
However this gives an error as follows:
! LaTeX Error: Command \c@paragraph already defined.
Or name \end... illegal, see p.192 of the manual.
How do I make this work, with newcounter for paragraph as defined in above here.
This question might be a duplicate, if that is the case, then kindly point me to a resource.
\newcounter{paragraph}[subsubsubsection]? That line appears verbatim in newer versions ofarticle.clsalready (assuming you're using that). – frabjous Apr 06 '22 at 03:51\subparagraphso the simplest thing is to add a new level 6 as\subsubparagraphraher than having to redefine all the levels below your inserted level 4. – David Carlisle Apr 06 '22 at 08:54\newcounter{paragraph}[subsubsubsection]. With this in place the numbering works, except for the error, I have mentioned here. – jujuBee Apr 06 '22 at 17:47subcompared to the line in document class. Try\counterwithin{paragraph}{subsubsubsection}instead of the line that's causing you trouble. – frabjous Apr 06 '22 at 18:19