1

I wrote a document which has now around 120 pages. As I'm new to Latex, I started writing the document without using the sectioning \part (as I didn't know it existed). So the higher hierarchical sectioning of the document is chapter instead of \part. Is there an easy way (in Texstudio for example) to systematically convert all sectioning of a document (or part of it) to the corresponding hierarchically higher one according to the following scheme:

\chapter{} ==> \part{}
\section{} ==> \chapter{} 
\subsection{} ==> \section{}
\subsubsection{} ==> \subsection{}
\paragraph{} ==> \subsubsection{}
\subparagraph{} ==> \paragraph{}
  • 1
    You could use the replace function (accessible via the shortcut CTrl+R) and replace \chapter{by \part{ and \section{ by \chapter{... – leandriis Jan 2 at 15:11
  • indeed. That was easy... many thanks @leandriis – ecjb Jan 2 at 15:16
  • 1
    Or easier still if you shift stuff around regularly is to right click on heading in structure pane and say indent (or unindent) and the underlying heading levels should follow. – Aubrey Blumsohn Jan 2 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.