2

I have to reset a book (original on paper only) of peculiar structure: it consists of more or less conventional parts and chapters, but sections (the lowest level division, and the only one explicitly numbered) are numbered in unbroken sequence throughout the book.

It looks like I'll have to do all the numbering (and the ToC) manually, as the idea runs counter to the LaTeX philosophy, unless I am unaware of some finer points.

Is there any hope of doing it the LaTeX/memoir way?

The required structure looks like this (I can't exactly wrap my head around it):

Foreword
Preface

Block 1
    Introduction
            Unit 1
            Unit 2
            Unit 3
    Theme 1
            Unit 4
            ...
            Unit 10
    Theme 2
            Unit 11
            ...
            Unit 18
    Theme 3
            Unit 19
            ...
            Unit 36
    Theme 4
        I Alfa
            Unit 37
            ...
            Unit 44
        II Bravo
            Unit 45
            ..
            Unit 49
        III Charlie
            Unit 50
            ...
            Unit 55
Block 2
    Theme 1
        I Delta
            Unit 1
            Unit 2
        II Echo
            Unit 3
            ...
            Unit 9
        III Foxtrot
            Unit 10
            ...
            Unit 15
        IV Golf
            Unit 15
            ...
            Unit 19
    Theme 2
            Unit 20
            ...
            Unit 37
    Theme 3
            Unit 38
            ...
            Unit 42
    Theme 4
            Unit 43
            ...
            Unit 54
Glossary

Everything should be in the ToC, of course. Is it still possible?

  • \usepackage{chngcntr} and \counterwithout{section}{chapter}. This will remove the resetting of the section counter by every new chapter. – user31729 Mar 11 '17 at 16:53
5

If you are using the memoir class simply put \counterwithout{section}{chapter} in your preamble; there is no need to use the chngcntr package as suggested by Christian Hupfer. For other classes go with Christian Hupfer's suggestion.

  • I didn't know that memoir has a \counterwithout command – user31729 Mar 11 '17 at 19:05
  • @Christian Hupfer That's alright. I have to keep looking in the manual to see what's there. – Peter Wilson Mar 11 '17 at 19:25
  • @ChristianHupfer check who's the original author of the package and memoir. Most of Peters stuff is directly embedded into memoir. – daleif Mar 11 '17 at 21:35
  • @daleif: I know who the original author is/was ;-). I just had no idea that memoir has this feature – user31729 Mar 11 '17 at 21:38
  • 1
    @ChristianHupfer features as in useful macros that might have gotten lost in the manual – daleif Mar 11 '17 at 21:41
0

This makes the division scheme look like I want it to:

%% Ensure sequential numbering of subsubsections.
\setsecnumdepth{subsubsection}
\counterwithout{subsubsection}{subsection}
\renewcommand{\thechapter}{\arabic{chapter}}
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesubsection}{\Roman{subsection}}
\renewcommand{\thesubsubsection}{\arabic{subsubsection}}

\setcounter{tocdepth}{3} % Must not precede the above

To put the starred versions of chapters/sections into the ToC:

    \section*{A Brief Course}
    \label{sec:brief}
    \addcontentsline{toc}{section}{\nameref{sec:brief}}

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.