The sample code at the bottom of this post results in the following page order:

1. title page
5. chapter

I'm really scratching my head about why the blank page (4) shows up. As best I can tell, it seems to be related to a \vspace*{\fill} command I placed on page (2). But this is confusing to me. Doesn't that come before the table of contents?

I want to keep the \vspace*{\fill} because (in the actual book I'm typesetting) I'm using it to vertically center the content on the metadata page.

What's going on?

\documentclass[12pt, oneside]{book}

%%%%%%%%
\usepackage{fancyhdr}
\pagestyle{fancy}

\fancyfoot[C]{}

\renewcommand{\footrulewidth}{0pt}

\title{Sample title}
\author{Sample author}
\date{Sample date}

\begin{document}
\frontmatter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title page.

\begin{titlepage}

Sample title page.

\end{titlepage}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\thispagestyle{empty}

\topskip0pt
\vspace*{\fill}

\vspace*{\fill}

{
\setcounter{tocdepth}{0}
\tableofcontents
}

\mainmatter

\chapter{Sample chapter title}

Sample chapter text.

\end{document}

• Why do you have (or need) \topskip0pt? Remove that and things turn back to normal... Jan 6 at 1:17
• It's a workaround for this issue: tex.stackexchange.com/a/7290/11376 Jan 6 at 4:58
• I.e. as far as I know you can't have true vertical centering without this. (If there's a better way to do that, I'm all ears.) Jan 6 at 4:59
• You can use absolute positioning with eso-pic. It depends on what your metadata page looks like. Jan 6 at 5:19
• There are many ways to perform vertical centering. The easiest is \parbox[c][\textheight][c]{...} \topskip isn't used since the height of the \parbox is larger. Jan 6 at 14:19

It seems that the \mainmatter command moves to the next odd page when you are using the oneside class option.

Try this modified version of your MWE, for which thank you.

% chapterprob.tex  SE 577746

\documentclass[12pt, oneside]{book}
%\documentclass[12pt]{book}

%%%%%%%%
\usepackage{fancyhdr}
\pagestyle{fancy}

\fancyfoot[C]{}

\renewcommand{\footrulewidth}{0pt}

\title{Sample title}
\author{Sample author}
\date{Sample date}

\begin{document}
%\frontmatter
\pagenumbering{roman}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title page.

\begin{titlepage}

Sample title page.

\end{titlepage}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\thispagestyle{empty}

\topskip0pt
\vspace*{\fill}

\vspace*{\fill}

{
\setcounter{tocdepth}{0}
\tableofcontents
}

%\mainmatter
%\pagenumbering{arabic}

\chapter{Sample chapter title}
\pagenumbering{arabic}

Sample chapter text.

\end{document}


Note that instead of \frontmatter and \mainmatter I have used \pagenumbering to change the representation of the page numbers (which is one of the things that the \...matter macros do).

• \mainmatter does contain a \cleardoublepage, so this is one way to work around it. Per the other comments though this seems to be a bad interaction with setting \topskip without using braces to properly scope it. (I still don't understand why, but it seems like the best explanation at this point.) Jan 7 at 0:12