Page Layout ⇒ Headers and Footers on Float Pages
Headers and Footers on Float Pages
Thanks
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Headers and Footers on Float Pages
I don't think so.Txuko wrote:LaTeX with fancyhdr and fancy page style by default removes the headers and footers in pages with only floats (without text). […]
Code: Select all
\documentclass[11pt,a4paper,twoside,english]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[headheight=14pt]{geometry}
\usepackage[font=small,labelfont=bf,tableposition=top]{caption}
\usepackage{fancyhdr}
\usepackage{blindtext}
\fancyhf{}
\fancyhead[LE,RO]{\thepage}
\fancyhead[RE]{\nouppercase\rightmark}
\fancyhead[LO]{\nouppercase\leftmark}
\pagestyle{fancy}
\begin{document}
\chapter{Foo}
\section{Foo}
\Blindtext
\begin{table}[!p]
\caption{Dummy table}\label{tab:dummy}
\centering
\rule{12.8cm}{7.2cm}
\end{table}
\chapter{Bar}
\section{Bar}
\Blindtext
\end{document}Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Headers and Footers on Float Pages
Code: Select all
\makeatletter
\def\clearpage{%
\ifvmode
\ifnum \@dbltopnum =\m@ne
\ifdim \pagetotal <\topskip
\hbox{}
\fi
\fi
\fi
\newpage
\thispagestyle{empty}
\write\m@ne{}
\vbox{}
\penalty -\@Mi
}
\makeatother
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Headers and Footers on Float Pages
Code: Select all
\documentclass[11pt,a4paper,english]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[headheight=14pt]{geometry}
\usepackage[font=small,labelfont=bf,tableposition=top]{caption}
\usepackage{fancyhdr}
\usepackage{blindtext}
\fancyhf{}
\fancyhead[LE,RO]{\thepage}
\fancyhead[RE]{\nouppercase\rightmark}
\fancyhead[LO]{\nouppercase\leftmark}
\pagestyle{fancy}
\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}
\section{Foo}
\Blindtext
\begin{table}[!p]
\caption{Dummy table}\label{tab:dummy}
\centering
\rule{12.8cm}{7.2cm}
\end{table}
\chapter{Bar}
\section{Bar}
\Blindtext
\end{document}Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10