如何从第 2 页开始分配不同的页脚?

如何从第 2 页开始分配不同的页脚?

我正在写一份文档,其中第一页的页脚包含一个句子,而第二页及以后的页脚包含相应的页码。文档的第一页包含一个长表,该长表延续到第 2、3 页……

随着长表继续显示在后续页面上,如何将此页脚句子更改为页码?

简而言之,我想从该文档的第 2 页开始分配新的页脚。

梅威瑟:

\documentclass[10pt,a4paper,hidelinks,table]{article}%
\usepackage{geometry}%
\usepackage{fancyhdr}%
\usepackage{graphicx}%
\usepackage{xcolor}%
\usepackage{colortbl}%
\usepackage{float}%
\geometry{a4paper,inner=12mm,outer=12mm,top=10mm,bottom=15mm,footskip=1mm}%
\pagestyle{fancy}%
\fancyhead{}%
\fancyheadoffset{.75cm}%
\usepackage{hyperref}%
\usepackage{longtable}%
\begin{document}%
\normalsize%
\definecolor{black}{RGB}{0,0,0}%
\fancyhf{}%
\renewcommand{\headrulewidth}{0pt}%
\renewcommand{\footrulewidth}{1pt}%
\lfoot{\hspace{.5cm}\fontsize{10pt}{12pt}\selectfont{\textbf{terms and conditions here.}}}%

\begin{minipage}[t]{0.45\textwidth}
\raggedright{\fontsize{8pt}{12pt}\selectfont{will put a logo here}}
\end{minipage}
\hfill 
\begin{minipage}{0.45\textwidth}
\raggedleft{\fontsize{8pt}{12pt}\selectfont{Address \\ Part \\Here }}
\end{minipage}%

\par%
\vspace{0.75cm}%
\fontsize{18pt}{21.6pt}\noindent\selectfont \centering \textbf{Record Review}%
\vspace{0.75cm}\hspace{0.25cm}
        \begin{minipage}[b]{0.75\textwidth}
        \begin{table}[H]
        \renewcommand{\arraystretch}{1.75}
        \begin{tabular}[b]{lll}
        {\fontsize{14pt}{16.8pt}\selectfont {Name    }}          & : &\textbf{\footnotesize{}}                                                              \\
        {\fontsize{14pt}{16.8pt}\selectfont {Employer}}        & : & \textbf{\footnotesize{}}                                                                \\
        {\fontsize{14pt}{16.8pt}\selectfont {ABC \#}}          & : & \textbf{\footnotesize{}}                                                             \\ 
        {\fontsize{14pt}{16.8pt}\selectfont {Invoice \#}} & : & \textbf{\footnotesize{}}\\
        {\fontsize{14pt}{16.8pt}\selectfont {Location    }}          & : & \textbf{\footnotesize{}} \\
        {\fontsize{14pt}{16.8pt}\selectfont {Date    }}          & : & \textbf{\footnotesize{}}\\
        \end{tabular}
        \end{table}
        \end{minipage}
        \hfill
        \begin{minipage}[b]{0.15\textwidth}
        \fontsize{10pt}{12pt}\selectfont\raggedleft {Some copyrighted text here}
        \end{minipage}
        %
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}%

    \fontsize{14pt}{16.8pt}\selectfont
    \begin{longtable}{L{.3\textwidth}L{.65\textwidth}}
    \hline \rowcolor[gray]{0} \textbf {\color{white} {Date}} & \textbf{\color{white} {Review}} \\ \hline 
    \endhead \\ 
    2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\2019-01-01 00:00:00 & A\\2019-02-02 00:00:00 & B\\
\end{longtable}%
\end{document}

答案1

您可以在第一个页面上使用不同的页面样式\thispagestyle

\documentclass{memoir}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\lfoot{\thepage\ -- next foot}

\fancypagestyle{firstpage}{%
\fancyhf{}\lfoot{first foot}}

\usepackage{lipsum}

\begin{document}
\thispagestyle{firstpage}
\lipsum
\end{document}

相关内容