I'd like to remove headers (inserted by fancyhdr package) on a float page that contains a single big figure with footnotes.
I'd like to retain the same pagination and content flow, i.e. forced use of a \clearpage before the figure is not an option. I tried the afterpage package and wrapped my float in an afterpage environment, but this fails with a weird file not found error thrown by includegraphics.
Here is my MWE. The float page is the 2nd page, from which the header line/rule is to be removed. Any help is appreciated.
\documentclass[a4paper]{book}
\newcommand{\mpfootnotes}[1][1]{
\renewcommand{\thempfootnote}{\thefootnote}
\addtocounter{footnote}{-#1}
\renewcommand{\footnote}{\stepcounter{footnote}\footnotetext[\value{footnote}]}}
\usepackage[demo]{graphicx}
\usepackage{lipsum}% debug only
\usepackage[paper=a4paper, hmarginratio=1:1, vmarginratio=1:1, scale=0.75]{geometry}
\usepackage{fancyhdr}
\newcommand{\setFancyHdr}{
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\thechapter. ##1 }}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ ##1}}
\fancyhf{}
\fancyhead[R]{{\bfseries\rightmark}}
\fancyfoot[C]{\thepage}
\fancypagestyle{plain}{
\fancyhead{}
\renewcommand{\headrulewidth}{0pt}
}
}
\setlength{\headheight}{14.5pt}
\setFancyHdr
\begin{document}
\chapter{First}
\section{First section}
\lipsum[1-2]
\begin{figure}[p] % the figure needs to occupy the entire page. Hence permitting only the 'p' modifier.
\begin{minipage}[t]{\textwidth}
\centering
\includegraphics[angle=90,width=\textwidth]{demo} % 'fig_master_flow_diagramPDF.pdf' is a huge figure and needs to stretch/shrink suitably to occupy the entire type-area available.
\caption
[%
Interesting caption
]%
{%
Interesting caption\footnotemark.
}%
\label{fig:fig_strategy_schematic}
\mpfootnotes[1]
\footnote{Some important footnote}
\end{minipage}
\end{figure}
\lipsum[1-10]
\end{document}
empty– David Carlisle Sep 05 '18 at 13:25\iffloatpage{{\pagestyle{plain}}{\pagestyle{fancy}}}? Obviously, I cannot useemptybecause I need page numbers in the footer. – Dr Krishnakumar Gopalakrishnan Sep 05 '18 at 13:34\iffloatpage{\pagestyle{plain}}{\pagestyle{fancy}}. This does not work. – Dr Krishnakumar Gopalakrishnan Sep 05 '18 at 13:41\iffloatpage{}{\bfseries\rightmark}}so it only uses the normal head on non-float pages – David Carlisle Sep 05 '18 at 13:50\renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}}– Dr Krishnakumar Gopalakrishnan Sep 05 '18 at 13:53[R]you need to do the same for[L]– David Carlisle Sep 05 '18 at 13:55\clearpage \thispagestyle[plain}\begin{figure}....– David Carlisle Sep 06 '18 at 14:10afterpage. But withafterpage, the footnote macro doesn't work. – Dr Krishnakumar Gopalakrishnan Sep 06 '18 at 14:11