# Numbering sections independent of chapters numbering [duplicate]

Is it a way to create a document in such a way that the numbering of the sections is independent of that of the chapters?

e.g.:

Chapter 1
section 1
section 2
Chapter 2
section 3
section 4
section 5
Chapter 3
section 6
section 7


## marked as duplicate by lockstep, Mico, Werner, user13907, barbara beetonOct 19 '14 at 17:34

• Yes, of course, this is possible. \usepackage{remreset} \makeatletter \@removefromreset{section}{chapter} \makeatother will prevent the automatic resetting of section counters if the chapter number is increased. – user31729 Oct 19 '14 at 17:00
• Add the following to your preamble: \usepackage{chngcntr}\counterwithout{section}{chapter}. – lockstep Oct 19 '14 at 17:01
• @ChristianHupfer With remreset, sections will still feature the chapter prefix. – lockstep Oct 19 '14 at 17:04
• @lockstep: I know, therefore I have changed the counter formatting additionally in my answer. – user31729 Oct 19 '14 at 17:04

\documentclass{book}

\usepackage{remreset}

\makeatletter
\@removefromreset{section}{chapter}
\makeatother

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

\begin{document}
\tableofcontents
\chapter{First}
\section{First}
\section{Second}
\section{Third}
\chapter{Second}
\section{Fourth}
\section{Fifth}
\section{Sixth}

\end{document}


• @Name: You could use of course also lockstep's proposition – user31729 Oct 19 '14 at 17:15