回忆录中的新几何,不同页面的结果不同

回忆录中的新几何,不同页面的结果不同

我正在尝试使用回忆录类创建文档。该文档的第一页需要有特定的页眉和页脚,其余部分需要不同的页眉和页脚。

我已尝试使用 fancyheader,但第二页效果不正确(文本向上移动并侵入页眉,页脚也向上移动)。

有人能想到用回忆录类中的页眉和页脚(没有 fancyheader)来实现这一点吗?页眉和页脚有点复杂,有好几行。

这是一个 MWE:

\documentclass[oneside]{memoir}

\usepackage{titletoc}
\usepackage[ddmmyyyy]{datetime} % Para la fecha del informe
\usepackage{lastpage}  % Para saber cuantas paginas hay en el documento
\usepackage{fancyhdr}  % Para encabezados y pie de pagina
\usepackage{xcolor}    % Para texto de colores
\usepackage[lmargin=1.5cm,rmargin=1.5cm,top=2.5cm,bottom=3.5cm,includefoot]{geometry}  % Para fijar los margenes

\begin{document}

\fancyhf{}  
\renewcommand{\headrulewidth}{0pt}  
\renewcommand{\today}{\the\day-\shortmonthname[\the\month]-\the\year}

\fancypagestyle{rest}{
    \fancyhf{}
    \lhead{\HUGE COMPANY NAME} 
    \rhead{     \footnotesize
        \begin{tabular}{l@{\hskip 0.5cm}r @{}}
            & AAA-TOPSECRET\\
            \ \\
            Code: & AAA-CDE-ITR-019\\
            Date: & \today\\
            Version: & 1\ \\
            Page: & \thepage\  of \pageref{LastPage}
        \end{tabular}
    }

    \renewcommand{\footrulewidth}{0.4pt}
    \lfoot{\footnotesize DER}
    \rfoot{\footnotesize JHG Technical Report}
}

\fancypagestyle{titlepage}{
    \fancyhf{}
    \lhead{\HUGE COMPANY NAME}
    \rhead{     AAA-TOPSECRET    }
    \lfoot{
        \begin{flushleft}
            \footnotesize 
            \begin{tabular}{@{} l@{\hskip 0.5cm}r }
                Prepared by: & John Smith\\
                Approved by: & Jake Smith\\
                Authorized by: & Jake Smith\\
            \end{tabular}
            \ \\[0.4cm]
            AAA Company\\
            www.testwebsite.com\\
            \textcolor{lightgray}{Custom} \textcolor{blue}{e}\textcolor{lightgray}{-Solutions.}
        \end{flushleft}
    }
    \rfoot{
        \begin{flushright}
            \footnotesize
                \begin{tabular}{l@{\hskip 0.5cm}r @{}}
                    Code: & AAA-CDE-ITR-019\\
                    Date: & \today\\Version: & 1\ \\
                    \ \\
                    \ & All rights reserved. \textcopyright \  AAA, 2019\\
                    \ \\
                    Internal code: & AAA 24466/19 V1/19
                \end{tabular}
        \end{flushright}}
    \cfoot{
        \ \\[3.5cm]\tiny \textcolor{gray}{The information contained within this document is considered as Secret. This information should/shall not be redistributed to non-allowed employees. The receiver is allowed to access this information precisely within conditions and for the explicit purposes previously or contractually agreed between the company and the receiver of the information; observing at all times legal regulations in intellectual property, personal data protection and other legal requirements where applicable.
        }
    }
}

\newgeometry{lmargin=1.5cm,rmargin=1.5cm,top=2.5cm,bottom=6cm,includefoot}  

\pagestyle{rest}
\thispagestyle{titlepage}
\vspace*{\fill}
\HUGE{Test Technical Report}\\[0.3cm]
\LARGE{\textcolor{blue}{PROJECT (COMPANY)}}
\vspace*{\fill}

\newpage

\restoregeometry

Page 1 text
\newpage

Page 2 text
\newpage

Page 3 text
\newpage

Page 4 text

\end{document}

相关内容