![从带有图形的浮动页面中删除页眉,但将其保留在带有表格的浮动页面中](https://linux22.com/image/382225/%E4%BB%8E%E5%B8%A6%E6%9C%89%E5%9B%BE%E5%BD%A2%E7%9A%84%E6%B5%AE%E5%8A%A8%E9%A1%B5%E9%9D%A2%E4%B8%AD%E5%88%A0%E9%99%A4%E9%A1%B5%E7%9C%89%EF%BC%8C%E4%BD%86%E5%B0%86%E5%85%B6%E4%BF%9D%E7%95%99%E5%9C%A8%E5%B8%A6%E6%9C%89%E8%A1%A8%E6%A0%BC%E7%9A%84%E6%B5%AE%E5%8A%A8%E9%A1%B5%E9%9D%A2%E4%B8%AD.png)
我有一个特殊的要求。在包含一个大数字的浮动页面中,我想删除所有标题信息。但是,在包含大表格的浮动页面中,我想保留标题。
这是可行的吗(如果不行的话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}