# How do you modify LaTeX's sectioning hierarchy?

I am trying to create a new command, so I could use a new hierarchy level in a book document class.

# Part I

2.1 Section 1

2.1.1 Subsection

## Theme II

### 1. Chapter 1### and so on.

I guess I have to use \newcommand, but I don't know how to modify the hierarchy number to include "Theme" between "Part" and "Chapter". If you know a document class with a more complete hierachy than books and implementing a similar hierarchy, it will solve my problem as well.

-
Have a look into this question: Defining custom sectioning commands, this looks like similar to what you want. –  m0nhawk Feb 9 '13 at 15:04
Are you sure you want to cross reference your chapters like "in chapter 2 of theme 1 in part 3"? –  egreg Feb 9 '13 at 15:20
As @egreg points out, even when you use part division, the chapter counter is not reset with each part, to make the document easily searchable. This is a generally recommended way. Of course this is the case when chapters are usually more than ~10 pages long. If they are not, consider stepping one level down, i.e., changing section->subsection and chapter->section, and then just rename "Chapter" to "Theme". –  tohecz Feb 9 '13 at 19:28
What is your definition of a "Theme"? –  Yiannis Lazarides Feb 9 '13 at 19:56
The memoir class has a \book division over \part. –  egreg Feb 9 '13 at 20:15

You can do it with the memoir class, that features a document subdivision above "part":

\documentclass{memoir}
\renewcommand{\bookname}{Part}
\renewcommand{\partname}{Theme}
\setlength{\cftpartnumwidth}{2em} % set the width of numbers

\begin{document}
\frontmatter
\tableofcontents*

\mainmatter
\book{Part 1}
\part{Theme 1}
\chapter{Chapter 1}
\chapter{Chapter 2}
\section{Section 1}
\subsection{Subsection}

\part{Theme 2}

\chapter{Chapter 3}
\chapter{Chapter 4}

\book{Part 2}
\part{Theme 1}
\chapter{Chapter 5}
\chapter{Chapter 6}
\section{Section 1}
\subsection{Subsection}

\part{Theme 2}

\chapter{Chapter 7}
\chapter{Chapter 8}
\end{document}


The class has powerful customization commands.

I would avoid restarting the numbering of chapters for each "part" or "theme": cross references would be very cumbersome. Something like

as we saw in Chapter 3 of Theme I in Part II

is really heavy.

-