0

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}
\newenvironment{myindent}{\advance\IndentLevel by 1em}{}
\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: enter image description here

  • 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
1

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}.

| improve this answer | |
0

Try

  \setcounter{subsection}{28}

before the first \subsection{...} command. This should make your first subsection start with 29.

| improve this answer | |

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.