Hi.
How to remove headers for pages between chapters?
Page Layout ⇒ Remove Headers from blank Pages
- Mohsen Avaji
- Posts: 16
- Joined: Mon Aug 27, 2012 12:06 am
Remove Headers from blank Pages
Yours faithfully,
Mohsen Avaji.
Mohsen Avaji.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Remove Headers from blank Pages
Kindly prepare a self-contained and minimal example to give an adequate problem description.
Thorsten
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- Mohsen Avaji
- Posts: 16
- Joined: Mon Aug 27, 2012 12:06 am
Remove Headers from blank Pages
Following is the minimal example about removing headers for pages between chapters. Thank you for your cooperation.
Code: Select all
Code, edit and compile here:
\documentclass[12pt,a4paper]{book}\usepackage{amsmath,amssymb,amsthm}\usepackage{fancyhdr}\pagestyle{fancy}\setlength{\headheight}{16.4pt}\lhead{}\rhead{}\fancyhead[RE,LO]{\bfseries\thepage}\fancyhead[CE]{ \leftmark }\fancyhead[CO]{\rightmark}\cfoot{}\begin{document}\chapter{Integral}\begin{equation}(f*g)(t)=\int_{0}^{t}f(t)g(x-t)\ dt\end{equation}\chapter{Matrix}\begin{equation}AX=B\end{equation}\chapter{Linear Algebra}\end{document}
Yours faithfully,
Mohsen Avaji.
Mohsen Avaji.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Remove Headers from blank Pages
It needs a little modification of the
Remarks:
\cleardoublepage
command. We take its definition from the LaTeX kernel and supplement it with the command that enables the empty
page style.
Code: Select all
Code, edit and compile here:
\documentclass[12pt,a4paper]{book}\usepackage[T1]{fontenc}\usepackage{geometry}\geometry{headheight=15pt}\usepackage{fancyhdr}\fancyhf{}\fancyhead[LE,RO]{\thepage}\fancyhead[RE]{\leftmark}\fancyhead[LO]{\rightmark}\pagestyle{fancy}\usepackage{lipsum} % only for dummy text, not for use in actual document%% Patch for blank pages between chapters%% which disables the current page style\makeatletter\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else\hbox{}\thispagestyle{empty}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}\makeatother\begin{document}\chapter{Foo}\lipsum[1-3] % only for dummy text, not for use in actual document\chapter{Bar}\lipsum[4-6] % only for dummy text, not for use in actual document\chapter{Baz}\lipsum[7-9] % only for dummy text, not for use in actual document\end{document}
- Users of a class from KOMA-Script should use the built-in mechanisms as described in Section 3.13 of the user guide.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10