我的目录是双面的,但我不想在第二面上放信头。我不知道为什么,但\pagestyle{empty}
对我来说这行不通。
截屏
平均能量损失
\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}
附加信息
如果\pagestyle{scrheadings}
停用\pagestyle{empty}
则会产生所需的结果。
答案1
我会用
\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}
请注意,章节页脚(包括目录第一页)中有一个页码。如果您还想删除此页码,可以使用 或重新定义\clearpairofpagestyles
为。默认情况下为。\clearmainofpairofpagestyles
\chapterpagestyle
empty
\chapterpagestyle
plain
\BeforeStartingTOC{\pagestyle{empty}}
\AfterStartingTOC{\thispagestyle{empty}}
也会影响 LOF、LOT 和其他由 包控制的列表tocbasic
。如果要限制对 TOC 的更改,请使用
\BeforeStartingTOC[toc]{\pagestyle{empty}}
\AfterStartingTOC[toc]{\thispagestyle{empty}}
答案2
\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}
或者,直接删除\pagestyle{scrheadings}
原来的位置(目录的最后一页)。无论如何,这毫无意义。