In the memoir class, is there a way to remove the part page entirely? That is, in the text there is no indication of a new part beginning. However, the part still appears in the ToC, and things like cref
can still reference it (which should jump to the first chapter in that part).
I was not able to find a clean way to do this reading the user manual.
Right now I'm using a phantom section,
but references like \cref{sec:intro}
don't work anymore.
\documentclass[oneside]{memoir}
\usepackage{hyperref}
\usepackage{cleveref}
\begin{document}
%%% This prints a dedicated page for the part (unwanted) %%%
\part{A Real Part} \label{part:1}
\chapter{Chapter I}
\section{Test Section}
A reference to part 1 using a real part: \cref{part:1}
% this prints "part I"
%%% BAD %%%
\cleardoublepage
\phantomsection
\stepcounter{part}\label{part:2}
\addcontentsline{toc}{part}{\protect\partnumberline{\thepart}A Fake Part 2}
\chapter{Chatper II}
A reference to part 2 using stepcounter: \cref{part:2}
% this prints "section 1.1", which is wrong
%%% GOOD %%%
\cleardoublepage
\phantomsection
\refstepcounter{part}\label{part:3}
\addcontentsline{toc}{part}{\protect\partnumberline{\thepart}A Fake Part 3}
\chapter{Chatper III} \label{chapter:3}
A reference to part 3 using refstepcounter: \cref{part:3}
% this prints "part III"
A reference to chapter III: \cref{chapter:3}
% this link jumps to the same position as the previous one
\end{document}
\cref{sec:intro}
to return?\cref{sec:intro}
to print "part I", just like it would with a real\part{intro} \label{sec:intro}
. The only thing I wanted to change was to remove the extra page with part title.