我有一个特殊的要求。在包含一个大数字的浮动页面中,我想删除所有标题信息。但是,在包含大表格的浮动页面中,我想保留标题。
这是可行的吗(如果不行的话pdftex
,至少是luatex
可能的)?
这是一个入门级 MWE,它可以删除所有浮动页面中的页眉(无论它包含表格、图形还是任何组合)
\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}
\usepackage{booktabs}
\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
\renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}}
\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-4]
\begin{table}[p]
\caption{A table on a float page}
\centering
\begin{tabular}{ll}
\toprule
a & 1 \\
b & 2 \\
c & 3 \\
d & 4 \\
e & 5 \\
f & 6 \\
g & 7 \\
h & 8 \\
i & 9 \\
j & 10 \\
k & 11 \\
l & 12 \\
m & 13 \\
n & 14 \\
o & 15\\
\bottomrule
\end{tabular}
\end{table}
\lipsum[1-6]
\end{document}