0

My table of contents is two-sided but I don't want to have a letterhead on the second side. I don't know why but \pagestyle{empty} doesn't do the job in my case.

Screenshot

enter image description here

MWE

\documentclass{scrbook}

\usepackage{scrlayer-scrpage}

\usepackage{blindtext}

\begin{document}

\pagestyle{empty} % doesn't work

\tableofcontents

\pagestyle{scrheadings}
\clearpairofpagestyles
\automark[chapter]{chapter} 
\lehead{\pagemark} 
\cehead{\headmark} 
\cohead{\headmark} 
\rohead{\pagemark} 

\chapter{bla}
\blindtext[10]
\section{bla}
\section{bla}
\section{bla}
\section{bla}
\section{bla}

\chapter{bla}

\section{bla}
\section{bla}
\section{bla}
\section{bla}
\section{bla}

\chapter{bla}

\section{bla}
\section{bla}
\section{bla}
\section{bla}
\section{bla}

\chapter{bla}

\section{bla}
\section{bla}
\section{bla}
\section{bla}
\section{bla}

\chapter{bla}

\section{bla}
\section{bla}
\section{bla}
\section{bla}
\section{bla}
\chapter{bla}

\chapter{bla}

\section{bla}
\section{bla}
\section{bla}
\section{bla}
\section{bla}
\chapter{bla}

\chapter{bla}

\section{bla}
\section{bla}
\section{bla}
\section{bla}
\section{bla}

\end{document}

Additional Information

If \pagestyle{scrheadings} is deactivated \pagestyle{empty} produces the desired result.

2
  • So you want to change the toc pagestyle?
    – TeXnician
    Commented Feb 4, 2018 at 14:40
  • Well, yes. I don't want to have the page number and the toc title on the second page. Commented Feb 4, 2018 at 14:42

2 Answers 2

1

I would use

\documentclass{scrbook}

\usepackage{scrlayer-scrpage}
\automark[chapter]{chapter}
\clearmainofpairofpagestyles% or \clearpairofpagestyles?
\ohead{\pagemark}
\chead{\headmark}

\BeforeStartingTOC[toc]{\pagestyle{empty}}
\AfterStartingTOC{\thispagestyle{empty}}% settings for the last page of TOC, LOF, LOT etc.

\usepackage{blindtext}

\begin{document}
\tableofcontents
\Blinddocument\Blinddocument\Blinddocument
\Blinddocument\Blinddocument\Blinddocument
\Blinddocument\Blinddocument\Blinddocument
\Blinddocument\Blinddocument\Blinddocument
\end{document}

Note that there is a page number in the footer of the chapter pages including the first page of the TOC. If you want to remove this page number too, you can use either \clearpairofpagestyles instead \clearmainofpairofpagestyles or you can redefine \chapterpagestyle to empty. By default \chapterpagestyle is plain.

\BeforeStartingTOC{\pagestyle{empty}}
\AfterStartingTOC{\thispagestyle{empty}}

affects LOF, LOT and other lists controlled by package tocbasic, too. If you want to restrict the changes to TOC use

\BeforeStartingTOC[toc]{\pagestyle{empty}}
\AfterStartingTOC[toc]{\thispagestyle{empty}}
1
\documentclass{scrbook}

\usepackage{scrlayer-scrpage}

\clearpairofpagestyles
\automark[chapter]{chapter} 
\lehead{\pagemark} 
\cehead{\headmark} 
\cohead{\headmark} 
\rohead{\pagemark} 
\usepackage{blindtext}

\begin{document}

\pagestyle{empty} % doesn't work

\tableofcontents


\chapter{bla}
\pagestyle{scrheadings}
\blindtext[10]
\section{bla}
\section{bla}
\section{bla}
\section{bla}
\section{bla}

\chapter{bla}

\section{bla}
\section{bla}
\section{bla}
\section{bla}
\section{bla}

\chapter{bla}

\section{bla}
\section{bla}
\section{bla}
\section{bla}
\section{bla}

\chapter{bla}

\section{bla}
\section{bla}
\section{bla}
\section{bla}
\section{bla}

\chapter{bla}

\section{bla}
\section{bla}
\section{bla}
\section{bla}
\section{bla}
\chapter{bla}

\chapter{bla}

\section{bla}
\section{bla}
\section{bla}
\section{bla}
\section{bla}
\chapter{bla}

\chapter{bla}

\section{bla}
\section{bla}
\section{bla}
\section{bla}
\section{bla}

\end{document}

Alternatively, just remove \pagestyle{scrheadings} where you have it (last page of toc). It is pointless anyway.

You must log in to answer this question.

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