0

I want my introduction to appear in the table of contents without the chapter number, but because I've used the \chapter* command to achieve this all the sections in the introduction are numbered as:

0.1 Title of Section

And I don't want the zero there (i.e. I want the first section of the introduction to be numbered 1). But for all the other chapters I do want the chapter number to be included in the section number (e.g. I want the 2nd section of chapter 1 to be numbered 1.2). Is there a way to get the section numbering of a single chapter to ignore the chapter number? Thanks!

Here's a MWE:

\documentclass[12pt, twoside]{report}

\usepackage[explicit]{titlesec} %adjust titles
\usepackage{lipsum}

\titleformat{\chapter}[display]{\LARGE\bfseries\centering}{\thechapter}{10pt}{#1}
\titleformat{\section}{\normalfont\fontsize{20}{20}\centering}{\thesection}{1em}{\MakeUppercase{#1}}
\titleformat{\subsection}{\normalfont\centering}{\thesubsection}{1em}{\textit{{#1}}}

\setcounter{tocdepth}{1} %removes subsubsections from toc

%%%%%%%%%removes dots from toc
\makeatletter 
\renewcommand{\@dotsep}{10000} 
\makeatother
%%%%%%%%%

\begin{document}

\tableofcontents

\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction}

\section{Here's a Section}

I want this section just to be numbered `1' rather than `0.1'. I would also like it to be numbered `1' instead of `0.1' in the table of contents.

\section{And Here's Another One}

This one should be numbered `2' rather than `0.2'.

\chapter{The First Chapter}

\section{Here's Another Section}

This section is numbered correctly.

\section{And Here's Another One}

And so is this one.

\end{document}
4

1 Answer 1

0

Change the section numbering style at appropriate places.

% secnumprob.tex  SE 561571
\documentclass[12pt, twoside]{report}

\usepackage[explicit]{titlesec} %adjust titles
\usepackage{lipsum}

\titleformat{\chapter}[display]{\LARGE\bfseries\centering}{\thechapter}{10pt}{#1}
\titleformat{\section}{\normalfont\fontsize{20}{20}\centering}{\thesection}{1em}{\MakeUppercase{#1}}
\titleformat{\subsection}{\normalfont\centering}{\thesubsection}{1em}{\textit{{#1}}}

\setcounter{tocdepth}{1} %removes subsubsections from toc

%%%%%%%%%removes dots from toc
\makeatletter 
\renewcommand{\@dotsep}{10000} 
\makeatother
%%%%%%%%%

\begin{document}

\tableofcontents

\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction}
\renewcommand{\thesection}{\arabic{section}}  % PW ADDED

\section{Here's a Section}

I want this section just to be numbered `1' rather than `0.1'. I would also like it to be numbered `1' instead of `0.1' in the table of contents.

\section{And Here's Another One}

This one should be numbered `2' rather than `0.2'.

\chapter{The First Chapter}
\renewcommand{\thesection}{\thechapter.\arabic{section}} % PW ADDED

\section{Here's Another Section}

This section is numbered correctly.

\section{And Here's Another One}

And so is this one.

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .