# Enumeration of items in table of contents

I want to enumerate the manually added items in the table of contents. Also the items are not a section or a subsection or a chapter, they are like definition or a example which I added in the toc and want them to enumerated. For manual addition, I followed the answer. But the problem is that the items are not enumerated.

Is it possible to enumerate without adding them as a section or chapter or like that in the document ? Thank you.

Edit This is the MWE, I am using :

\documentclass{book}
\newtheorem{defn}{Definition}
\newtheorem{Example}{Example}
\begin{document}
\tableofcontents
\chapter{}
\section{section 1}
\Example this is the example.
\addcontentsline{toc}{chapter}{Example}
\chapter{}
\section{section 1}
\defn this is a definition.
\addcontentsline{toc}{chapter}{Definition}
\section{section 2}
\Example this is another example.
\addcontentsline{toc}{section}{Example}
\end{document}


This is the output

I want the Example in the toc to be enumerated and the Example under 2nd chapter and 2nd section to be the same. Also for the Definition.

• Please provide an MWE so that people don't have to try to guess what you've got. Right now, nobody can really usefully answer, except to say that usually, you would use one or more series of things with counters. That's still true if you're rolling your own. – cfr Jul 8 '18 at 21:50
• The nest levels below subsection are subsubsection, paragraph and subparagraph, although to display them you will need to use, for example, \setcounter{tocdepth}{3}. You can create fake subsubsections etc. using \addcontenetsline. – John Kormylo Jul 9 '18 at 0:49
• So if I just want to mention the page number where the definition of say, ABC is given, I can't do it ? @JohnKormylo – hiren_garai Jul 9 '18 at 0:53
• It would be a lot easier to work within the TOC framework, namely using \addcontentsline or \addtocontents. See tex.stackexchange.com/questions/191182/… for example. – John Kormylo Jul 9 '18 at 13:47