0

I'd like to set up the structure of my report as follows.

Different chapters should have a nice big heading, like the one of the Chapter environment, and should be separated in the table of contents as well. Each chapter can then contain some sections and subsections.

My only problem with this environment is the numbering: numbering of sections should proceed unaltered by the fact that we are passing from one chapter to another. In other words there should be no counter for chapters in the total numbering.

How it is:

\documentclass[11pt]{report}
\usepackage{geometry}                 
\geometry{letterpaper}                  
\usepackage[all]{xy}
\usepackage{mdframed}
\usepackage{amsthm}
\usepackage{makeidx}

\numberwithin{equation}{section}
\makeindex

\begin{document}
\maketitle

\chapter{First chapter}
\section{Section1}
\section{section2}

\chapter{Second chapter}
\section{section3}
\section{section4}

\end{document}

Basically I'd like the discrete numbering features of the part environment, but the graphical layout of the chapter env.

1
  • Do you just want \chapter*{Chapter title}? That will not number the chapters at all. You can then add them to the table of contents manually. But I'm not very clear whether you want this or want numbered chapters but without resetting the section counters? By the way, your code does not compile without errors here.
    – cfr
    Apr 6 '14 at 22:04
2

In answering, I've removed commands which caused errors and packages which were extraneous to the issue.

If you just don't want the chapters numbered at all, but you do want them to show up in the contents, something like this might be suitable:

\documentclass[11pt]{report}
\usepackage{geometry}
\geometry{letterpaper}
\usepackage{remreset}

\makeatletter
  \renewcommand \thesection {\@arabic\c@section}
  \@removefromreset{section}{chapter}
\makeatother

\begin{document}

\tableofcontents

\chapter*{First chapter}
\addcontentsline{toc}{chapter}{First chapter}
\section{Section1}
\section{section2}

\chapter*{Second chapter}
\addcontentsline{toc}{chapter}{Second chapter}
\section{section3}
\section{section4}

\end{document}

Unnumbered chapters

Chapters without numbers

If you want the chapters numbered, this might work:

\documentclass[11pt]{report}
\usepackage{geometry}
\geometry{letterpaper}
\usepackage{remreset}

\makeatletter
  \renewcommand \thesection {\@arabic\c@section}
  \@removefromreset{section}{chapter}
\makeatother

\begin{document}

\tableofcontents

\chapter{First chapter}
\section{Section1}
\section{section2}

\chapter{Second chapter}
\section{section3}
\section{section4}

\end{document}

Numbered chapters

Chapters with numbers

6
  • That is perfect.
    – Brightsun
    Apr 7 '14 at 6:36
  • 1
    @Brightsun In that case, upvote and accept it. :-)
    – lockstep
    Apr 7 '14 at 8:47
  • It appears the page ha not registered my upvote earlier, my bad I didn't check.
    – Brightsun
    Apr 7 '14 at 15:05
  • @Brightsun Glad it helped. Just out of interest, which solution did you need?
    – cfr
    Apr 7 '14 at 16:22
  • @cfr The first one, even though I have to admit that I don't quite understand what's happening in your solution. I mean, what is the "makeatletter" stuff? Where do I learn how to use those commands and so forth?
    – Brightsun
    Apr 7 '14 at 18:05

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.