Tenho um rodapé grande que precisa ser colocado na primeira página de um documento. Para caber, usei o pacote de geometria e aumentei a margem inferior.
Para a manipulação de cabeçalho/rodapé, estou usando fancyhdr
. Como faço para usar \newgeometry{bottom=2cm}
novamente na 2nd
página do texto, sem usar \newpage
e adivinhar onde começa a segunda página do texto?
O LaTex pode executar comandos na próxima página? Algo como
\NextPageExecute{\newgeometry{bottom=3cm}}
resolveria o problema. Aqui está o MWE:
\documentclass{article}
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=3cm]{geometry}
% Header customization, get the reference to the last page.
\usepackage{fancyhdr, lastpage}
\pagestyle{fancy}
% Header customization, get the reference to the last page.
\usepackage{fancyhdr, lastpage}
% Fancy pagestyle for the rest of the document.
\pagestyle{fancy}
\lhead{My form 11/17}
\rhead{Page \thepage of \pageref{LastPage}}
% Remove the horizontal line from the header.
\renewcommand{\headrulewidth}{0pt}
% Remove everything from the footline.
\cfoot{}
\definecolor{CUSTOM}{HTML}{00529e}
% Set the header and footer style.
\fancypagestyle{empty}{%
\fancyhf{}% Clear header/footer
\lhead{My form 11/17}
\rhead{Page \thepage of \pageref{LastPage}}
\lfoot{
Something something. \\
Memo text. \\
Some address information. \\
Telephone numbers. \\
}
\rfoot{
\textcolor{CUSTOM}{\Huge{HUGE TEXT}}
}
}
\begin{document}
\thispagestyle{empty}
\lipsum
\lipsum
\lipsum
\end{document}.
A primeira página fica assim:
E a segunda página tem este espaço de rodapé desnecessariamente grande:
Responder1
O afterpage
pacote faz exatamente o que você procura. Visto que você deseja apenas a 3cm
margem inferior na primeira página e (por exemplo) 2cm
em outros lugares, eu recomendaria ter o layout padrão 2cm
e usá-lo \newgeometry
apenas na primeira página (seguido por um \restoregeometry\clearpage
in \afterpage
):
\documentclass{article}
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage{afterpage}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}% 2cm bottom (usual)
% Header customization, get the reference to the last page.
\usepackage{fancyhdr, lastpage}
\pagestyle{fancy}
% Header customization, get the reference to the last page.
\usepackage{fancyhdr, lastpage}
% Fancy pagestyle for the rest of the document.
\pagestyle{fancy}
\lhead{My form 11/17}
\rhead{Page \thepage of \pageref{LastPage}}
% Remove the horizontal line from the header.
\renewcommand{\headrulewidth}{0pt}
% Remove everything from the footline.
\cfoot{}
\definecolor{CUSTOM}{HTML}{00529e}
% Set the header and footer style.
\fancypagestyle{empty}{%
\fancyhf{}% Clear header/footer
\lhead{My form 11/17}
\rhead{Page \thepage of \pageref{LastPage}}
\lfoot{
Something something. \\
Memo text. \\
Some address information. \\
Telephone numbers. \\
}
\rfoot{
\textcolor{CUSTOM}{\Huge{HUGE TEXT}}
}
}
\begin{document}
\newgeometry{left=2cm,right=2cm,top=2cm,bottom=3cm} % Change to 3cm bottom (temp)
\thispagestyle{empty}
\afterpage{\restoregeometry\clearpage}
% CONTENT HERE
\lipsum
\lipsum
\lipsum
\end{document}
Página 1:
Página 2: