# How to change the numbering of the ToC?

When I type the \section command and compile the ToC, I get numbering that starts with 0.xx and the subsections start with 0.xx.yy. How can I change this so that it instead starts with a different number, as in the following image? My current preamble is as follows:

\documentclass[12pt]{report}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{float}
\usepackage{framed}
\usepackage[hang,flushmargin]{footmisc}
\usepackage{enumitem}

\newlength{\IndentLevel}
\setlength{\IndentLevel}{0pt}
\newcommand{\ibox}[1]{\item\hspace{\IndentLevel}\parbox[t]{\dimexpr\linewidth-\IndentLevel}{#1}}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}{Corollary}[theorem]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{definition}{Definition}[section]

\makeatletter
\DeclareRobustCommand{\varname}[1]{\begingroup\newmcodes@\mathit{#1}\endgroup}
\makeatother

\title{Theory of Computing}
\author{ }
\date{ }


The desired result that I would like is the following:

• What you need to do is change the section/subsection counter. See this post here for an example. – user35154 Aug 27 '18 at 15:51
• OK, I get that I need to use \setcounter{}{} but what goes in the second set of braces? That question uses a,b,c,d but how does that relate to the numbers in the ToC? – user83024 Aug 27 '18 at 17:10
• @user83024: Your image does not represent anything similar to what you're asking in the question. Can you update the question to be more specific? – Werner Oct 29 '18 at 17:56

You are using a document class - report - that defines \chapter and includes the \chapter number representation as part of the sectional unit numbering hierarchy. Either switch to a different document class that does not use \chapter, like article, or remove the \chapter representation from your counters in the following way:

\renewcommand{\thesection}{\arabic{section}}


Previously, \thesection would have included \thechapter. before \arabic{section}.

Try

  \setcounter{subsection}{28}