TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a document where I would like to "promote" all sections to chapters, all subsections to sections, etc. That should affect not only the table of contents, but the documents as a whole.

For example:

\section{Title A}
\subsection{Title B}
\subsubsection{Title C}

Should actually be treated as if the document was like this:

\chapter{Title A}
\section{Title B}
\subsection{Title C}

I searched in this website how to do it, but most of the answers seem to focus on the table of contents. I tried to do it myself by adding the following to my document:


However what I get with that is that everything becomes a chapter, as if it is applied recursively. So the result is as if the document was like this:

\chapter{Title A}
\chapter{Title B}
\chapter{Title C}

Does anyone have an idea of how I can get what I need with minimal changes to the original tex files (possibly none, since it is a huge document with many sections)?

Thank you!

share|improve this question
First thing coming into my mind is a global search and replace. You could also have a look at package coseoul – Johannes_B Feb 19 '14 at 13:26
\subsection is redefined to \section, but all \sections are also redefined to \chapter. That is why you experience the behaviour. – Johannes_B Feb 19 '14 at 13:32
Yep, that's why I tried to put the \renewcommands in that specific order, hoping that all sections would be changed to chapters in the first sweep, than all subsections to sections, etc without overlap. But thanks. – PadawanLondon Feb 19 '14 at 16:21
up vote 9 down vote accepted

One option:




\section{Test section to chapter}
\subsection{Test subsection to section}
\subsubsection{Test subsubsection to subsection}
\paragraph{Test paragraph to subsubsection}
\subparagraph{Test subparagraph to paragraph}


An image of the document with the \let lines commented out:

enter image description here

An image of the same document with the \let lines active:

The ToC:

enter image description here

and the first page of the body:

enter image description here

share|improve this answer
Wow, works like a charm! Thanks a lot! – PadawanLondon Feb 19 '14 at 16:17
There is a problem with \thebibliography. It uses a macro for top-level section which may be redefined by this approach. For example if the core text uses \chapter and \section and I change documentclass to article and redefine \chapter to \section and \section to \subsection then \thebibliography uses \chapter which is now redefined to \section. – user87690 Jul 7 '14 at 12:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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