1

The following example creates 5 pages. Page 1 contains the \part, page 3 only shows the \part's \label, and page 5 shows the \chapter. If I do not load showkeys then naturally, only 3 pages are created, the first for \part and the third for \chapter.

\documentclass{scrbook}
\usepackage{showkeys}

\begin{document}
\part{First part}\label{part1}
\chapter{Chapter one}\label{chap1}
\end{document}

Is there an easy way to force the label shown for \part onto the same page as the \part itself so that no extra two pages are added?

1 Answer 1

1

enter image description here

Place the \label in the argument (which is safer for many things, not just showkeys)

\documentclass{scrbook}
\usepackage{showkeys}

\begin{document}
\part{First part\label{part1}}
\chapter{Chapter one\label{chap1}}
\end{document}
1
  • Wow, that's the first time in >10 years of using LaTeX that I heard that one can do it… Thanks for the rapid and helpful answer!
    – Artemis
    Jun 11, 2023 at 8:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .