0

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.

jujuBee
  • 103
  • Does it meet your needs simply to remove the line \newcounter{paragraph}[subsubsubsection]? That line appears verbatim in newer versions of article.cls already (assuming you're using that). – frabjous Apr 06 '22 at 03:51
  • @frabjous "newer" here meaning any version of article.cls or article.sty since about 1983 – David Carlisle Apr 06 '22 at 08:49
  • while you can do this it seems unnecessarily complicated to insert the extra level (if you really need section 1.2.3.4.5.6 ????) article already offers up to level 5 as \subparagraph so the simplest thing is to add a new level 6 as \subsubparagraph raher than having to redefine all the levels below your inserted level 4. – David Carlisle Apr 06 '22 at 08:54
  • Thanks @frabjous and @david-carlislie for your comments. I really need section levels 1.2.3.4.5.6. Article is does provide numbering for paragraph, but it does not reset the numbering for paragraph. So I had added \newcounter{paragraph}[subsubsubsection]. With this in place the numbering works, except for the error, I have mentioned here. – jujuBee Apr 06 '22 at 17:47
  • 1
    I see. Yours has an extra sub compared 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
  • @frabjous Thanks so much! That worked! Really appreciate your input and time! – jujuBee Apr 06 '22 at 19:34

0 Answers0