0

I am writing my thesis by published works and would like to customize the table of contents and the chapters labeling and numbering. In the introduction I have sections for topics covered in 4 papers and then I would like to include these papers in order and finally write a conclusion/perspectives for future work. I also have a Foreword explaining things about my contribution on the papers with other authors and about the structure of the thesis. I might also include an Acknowledgments chapter, but I guess that shouldn't figure in the toc.

I was thinking of organizing the manuscript in the following fashion:

Foreword ................................... 1
Introduction ............................... 2
   1. Name of section 1 .................... 2
         1.1 Name of subsection 1.1 ........ 5
         1.2 Name of subsection 1.2 ........ 7
   2. Name of section 2 .................... 12
   3. Name of section 3 .................... 23
         3.1 Name of subsection 3.1 ........ 24
         3.1 Name of subsection 3.2 ........ 28
   4. Name of section 4 .................... 37
Article I: Name of first paper ............. 52
Article II: Name of second paper ........... 52
Article III: Name of third paper ........... 52
Article IV: Name of fourth paper ........... 52
Conclusion ................................. 211
References ................................. 211

I've managed to do almost this, but the sections under the Introduction are not being numbered as I wanted. My code so far is:

 \documentclass{book}
 \begin{document}
 
 \tableofcontents
 
 \chapter*{Foreword}
 \addcontentsline{toc}{chapter}{Foreword}
 
 \chapter*{Introduction}
 \addcontentsline{toc}{chapter}{Introduction}
 \setcounter{chapter}{1}
 
 \section{name}
 \subsection{name}
 \subsubsection{name}
 \subsubsection{name}
 \subsection{name}
 \section{name}
 \section{name}
 
 \chapter*{Article I \\ \ \\ Name of first paper}
 \addcontentsline{toc}{chapter}{Article I : name of first paper}
 
 \chapter*{Article II \\ \ \\ Name of second paper}
 \addcontentsline{toc}{chapter}{Article II : name of second paper}
 
 \chapter*{Conclusion}
 \addcontentsline{toc}{chapter}{Conclusion}
 
 \chapter*{References}
 \addcontentsline{toc}{chapter}{References}
 
 \end{document}

Which gives:

my code gives this

My question is, what can I do for the sections to be numbered as

 Introduction
     1. name of first section
         1.1 name of first subsection
              1.1.1 name of first subsubsection
              1.1.1 name of second subsubsection
         1.2 name of second subsection
     2. name of second section

Notice that, with my code, all subsubsection disappear from the toc, I would like them to show up as in this last exemple.

1

Try this modified version of your MWE.

% tocprob.tex  SE 582102
 \documentclass{book}
\usepackage{tocloft}
\renewcommand{\cftchapdotsep}{\cftdotsep} % dotted leaders for chapters

 \begin{document}

\renewcommand{\thesection}{\arabic{section}} % no chapter number before section number
\setcounter{tocdepth}{3} % put \subsubsection s in ToC
\setcounter{secnumdepth}{3} % number `\subsubsection s
 
 \tableofcontents
 
 \chapter*{Foreword}
 \addcontentsline{toc}{chapter}{Foreword}
 
 \chapter*{Introduction}
 \addcontentsline{toc}{chapter}{Introduction}
 \setcounter{chapter}{1}
 
 \section{name}
 \subsection{name}
 \subsubsection{name}
 \subsubsection{name}
 \subsection{name}
 \section{name}
 \section{name}
 
 \chapter*{Article I \\ \ \\ Name of first paper}
 \addcontentsline{toc}{chapter}{Article I : name of first paper}
 
 \chapter*{Article II \\ \ \\ Name of second paper}
 \addcontentsline{toc}{chapter}{Article II : name of second paper}
 
 \chapter*{Conclusion}
 \addcontentsline{toc}{chapter}{Conclusion}
 
 \chapter*{References}
 \addcontentsline{toc}{chapter}{References}
 
 \end{document}

enter image description here

5
  • Thanks a lot ! I finally had the chance to touch the tex again, and it works just fine ! Do you know a way of reducing the space between the numberings and the actual titles in the toc? – Filburt Feb 8 at 16:30
  • On more thing, if I include a section like \section{Introduction} in the chapter "Article I...", I get the numbering "4 Introduction". Is there a way to make it be "I.1 Introduction" ? Also if I put a theorem there, it will be enumerated as Theorem 4.1. Can I make it be like "Theorem I.1.1" somehow? (ps. I will hide from the toc all the sections under the chapters Article I, Article II, etc) – Filburt Feb 8 at 16:40
  • @Filburt Read the tocloft manual regarding the \cftXnumwidth set of macros for changing the space for sectional numbers in the ToC. – Peter Wilson Feb 9 at 18:28
  • @Filburt You use \chapter* which does not change the chapter number. It seems that you want unnumbered chapters but the numbering of sections etc., to be controlled by the unnumber of a chapter. I could give you one answer (there are several possible suggestions depending on exactly what you want) but please ask another question as this has nothing to do with your current question. – Peter Wilson Feb 9 at 18:35
  • that works for me! I'll do that in a few days. Thanks a lot :-) – Filburt Feb 9 at 18:58

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.