2

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 beeton Oct 19 '14 at 17:34

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 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
  • 1
    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
3
\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}

enter image description here

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.