0

I am writing a document in which 1st page footer contain a sentence while the footer of page 2 onwards contain respective page numbers. 1st page of document contain a longtable which continues on page 2,3,....

How to change this footer sentence to page number as longtable continues on further pages?

In short, I want to assign new footer from page 2 of this document.

MWE:

\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}
  • Please add an MWE. – Jan Aug 7 at 9:30
  • 2
    I'm voting to close this question as off-topic because this is a just-do-it-for-me question (-1). It has been requested many times to you (based on your previous questions) to add a MWE (for more info: tex.meta.stackexchange.com/questions/228/…). – Raaja Aug 7 at 9:35
  • Added MWE :) @Jan – P.Natu Aug 7 at 9:44
  • your example is too long, it contains local stuff not present on all systems, and the indentation is bad so that it is difficult to read. – Ulrike Fischer Aug 7 at 10:00
  • You have different footers on page one and two by using different page. This is explained in the memoir manual. Or you can search this site for "memoir pagestyle" :) What you actually do, is setting a pagestyle for the document, and use \thispagestyle{}-command on page one. – Sveinung Aug 7 at 10:09
3

You can use a different page style on page one with \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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.