我有一個大頁腳需要放置在文件的第一頁。為了使其適合,我使用了幾何包並增加了底部邊距。
對於頁首/頁尾操作,我使用fancyhdr
.如何在文字頁面\newgeometry{bottom=2cm}
上再次使用,而不使用和猜測第二頁在文本中的開始位置?2nd
\newpage
LaTex可以執行下一頁的指令嗎?就像是
\NextPageExecute{\newgeometry{bottom=3cm}}
就能解決問題。這是 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}.
第一頁如下圖所示:
第二頁有不必要的大頁腳空間:
答案1
該afterpage
軟體包正是您所尋找的。由於您只需要3cm
第一頁和(例如)2cm
其他地方的下邊距,我建議僅在第一頁上使用預設佈局2cm
和使用\newgeometry
(後跟\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}
第 1 頁:
第2頁: