0

I am using scrbook and using \begin{titlepage} and \end{titlepage} to make the title of the book. After that, added \clearpage before making \tableofcontents so that toc do not show on the second page, but on the third page.

This works with no problem, except when adding the package tocloft which I need to make local table of contents.

Is this a known issue? How to make \clearpage not be ignored and still use this package? Here is a MWE

\documentclass[11pt]{scrbook}%    
\usepackage{tocloft}    
\begin{document}

\frontmatter
  \begin{titlepage}
     \begin{center}
        \textbf{My book title here}
     \end{center}
   \end{titlepage}

\clearpage %add another \clearpage after this also have no effect

\setcounter{tocdepth}{1} % for main TOC, only show chapter/section
\tableofcontents    
\mainmatter    
\chapter{Introduction}
\section{first section}    
\end{document}

Compiled using lualatex foo.tex gives

Mathematica graphics

commenting out the \usepackage{tocloft} now a blank page shows between the title and table of contents as expected.

Mathematica graphics

TL 2019 on Linux

1

Environment titlepage adds a \clearpage at its end. So an additional explicit \clearpage does not add an additional empty page - neither with nor without package tocloft. But without page tocloft the TOC is added as chapter and uses a \cleardoubleoddpage before its start. Therefore you get an empty page between the title page an the TOC, if you remove package tocloft.

Disclaimer: The usage of tocloft together with a KOMA-Script class is not recommended.

But if you really want/need to use package tocloft, you can add titles to the package options of tocloft:

\documentclass[11pt]{scrbook}
\usepackage[titles]{tocloft}% <- changed
\begin{document}

\frontmatter
  \begin{titlepage}
     \begin{center}
        \textbf{My book title here}
     \end{center}
   \end{titlepage}

\setcounter{tocdepth}{1} % for main TOC, only show chapter/section
\tableofcontents    
\mainmatter    
\chapter{Introduction}
\section{first section}    
\end{document}

Or you can use \cleardoublepage or \cleardoubleoddpage before the TOC:

\documentclass[11pt]{scrbook}
\usepackage{tocloft}
\begin{document}

\frontmatter
  \begin{titlepage}
     \begin{center}
        \textbf{My book title here}
     \end{center}
   \end{titlepage}

\cleardoubleoddpage% <- changed
\setcounter{tocdepth}{1}
\tableofcontents    
\mainmatter    
\chapter{Introduction}
\section{first section}    
\end{document}

You could add some invisible content to the page between title page and TOC. Then it is possible to use \clearpage:

\documentclass[11pt]{scrbook}
\usepackage{tocloft}
\begin{document}

\frontmatter
  \begin{titlepage}
     \begin{center}
        \textbf{My book title here}
     \end{center}
   \end{titlepage}

\mbox{}\thispagestyle{empty}\clearpage% <- changed
\setcounter{tocdepth}{1}
\tableofcontents    
\mainmatter    
\chapter{Introduction}
\section{first section}    
\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.