0

I need to change the structure of my scrbook-document. I want some sections to become chapters and the other way round. But because there are already subsections and subsubsections in the document, I don't want to do this manually. Is there an easier way?

I am using TeXstudio.

Sample:

\documentclass[a4paper, twoside, 12pt]{scrbook}
\begin{document}
\chapter{Introduction}
\subsection{Should be a chapter}
\subsubsection{Some more info}
\subsubsubection{another layer}
\subsubsection{Still stuff to say}
\end{document}

should become

\documentclass[a4paper, twoside, 12pt]{scrbook}
\begin{document}
\chapter{Introduction}
\chapter{Now is a chapter}
\subsection{Some more info}
\subsubsection{another layer}
\subsection{Still stuff to say}
\end{document}
  • It is possible to swap the definitions using, for example, \let\chapter=\section. But keeping them straight? I would rather use a "change all in selected" editor command. – John Kormylo Jan 30 at 22:10
  • That might be the best way, still takes quite some time because you need to replace every level extra but better than doing it completely manually. – Soalpa Jan 31 at 13:58

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.