1

I was doing \paragraph to include a third subsection but my third subsection came out not numbered at all. I got help from someone suggesting me to use setcounter (see my related question: Is there a \subsubsubsection command? ). The problem is that my thesis failed to compile! I deleted the command, and my file still not working! I used:

\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}

what could be happening??

  • 1
    I highly doubt that \setcounter{} has eaten, smashed, blown up, or otherwise d[e]stroyed your thesis. Try deleting the *.aux file and see if the problem is resolved. If not, post a minimal example and someone will surely be able to help. – Paul Gessler Jul 3 '14 at 18:35
  • 1
    Analyze your error message (location, ...). Probably one or more of your \paragraph titles contain fragile stuff that breaks during the move to the table of contents. Use \protect to protect fragile commands in \paragraph. – Heiko Oberdiek Jul 3 '14 at 18:37
  • I am sorry, I am still learning latex but at the same time I have a deadline so I had better not fell in so many errors. – Naema Jul 3 '14 at 18:38
  • oh, I finally figured it out. When I deleted the setcounter commands I used in my main thesis file, I did leave a space (an empty line) which was causing the problem. Now , I deleted the line and everything is working fine except that I am still not able to do subsubsubsection{} using \paragraph; \paragraph did not do any numbers , it showed a title but without any numbers. – Naema Jul 3 '14 at 18:45
  • \setlength{\itemsep}{-\parsep}}}% {\end{list}} (I inserted the setcounter commands right in the middle between \setlength and \end{list} and when I deleted the commands, I left an empty line which caused the compilation problem). – Naema Jul 3 '14 at 18:49
2

sections are numbered up to secnumdepth which is 3 in article and \paragraph is level 4 heading so to have numbered paragraphs use \setcounter{secnumdepth}{4}

  • I did it but I had the following error:\begin{document} ended by \end{list} – Naema Jul 3 '14 at 22:36
  • here I inserted it just before ending the list {\begin{list}{}% {\renewcommand{\makelabel}[1]{\hfill\textnormal{##1 =}}% \settowidth{\labelwidth}{\textnormal{#1 =}}% \setlength{\leftmargin}{\labelwidth}% \addtolength{\leftmargin}{\labelsep}% \setlength{\itemsep}{-\parsep}}}% \setcounter{secnumdepth}{4} {\end{list}} – Naema Jul 3 '14 at 22:38
  • @Naema It makes no sense to change the settings there, they should be in the document preamble – David Carlisle Jul 3 '14 at 22:39
  • 1
    @Naema you need to post the error but also every question should have a complete small document that generates the error. Start from a copy of the document and delete everything you can delete while still having the error, your example code in teh question should have everything from \documentclass to \end{document} – David Carlisle Jul 3 '14 at 22:40
  • IT worked but gave me 2.1.2.0.1 (I should not have the zero in there), how to remove it?. I used /setcounter{secnumdepth}{4} and used \paragraph – Naema Jul 4 '14 at 16:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.