1

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[headsepline,automark]{scrlayer-scrpage}
\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: working MWE 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[headsepline,automark]{scrlayer-scrpage}
\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: no minitoc created By the way, the chapter title is shifted up as desired.

Any ideas how to solve this problem?

Best regards, Daniel

2

Use \RedeclareSectionCommand{chapter} before loading minitoc:

enter image description here

Code:

\documentclass{scrbook}
\usepackage[headsepline,automark]{scrlayer-scrpage}
\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}

Your Answer

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

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