[Tex/LaTex] use Minitoc with KOMA-Script (scrbook)

etocincompatibilitykoma-scriptminitocpackages

I'm using the KOMAscript scrbook class together with the minitoc package. When I compile, I get the message

Usage of package minitoc together (scrbook) with a KOMA-Script class
is not recommended.

Is there a replacement to minitoc? Or does it simply mean I must rather stick with the book class? Can I get the same appearance using another KOMA friendly package?

enter image description here

Best Answer

Seems easier than I thought:

\documentclass{scrbook}

\usepackage{etoc, blindtext}
\newcommand{\chaptertoc}[1][Chaptertoc]{%
  \etocsettocstyle{\addsec*{#1}}{}%
  \localtableofcontents%
}


\begin{document}
\chapter{First Chapter}
\label{CLA:first-chapter}

\chaptertoc{}
\bigskip{}
\blindtext

\section{First section in first chapter}
\label{CLA:first-section-first}
\blindtext

\section{Second section in first chapter}
\label{CLA:second-section-first}
And this section even has subsections:
\blindtext{}

\subsection{First subsec in second sec of first chapter}
\label{CLA:first-subsec-second}
\blindtext{}

\subsection{You know how to proceed}
\label{CLA:you-know-how}
\blindtext{}

\end{document}

First I tried to find out how to do that without the etoc package, because the tocbasic package, which is part of the KOMAscript bundle, surely provides the machinery. However, with etoc it seems fairly easy.

chaptertoc picture