# minitoc does not work with \RedeclareSectionCommand{chapter} in KOMA-Script

Up to now I always found a solution on this site, but today is the day to ask a question that has not been discussed afaik:

I am changing from book document class to scrbook, trying to solve an issue with minitoc:

This MWE works just fine:

\documentclass{scrbook}
\usepackage[ngerman]{babel}
\usepackage{lipsum}
\usepackage{minitoc}

\begin{document}
\dominitoc[n]
\tableofcontents

\chapter{Chapter 1}
\minitoc

\section{Section 1}
\lipsum[1-5]
\section{Section 2}
\lipsum[1-5]

\end{document}


Output:

Now I want to shift the chapter line upwards with

\RedeclareSectionCommand[%
beforeskip=0pt,
afterskip=.5\baselineskip]{chapter}


Adding this to the MWE will cause the minitoc not to be printed:

\documentclass{scrbook}
\usepackage[ngerman]{babel}
\usepackage{lipsum}
\usepackage{minitoc}

\RedeclareSectionCommand[%
beforeskip=0pt,
afterskip=.5\baselineskip]{chapter}

\begin{document}
\dominitoc[n]
\tableofcontents

\chapter{Chapter 1}
\minitoc

\section{Section 1}
\lipsum[1-5]
\section{Section 2}
\lipsum[1-5]

\end{document}


Output: By the way, the chapter title is shifted up as desired.

Any ideas how to solve this problem?

Best regards, Daniel

Use \RedeclareSectionCommand{chapter} before loading minitoc:

Code:

\documentclass{scrbook}
\usepackage[ngerman]{babel}
\usepackage{lipsum}

\RedeclareSectionCommand[%
beforeskip=0pt,
afterskip=.5\baselineskip]{chapter}

\usepackage{minitoc}

\begin{document}
\dominitoc[n]
\tableofcontents

\chapter{Chapter 1}
\minitoc
\section{Section 1}
\lipsum[1-5]
\section{Section 2}
\lipsum[1-5]
\end{document}