我正在使用 fancyhdr 包来创建特定的标题和脚注。
我的代码:
\begin{document}
\renewcommand\headrule{\textcolor{gray!60}{\rule{\textwidth}{.5pt}}}%
\renewcommand{\footrule}{\textcolor{gray!60}{\rule{\textwidth}{.5pt}}}%
\pagenumbering{arabic}
\rfoot{\textcolor{gray}{\small Site: \thepage}}
\lhead{\textcolor{gray}{\small \@title}}
\rhead{\begin{tikzpicture}%
\node[opacity=.4]{\includegraphics[width=.08\linewidth]{img/logo}};
\end{tikzpicture}}
\newgeometry{bottom = 5cm}
My text appears here
\newpage
Now my text appears at the right position
\end{document}
但是第一页的文本打印到了标题中。使用 之后\newpage
,文本按预期打印。
我的第一页:
我的第二页:
如何直接证明主体框的位置?
维基百科徽标来自:https://commons.wikimedia.org/wiki/File:Logo_de_wikipedia.png 许可:维基媒体基金会 [CC BY-SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0)]
有关 coppy 和 post 的完整示例:
\documentclass{scrartcl}
\title{My title}
\author{Ahrtaler}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage[a4paper]{geometry}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{fancyhdr}
\usepackage[export]{adjustbox}
\usepackage{showframe}
\pagestyle{fancy}
\fancyhf{}
\renewcommand\headrule{\textcolor{gray!60}{\rule{\textwidth}{0pt}}}%
\begin{document}
\newgeometry{bottom = 15mm}
\pagenumbering{gobble}
\makeatletter
\centering
\vspace{3.5cm}
\Large\textbf{\@title}
\normalsize
\vfill
\raggedright
\textbf{Date:}\\
\hspace{.5cm}\@date
\vspace{1cm}
\textbf{Author:}\\
\hspace{.5cm} \@author
\centering
\includegraphics[width=0.1\linewidth]{example-image}
\raggedright
\pagebreak
\renewcommand\headrule{\textcolor{gray!60}{\rule{\textwidth}{.5pt}}}%
\renewcommand{\footrule}{\textcolor{gray!60}{\rule{\textwidth}{.5pt}}}%
\pagenumbering{arabic}
\rfoot{\textcolor{gray}{\small Site: \thepage}}
\lhead{\textcolor{gray}{\small \@title}}
\rhead{\begin{tikzpicture}%
\node[opacity=.4]{\includegraphics[width=.08\linewidth]{example-image}};
\end{tikzpicture}}
\newgeometry{bottom = 5cm}
My text appears here
\newpage
Now my text appears at the right position
\end{document}